workflows.smri.niftyreg.groupwise¶
create_groupwise_average()
¶
Create the overall workflow that embeds all the rigid, affine and non-linear components.
Inputs:
inputspec.in_files - The input files to be registered
inputspec.ref_file - The initial reference image that the input files
are registered to
inputspec.rmask_file - Mask of the reference image
inputspec.in_trans_files - Initial transformation files (affine or
cpps)
Outputs:
outputspec.average_image - The average image
outputspec.cpp_files - The bspline transformation files
Example¶
>>> from nipype.workflows.smri.niftyreg import create_groupwise_average
>>> node = create_groupwise_average('groupwise_av')
>>> node.inputs.inputspec.in_files = [
... 'file1.nii.gz', 'file2.nii.gz']
>>> node.inputs.inputspec.ref_file = ['ref.nii.gz']
>>> node.inputs.inputspec.rmask_file = ['mask.nii.gz']
>>> node.run()
Graph¶
create_linear_gw_step()
¶
Creates a workflow that performs linear co-registration of a set of images using RegAladin, producing an average image and a set of affine transformation matrices linking each of the floating images to the average.
Inputs:
inputspec.in_files - The input files to be registered
inputspec.ref_file - The initial reference image that the input files
are registered to
inputspec.rmask_file - Mask of the reference image
inputspec.in_aff_files - Initial affine transformation files
Outputs:
outputspec.average_image - The average image
outputspec.aff_files - The affine transformation files
Optional arguments:
linear_options_hash - An options dictionary containing a list of
parameters for RegAladin that take
the same form as given in the interface (default None)
demean - Selects whether to demean the transformation matrices when
performing the averaging (default True)
initial_affines - Selects whether to iterate over initial affine
images, which we generally won't have (default False)
Example¶
>>> from nipype.workflows.smri.niftyreg import create_linear_gw_step
>>> lgw = create_linear_gw_step('my_linear_coreg')
>>> lgw.inputs.inputspec.in_files = [
... 'file1.nii.gz', 'file2.nii.gz']
>>> lgw.inputs.inputspec.ref_file = ['ref.nii.gz']
>>> lgw.run()
Graph¶
create_nonlinear_gw_step()
¶
Creates a workflow that perform non-linear co-registrations of a set of images using RegF3d, producing an non-linear average image and a set of cpp transformation linking each of the floating images to the average.
Inputs:
inputspec.in_files - The input files to be registered
inputspec.ref_file - The initial reference image that the input files
are registered to
inputspec.rmask_file - Mask of the reference image
inputspec.in_trans_files - Initial transformation files (affine or
cpps)
Outputs:
outputspec.average_image - The average image
outputspec.cpp_files - The bspline transformation files
Optional arguments:
nonlinear_options_hash - An options dictionary containing a list of
parameters for RegAladin that take the
same form as given in the interface (default None)
initial_affines - Selects whether to iterate over initial affine
images, which we generally won't have (default False)
Example¶
>>> from nipype.workflows.smri.niftyreg import create_nonlinear_gw_step
>>> nlc = create_nonlinear_gw_step('nonlinear_coreg')
>>> nlc.inputs.inputspec.in_files = [
... 'file1.nii.gz', 'file2.nii.gz']
>>> nlc.inputs.inputspec.ref_file = ['ref.nii.gz']
>>> nlc.run()