nipype.interfaces.ants.legacy module¶
ANTS Legacy Interfaces
These interfaces are for programs that have been deprecated by ANTs, but are preserved for backwards compatibility.
GenWarpFields¶
Bases: antsIntroduction
Wrapped executable:
antsIntroduction.sh
.
- input_imagea pathlike object or string representing an existing file
Input image to warp to template. Maps to a command-line argument:
-i %s
.- reference_imagea pathlike object or string representing an existing file
Template file to warp to. Maps to a command-line argument:
-r %s
.
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s
.- bias_field_correctiona boolean
Applies bias field correction to moving image. Maps to a command-line argument:
-n 1
.- dimension3 or 2
Image dimension (2 or 3). Maps to a command-line argument:
-d %d
(position: 1). (Nipype default value:3
)- environa dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’
Environment variables. (Nipype default value:
{}
)- force_proceeda boolean
Force script to proceed even if headers may be incompatible. Maps to a command-line argument:
-f 1
.- inverse_warp_template_labelsa boolean
Applies inverse warp to the template labels to estimate label positions in target space (use for template-based segmentation). Maps to a command-line argument:
-l
.- max_iterationsa list of items which are an integer (int or long)
Maximum number of iterations (must be list of integers in the form [J,K,L…]: J = coarsest resolution iterations, K = middle resolution interations, L = fine resolution iterations. Maps to a command-line argument:
-m %s
.- num_threadsan integer (int or long)
Number of ITK threads to use. (Nipype default value:
1
)- out_prefixa unicode string
Prefix that is prepended to all output files (default = ants_). Maps to a command-line argument:
-o %s
. (Nipype default value:ants_
)- quality_checka boolean
Perform a quality check of the result. Maps to a command-line argument:
-q 1
.- similarity_metric‘PR’ or ‘CC’ or ‘MI’ or ‘MSQ’
Type of similartiy metric used for registration (CC = cross correlation, MI = mutual information, PR = probability mapping, MSQ = mean square difference). Maps to a command-line argument:
-s %s
.- transformation_model‘GR’ or ‘EL’ or ‘SY’ or ‘S2’ or ‘EX’ or ‘DD’ or ‘RI’ or ‘RA’
Type of transofmration model used for registration (EL = elastic transformation model, SY = SyN with time, arbitrary number of time points, S2 = SyN with time optimized for 2 time points, GR = greedy SyN, EX = exponential, DD = diffeomorphic demons style exponential mapping, RI = purely rigid, RA = affine rigid. Maps to a command-line argument:
-t %s
. (Nipype default value:GR
)
- affine_transformationa pathlike object or string representing an existing file
Affine (prefix_Affine.txt).
- input_filea pathlike object or string representing an existing file
Input image (prefix_repaired.nii).
- inverse_warp_fielda pathlike object or string representing an existing file
Inverse warp field (prefix_InverseWarp.nii).
- output_filea pathlike object or string representing an existing file
Output image (prefix_deformed.nii).
- warp_fielda pathlike object or string representing an existing file
Warp field (prefix_Warp.nii).
antsIntroduction¶
Bases: ANTSCommand
Wrapped executable:
antsIntroduction.sh
.Uses ANTS to generate matrices to warp data from one space to another.
Examples
>>> from nipype.interfaces.ants.legacy import antsIntroduction >>> warp = antsIntroduction() >>> warp.inputs.reference_image = 'Template_6.nii' >>> warp.inputs.input_image = 'structural.nii' >>> warp.inputs.max_iterations = [30,90,20] >>> warp.cmdline 'antsIntroduction.sh -d 3 -i structural.nii -m 30x90x20 -o ants_ -r Template_6.nii -t GR'
- input_imagea pathlike object or string representing an existing file
Input image to warp to template. Maps to a command-line argument:
-i %s
.- reference_imagea pathlike object or string representing an existing file
Template file to warp to. Maps to a command-line argument:
-r %s
.
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s
.- bias_field_correctiona boolean
Applies bias field correction to moving image. Maps to a command-line argument:
-n 1
.- dimension3 or 2
Image dimension (2 or 3). Maps to a command-line argument:
-d %d
(position: 1). (Nipype default value:3
)- environa dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’
Environment variables. (Nipype default value:
{}
)- force_proceeda boolean
Force script to proceed even if headers may be incompatible. Maps to a command-line argument:
-f 1
.- inverse_warp_template_labelsa boolean
Applies inverse warp to the template labels to estimate label positions in target space (use for template-based segmentation). Maps to a command-line argument:
-l
.- max_iterationsa list of items which are an integer (int or long)
Maximum number of iterations (must be list of integers in the form [J,K,L…]: J = coarsest resolution iterations, K = middle resolution interations, L = fine resolution iterations. Maps to a command-line argument:
-m %s
.- num_threadsan integer (int or long)
Number of ITK threads to use. (Nipype default value:
1
)- out_prefixa unicode string
Prefix that is prepended to all output files (default = ants_). Maps to a command-line argument:
-o %s
. (Nipype default value:ants_
)- quality_checka boolean
Perform a quality check of the result. Maps to a command-line argument:
-q 1
.- similarity_metric‘PR’ or ‘CC’ or ‘MI’ or ‘MSQ’
Type of similartiy metric used for registration (CC = cross correlation, MI = mutual information, PR = probability mapping, MSQ = mean square difference). Maps to a command-line argument:
-s %s
.- transformation_model‘GR’ or ‘EL’ or ‘SY’ or ‘S2’ or ‘EX’ or ‘DD’ or ‘RI’ or ‘RA’
Type of transofmration model used for registration (EL = elastic transformation model, SY = SyN with time, arbitrary number of time points, S2 = SyN with time optimized for 2 time points, GR = greedy SyN, EX = exponential, DD = diffeomorphic demons style exponential mapping, RI = purely rigid, RA = affine rigid. Maps to a command-line argument:
-t %s
. (Nipype default value:GR
)
- affine_transformationa pathlike object or string representing an existing file
Affine (prefix_Affine.txt).
- input_filea pathlike object or string representing an existing file
Input image (prefix_repaired.nii).
- inverse_warp_fielda pathlike object or string representing an existing file
Inverse warp field (prefix_InverseWarp.nii).
- output_filea pathlike object or string representing an existing file
Output image (prefix_deformed.nii).
- warp_fielda pathlike object or string representing an existing file
Warp field (prefix_Warp.nii).
buildtemplateparallel¶
Bases: ANTSCommand
Wrapped executable:
buildtemplateparallel.sh
.Generate a optimal average template
Warning
This can take a VERY long time to complete
Examples
>>> from nipype.interfaces.ants.legacy import buildtemplateparallel >>> tmpl = buildtemplateparallel() >>> tmpl.inputs.in_files = ['T1.nii', 'structural.nii'] >>> tmpl.inputs.max_iterations = [30, 90, 20] >>> tmpl.cmdline 'buildtemplateparallel.sh -d 3 -i 4 -m 30x90x20 -o antsTMPL_ -c 0 -t GR T1.nii structural.nii'
- in_filesa list of items which are a pathlike object or string representing an existing file
List of images to generate template from. Maps to a command-line argument:
%s
(position: -1).
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s
.- bias_field_correctiona boolean
Applies bias field correction to moving image. Maps to a command-line argument:
-n 1
.- dimension3 or 2 or 4
Image dimension (2, 3 or 4). Maps to a command-line argument:
-d %d
(position: 1). (Nipype default value:3
)- environa dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’
Environment variables. (Nipype default value:
{}
)- gradient_step_sizea float
Smaller magnitude results in more cautious steps (default = .25). Maps to a command-line argument:
-g %f
.- iteration_limitan integer (int or long)
Iterations of template construction. Maps to a command-line argument:
-i %d
. (Nipype default value:4
)- max_iterationsa list of items which are an integer (int or long)
Maximum number of iterations (must be list of integers in the form [J,K,L…]: J = coarsest resolution iterations, K = middle resolution interations, L = fine resolution iterations. Maps to a command-line argument:
-m %s
.- num_coresan integer (int or long)
Requires parallelization = 2 (PEXEC). Sets number of cpu cores to use. Maps to a command-line argument:
-j %d
. Requires inputs:parallelization
.- num_threadsan integer (int or long)
Number of ITK threads to use. (Nipype default value:
1
)- out_prefixa unicode string
Prefix that is prepended to all output files (default = antsTMPL_). Maps to a command-line argument:
-o %s
. (Nipype default value:antsTMPL_
)- parallelization0 or 1 or 2
Control for parallel processing (0 = serial, 1 = use PBS, 2 = use PEXEC, 3 = use Apple XGrid. Maps to a command-line argument:
-c %d
. (Nipype default value:0
)- rigid_body_registrationa boolean
Registers inputs before creating template (useful if no initial template available). Maps to a command-line argument:
-r 1
.- similarity_metric‘PR’ or ‘CC’ or ‘MI’ or ‘MSQ’
Type of similartiy metric used for registration (CC = cross correlation, MI = mutual information, PR = probability mapping, MSQ = mean square difference). Maps to a command-line argument:
-s %s
.- transformation_model‘GR’ or ‘EL’ or ‘SY’ or ‘S2’ or ‘EX’ or ‘DD’
Type of transofmration model used for registration (EL = elastic transformation model, SY = SyN with time, arbitrary number of time points, S2 = SyN with time optimized for 2 time points, GR = greedy SyN, EX = exponential, DD = diffeomorphic demons style exponential mapping. Maps to a command-line argument:
-t %s
. (Nipype default value:GR
)- use_first_as_targeta boolean
Uses first volume as target of all inputs. When not used, an unbiased average image is used to start.
- final_template_filea pathlike object or string representing an existing file
Final ANTS template.
- subject_outfilesa list of items which are a pathlike object or string representing an existing file
Outputs for each input image. Includes warp field, inverse warp, Affine, original image (repaired) and warped image (deformed).
- template_filesa list of items which are a pathlike object or string representing an existing file
Templates from different stages of iteration.