Inheritance diagram for nipype.interfaces.io:
digraph inheritance38993eeb35 { rankdir=LR; ratio=compress; fontsize=14; size="6.0, 8.0"; "base.Interface" [shape=ellipse,URL="nipype.interfaces.base.html#nipype.interfaces.base.Interface",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "io.DataSource" [shape=ellipse,URL="#nipype.interfaces.io.DataSource",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "base.Interface" -> "io.DataSource" [arrowsize=0.5,style="setlinewidth(0.5)"]; "io.DataSink" [shape=ellipse,URL="#nipype.interfaces.io.DataSink",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "base.Interface" -> "io.DataSink" [arrowsize=0.5,style="setlinewidth(0.5)"]; "io.DataGrabber" [shape=ellipse,URL="#nipype.interfaces.io.DataGrabber",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "base.Interface" -> "io.DataGrabber" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
Set of interfaces that allow interaction with data. Currently available interfaces are:
DataSource: Generic nifti to named Nifti interface DataSink: Generic named output from interfaces to data store
To come : XNATSource, XNATSink
Bases: nipype.interfaces.base.Interface
Generic datagrabber module that wraps around glob in an intelligent way for neuroimaging tasks
| Parameters: | (all default to None) : file_template : string
template_argtuple: tuple of arguments :
template_argnames: list of strings :
|
|---|
| Parameters: | (all default to None) : file_list : list
|
|---|
Bases: nipype.interfaces.base.Interface
Generic datasink module that takes a directory containing a list of nifti files and provides a set of structured output fields.
| Parameters: | (all default to None) : base_directory : /path/to/dir
subject_id: string or int :
subject_directory : /path/to/dir
Any fields that are set as lists will be copied to a : directory under subject_directory with the fieldname as a : new directory. : |
|---|
Execute this module.
cwd is just there to make things work for now
Bases: nipype.interfaces.base.Interface
Generic datasource module that takes a directory containing a list of nifti files and provides a set of structured output fields.
| Parameters: | base_directory : str
subject_template : str
file_template : str
subject_id: str or int :
subject_directory : str
subject_info : dict
|
|---|
Examples
Here our experiment data is stored in our home directory under ‘data/exp001’. In the exp001 directory we have a subdirectory for our subject named ‘s1’. In the ‘s1’ directory we have four functional images, ‘f3’, ‘f5’, ‘f7’, ‘f10’. In the info dictionary we create an entry where the key is the subject identifier ‘s1’, and the value is a list of one element, a tuple containing a list of the functional image names and a field name ‘func’. The ‘func’ field name is the output field name for this datasource object. So for instance, if we were doing motion correction using SPM realign, the datasource output ‘func’ would map to the realign input ‘infile’ in the pipeline.
>>> from nipype.interfaces.io import DataSource
>>> info = {}
>>> info['s1'] = [(['f3', 'f5', 'f7', 'f10'], 'func')]
>>> datasource = DataSource()
>>> data_dir = os.path.expanduser('~/data/exp001')
>>> datasource.inputs.base_directory = data_dir
>>> datasource.inputs.subject_template = '%s'
>>> datasource.inputs.file_template = '%s.nii'
>>> datasource.inputs.subject_info = info
>>> datasource.inputs.subject_id = 's1'
| Parameters: | (all default to None) : subject_id : string
subject_directory: /path/to/dir :
remaining fields are defined by user. See subject_info in : inputs_help() for description of how to specify output : fields : |
|---|
Execute this module.
cwd is just there to make things “work” for now