Code: file:///build/buildd/nipype-0.6.0/nipype/interfaces/ants/utils.py#L38
Wraps command antsApplyTransforms
antsApplyTransforms, applied to an input image, transforms it according to a reference image and a transform (or a set of transforms).
>>> from nipype.interfaces.ants import ApplyTransforms
>>> atms = ApplyTransforms()
>>> atms.inputs.input_image = 'structural.nii'
>>> atms.inputs.reference_image = 'ants_deformed.nii.gz'
>>> atms.inputs.transformation_files = ['ants_Warp.nii.gz','ants_Affine.txt']
>>> atms.cmdline
'antsApplyTransforms --dimensionality 3 --input structural.nii --output structural_trans.nii --reference-image ants_deformed.nii.gz --transform ants_Warp.nii.gz --transform ants_Affine.txt'
Inputs:
[Mandatory]
input_image: (a file name)
image to apply transformation to (generally a coregistered functional)
transformation_files: (an existing file name)
transformation file(s) to be applied
[Optional]
args: (a string)
Additional parameters to the command
default_value: (a float)
Default voxel value to be used with input images only. Specifies the voxel value when
the input point maps outside the output domain
dimension: (3 or 2, nipype default value: 3)
image dimension (2 or 3)
environ: (a dictionary with keys which are a value of type 'str' and with values which
are a value of type 'str', nipype default value: {})
Environment variables
ignore_exception: (a boolean, nipype default value: False)
Print an error message instead of throwing an exception in case the interface fails to
run
interpolation: (a string)
Use nearest neighbor interpolation
invert_transforms: (a list of items which are an integer)
List of Affine transformations to invert. E.g.: [1,4,5] inverts the 1st, 4th, and 5th
Affines found in transformation_series
num_threads: (an integer, nipype default value: 1)
Number of ITK threads to use
output_image: (a string)
output file name
reference_image: (a file name)
reference image space that you wish to warp INTO
Outputs:
output_image: (an existing file name)
Warped image
Code: file:///build/buildd/nipype-0.6.0/nipype/interfaces/ants/utils.py#L123
Wraps command WarpImageMultiTransform
Warps an image from one space to another
>>> from nipype.interfaces.ants import WarpImageMultiTransform
>>> wimt = WarpImageMultiTransform()
>>> wimt.inputs.moving_image = 'structural.nii'
>>> wimt.inputs.reference_image = 'ants_deformed.nii.gz'
>>> wimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt']
>>> wimt.cmdline
'WarpImageMultiTransform 3 structural.nii structural_wimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt'
>>> from nipype.interfaces.ants import WarpImageMultiTransform
>>> wimt = WarpImageMultiTransform()
>>> wimt.inputs.moving_image = 'diffusion_weighted.nii'
>>> wimt.inputs.reference_image = 'functional.nii'
>>> wimt.inputs.transformation_series = ['func2anat_coreg_Affine.txt','func2anat_InverseWarp.nii.gz','dwi2anat_Warp.nii.gz','dwi2anat_coreg_Affine.txt']
>>> wimt.inputs.invert_affine = [1]
>>> wimt.cmdline
'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii -i func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz dwi2anat_coreg_Affine.txt'
Inputs:
[Mandatory]
moving_image: (a file name)
image to apply transformation to (generally a coregistered functional)
transformation_series: (an existing file name)
transformation file(s) to be applied
[Optional]
args: (a string)
Additional parameters to the command
dimension: (3 or 2, nipype default value: 3)
image dimension (2 or 3)
environ: (a dictionary with keys which are a value of type 'str' and with values which
are a value of type 'str', nipype default value: {})
Environment variables
ignore_exception: (a boolean, nipype default value: False)
Print an error message instead of throwing an exception in case the interface fails to
run
invert_affine: (a list of items which are an integer)
List of Affine transformations to invert. E.g.: [1,4,5] inverts the 1st, 4th, and 5th
Affines found in transformation_series
num_threads: (an integer, nipype default value: 1)
Number of ITK threads to use
out_postfix: (a string, nipype default value: _wimt)
Postfix that is prepended to all output files (default = _wimt)
reference_image: (a file name)
reference image space that you wish to warp INTO
mutually_exclusive: tightest_box
reslice_by_header: (a boolean)
Uses orientation matrix and origin encoded in reference image file header. Not typically
used with additional transforms
tightest_box: (a boolean)
computes tightest bounding box (overrided by reference_image if given)
mutually_exclusive: reference_image
use_bspline: (a boolean)
Use 3rd order B-Spline interpolation
use_nearest: (a boolean)
Use nearest neighbor interpolation
Outputs:
output_image: (an existing file name)
Warped image
Code: file:///build/buildd/nipype-0.6.0/nipype/interfaces/ants/utils.py#L216
Wraps command WarpTimeSeriesImageMultiTransform
Warps a time-series from one space to another
>>> from nipype.interfaces.ants import WarpTimeSeriesImageMultiTransform
>>> wtsimt = WarpTimeSeriesImageMultiTransform()
>>> wtsimt.inputs.moving_image = 'resting.nii'
>>> wtsimt.inputs.reference_image = 'ants_deformed.nii.gz'
>>> wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt']
>>> wtsimt.cmdline
'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt'
>>> from nipype.interfaces.ants import WarpTimeSeriesImageMultiTransform
>>> wtsimt = WarpTimeSeriesImageMultiTransform()
>>> wtsimt.inputs.moving_image = 'resting.nii'
>>> wtsimt.inputs.reference_image = 'diffusion_weighted.nii'
>>> wtsimt.inputs.transformation_series = ['dwi2anat_coreg_Affine.txt','dwi2anat_InverseWarp.nii.gz','resting2anat_Warp.nii.gz','resting2anat_coreg_Affine.txt']
>>> wtsimt.inputs.invert_affine = [1]
>>> wtsimt.cmdline
'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R diffusion_weighted.nii -i dwi2anat_coreg_Affine.txt dwi2anat_InverseWarp.nii.gz resting2anat_Warp.nii.gz resting2anat_coreg_Affine.txt'
Inputs:
[Mandatory]
moving_image: (a file name)
image to apply transformation to (generally a coregistered functional)
transformation_series: (an existing file name)
transformation file(s) to be applied
[Optional]
args: (a string)
Additional parameters to the command
dimension: (4 or 3, nipype default value: 4)
image dimension (3 or 4)
environ: (a dictionary with keys which are a value of type 'str' and with values which
are a value of type 'str', nipype default value: {})
Environment variables
ignore_exception: (a boolean, nipype default value: False)
Print an error message instead of throwing an exception in case the interface fails to
run
invert_affine: (a list of items which are an integer)
List of Affine transformations to invert. E.g.: [1,4,5] inverts the 1st, 4th, and 5th
Affines found in transformation_series
num_threads: (an integer, nipype default value: 1)
Number of ITK threads to use
out_postfix: (a string, nipype default value: _wtsimt)
Postfix that is prepended to all output files (default = _wtsimt)
reference_image: (a file name)
reference image space that you wish to warp INTO
mutually_exclusive: tightest_box
reslice_by_header: (a boolean)
Uses orientation matrix and origin encoded in reference image file header. Not typically
used with additional transforms
tightest_box: (a boolean)
computes tightest bounding box (overrided by reference_image if given)
mutually_exclusive: reference_image
use_bspline: (a boolean)
Use 3rd order B-Spline interpolation
use_nearest: (a boolean)
Use nearest neighbor interpolation
Outputs:
output_image: (an existing file name)
Warped image