Inheritance diagram for nipype.pipeline.engine:
Defines functionality for pipelined execution of interfaces
The Pipeline class provides core functionality for batch processing.
Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path.join(filepath, ‘../testing/data’)) >>> os.chdir(datadir)
Bases: nipype.pipeline.engine.Node
Wraps interface objects that need to be iterated on a list of inputs.
Examples
>>> import nipype.interfaces.fsl as fsl
>>> realign = MapNode(interface=fsl.MCFLIRT(), name='realign', iterfield=['in_file'])
>>> realign.inputs.in_file = ['functional.nii', 'functional2.nii', 'functional3.nii']
>>> realign.run()
Methods
clone(name) | Clone a workflowbase object |
get_output(parameter) | Retrieve a particular output of the node |
get_subnodes() | |
hash_exists([updatehash]) | |
help() | Print interface help |
load(filename) | |
num_subnodes() | |
output_dir() | Return the location of the output directory for the node |
run([updatehash]) | Execute the node in its directory. |
save([filename]) | |
set_input(parameter, val) | Set interface input value or nodewrapper attribute |
update(**opts) | |
write_report([report_type, cwd]) |
Parameters : | iterfield : 1+-element list key(s) over which to repeatedly call the interface. : for example, to iterate FSL.Bet over multiple files, one can : set node.iterfield = [‘infile’]. If this list has more than 1 item : then the inputs are selected in order simultaneously from each of these : fields and each field will need to have the same number of members. : |
---|
Clone a workflowbase object
Parameters : | name : string (mandatory)
|
---|
Retrieve a particular output of the node
Print interface help
Return the underlying interface object
Return the location of the output directory for the node
Return the result object after the node has run
Execute the node in its directory.
Parameters : | updatehash: boolean :
|
---|
Set interface input value or nodewrapper attribute
Priority goes to interface.
Bases: nipype.pipeline.engine.WorkflowBase
Wraps interface objects for use in pipeline
A Node creates a sandbox-like directory for executing the underlying interface. It will copy or link inputs into this directory to ensure that input data are not overwritten. A hash of the input state is used to determine if the Node inputs have changed and whether the node needs to be re-executed.
Examples
>>> import nipype.interfaces.spm as spm
>>> realign = Node(interface=spm.Realign(), name='realign')
>>> realign.inputs.in_files = 'functional.nii'
>>> realign.inputs.register_to_mean = True
>>> realign.run()
Methods
clone(name) | Clone a workflowbase object |
get_output(parameter) | Retrieve a particular output of the node |
hash_exists([updatehash]) | |
help() | Print interface help |
load(filename) | |
output_dir() | Return the location of the output directory for the node |
run([updatehash]) | Execute the node in its directory. |
save([filename]) | |
set_input(parameter, val) | Set interface input value |
update(**opts) | |
write_report([report_type, cwd]) |
Parameters : | interface : interface object
iterables : generator
overwrite : Boolean
needed_outputs : list of output_names
run_without_submitting : boolean
|
---|
Clone a workflowbase object
Parameters : | name : string (mandatory)
|
---|
Retrieve a particular output of the node
Print interface help
Return the inputs of the underlying interface
Return the underlying interface object
Return the location of the output directory for the node
Return the output fields of the underlying interface
Return the result object after the node has run
Execute the node in its directory.
Parameters : | updatehash: boolean :
|
---|
Set interface input value
Bases: nipype.pipeline.engine.WorkflowBase
Controls the setup and execution of a pipeline of processes
Methods
add_nodes(nodes) | Add nodes to a workflow |
clone(name) | Clone a workflow .. |
connect(*args, **kwargs) | Connect nodes in the pipeline. |
disconnect(*args) | Disconnect two nodes |
export([filename, prefix, format, ...]) | Export object into a different format |
get_node(name) | Return an internal node by name |
list_node_names() | List names of all nodes in a workflow |
load(filename) | |
remove_nodes(nodes) | Remove nodes from a workflow |
run([plugin, plugin_args, updatehash]) | Execute the workflow |
save([filename]) | |
write_graph([dotfilename, graph2use, ...]) | Generates a graphviz dot file and a png file |
write_hierarchical_dotfile([dotfilename, ...]) |
Add nodes to a workflow
Parameters : | nodes : list
|
---|
Clone a workflow
Note
Will reset attributes used for executing workflow. See _init_runtime_fields.
Parameters : | name: string (mandatory ) :
|
---|
Connect nodes in the pipeline.
This routine also checks if inputs and outputs are actually provided by the nodes that are being connected.
Creates edges in the directed graph using the nodes and edges specified in the connection_list. Uses the NetworkX method DiGraph.add_edges_from.
Parameters : | args : list or a set of four positional arguments
|
---|
Disconnect two nodes
See the docstring for connect for format.
Export object into a different format
Parameters : | filename: string :
prefix: string :
format: string :
include_config: boolean :
|
---|
Return an internal node by name
List names of all nodes in a workflow
Remove nodes from a workflow
Parameters : | nodes : list
|
---|
Execute the workflow
Parameters : | plugin: plugin name or object :
plugin_args : dictionary containing arguments to be sent to plugin
|
---|
Generates a graphviz dot file and a png file
Parameters : | graph2use: ‘orig’, ‘hierarchical’ (default), ‘flat’, ‘exec’ :
format: ‘png’, ‘svg’ : simple_form: boolean (default: True) :
|
---|
Bases: object
Define common attributes and functions for workflows and nodes
Methods
clone(name) | Clone a workflowbase object |
load(filename) | |
save([filename]) |
Initialize base parameters of a workflow or node
Parameters : | base_dir : string
name : string (mandatory)
|
---|
Clone a workflowbase object
Parameters : | name : string (mandatory)
|
---|