Registration

CPAC.registration.create_nonlinear_register(name='nonlinear_register')[source]

Performs non-linear registration of an input file to a reference file.

name : string, optional
Name of the workflow.

nonlinear_register : nipype.pipeline.engine.Workflow

Workflow Inputs:

inputspec.input_brain : string (nifti file)
    File of brain to be normalized (registered)
inputspec.input_skull : string (nifti file)
    File of input brain with skull
inputspec.reference_brain : string (nifti file)
    Target brain file to normalize to
inputspec.reference_skull : string (nifti file)
    Target brain with skull to normalize to
inputspec.fnirt_config : string (fsl fnirt config file)
    Configuration file containing parameters that can be specified in fnirt

Workflow Outputs:

outputspec.output_brain : string (nifti file)
    Normalizion of input brain file
outputspec.linear_xfm : string (.mat file)
    Affine matrix of linear transformation of brain file
outputspec.invlinear_xfm : string
    Inverse of affine matrix of linear transformation of brain file
outputspec.nonlinear_xfm : string
    Nonlinear field coefficients file of nonlinear transformation

Registration Procedure:

  1. Perform a linear registration to get affine transformation matrix.
  2. Perform a nonlinear registration on an input file to the reference file utilizing affine transformation from the previous step as a starting point.
  3. Invert the affine transformation to provide the user a transformation (affine only) from the space of the reference file to the input file.

Workflow Graph:

workflows/../images/nonlinear_register.dot.png

Detailed Workflow Graph:

workflows/../images/nonlinear_register_detailed.dot.png
CPAC.registration.create_register_func_to_mni(name='register_func_to_mni')[source]

Registers a functional scan in native space to MNI standard space. This is meant to be used after create_nonlinear_register() has been run and relies on some of it’s outputs.

name : string, optional
Name of the workflow.

register_func_to_mni : nipype.pipeline.engine.Workflow

Workflow Inputs:

inputspec.func : string (nifti file)
    Input functional scan to be registered to MNI space
inputspec.mni : string (nifti file)
    Reference MNI file
inputspec.anat : string (nifti file)
    Corresponding anatomical scan of subject
inputspec.interp : string
    Type of interpolation to use ('trilinear' or 'nearestneighbour' or 'sinc')
inputspec.anat_to_mni_nonlinear_xfm : string (warp file)
    Corresponding anatomical native space to MNI warp file
inputspec.anat_to_mni_linear_xfm : string (mat file)
    Corresponding anatomical native space to MNI mat file

Workflow Outputs:

outputspec.func_to_anat_linear_xfm : string (mat file)
    Affine transformation from functional to anatomical native space
outputspec.func_to_mni_linear_xfm : string (mat file)
    Affine transformation from functional to MNI space
outputspec.mni_to_func_linear_xfm : string (mat file)
    Affine transformation from MNI to functional space
outputspec.mni_func : string (nifti file)
    Functional scan registered to MNI standard space

Workflow Graph:

workflows/../images/register_func_to_mni.dot.png

Detailed Workflow Graph:

workflows/../images/register_func_to_mni_detailed.dot.png
CPAC.registration.create_register_func_to_anat(name='register_func_to_anat')[source]

Registers a functional scan in native space to anatomical space using a linear transform and does not include bbregister.

name : string, optional
Name of the workflow.

create_register_func_to_anat : nipype.pipeline.engine.Workflow

Workflow Inputs:

inputspec.func : string (nifti file)
    Input functional scan to be registered to anatomical space
inputspec.anat : string (nifti file)
    Corresponding anatomical scan of subject
inputspec.interp : string
    Type of interpolation to use ('trilinear' or 'nearestneighbour' or 'sinc')

Workflow Outputs:

outputspec.func_to_anat_linear_xfm_nobbreg : string (mat file)
    Affine transformation from functional to anatomical native space
outputspec.anat_func_nobbreg : string (nifti file)
    Functional scan registered to anatomical space
CPAC.registration.create_bbregister_func_to_anat(name='bbregister_func_to_anat')[source]

Registers a functional scan in native space to structural. This is meant to be used after create_nonlinear_register() has been run and relies on some of it’s outputs.

name : string, optional
Name of the workflow.

register_func_to_anat : nipype.pipeline.engine.Workflow

Workflow Inputs:

inputspec.func : string (nifti file)
    Input functional scan to be registered to MNI space
inputspec.anat_skull : string (nifti file)
    Corresponding full-head scan of subject
inputspec.linear_reg_matrix : string (mat file)
    Affine matrix from linear functional to anatomical registration
inputspec.anat_wm_segmentation : string (nifti file)
    White matter segmentation probability mask in anatomical space
inputspec.bbr_schedule : string (.sch file)
    Boundary based registration schedule file for flirt command

Workflow Outputs:

outputspec.func_to_anat_linear_xfm : string (mat file)
    Affine transformation from functional to anatomical native space
outputspec.anat_func : string (nifti file)
    Functional data in anatomical space
CPAC.registration.create_wf_calculate_ants_warp(name='create_wf_calculate_ants_warp', mult_input=0)[source]

Calculates the nonlinear ANTS registration transform. This workflow employs the antsRegistration tool:

http://stnava.github.io/ANTs/

name : string, optional
Name of the workflow.

calc_ants_warp_wf : nipype.pipeline.engine.Workflow

Some of the inputs listed below are lists or lists of lists. This is because antsRegistration can perform multiple stages of calculations depending on how the user configures their registration.

For example, if one wants to employ a different metric (with different parameters) at each stage, the lists would be configured like this:

warp_wf.inputs.inputspec.transforms = [‘Rigid’,’Affine’,’SyN’] warp_wf.inputs.inputspec.transform_parameters = [[0.1],[0.1],[0.1,3,0]]

..where each element in the first list is a metric to be used at each stage, ‘Rigid’ being for stage 1, ‘Affine’ for stage 2, etc. The lists within the list for transform_parameters would then correspond to each stage’s metric, with [0.1] applying to ‘Rigid’ and ‘Affine’ (stages 1 and 2), and [0.1,3,0] applying to ‘SyN’ of stage 3.

In some cases, when a parameter is not needed for a stage, ‘None’ must be entered in its place if there are other parameters for other stages.

Workflow Inputs:

inputspec.anatomical_brain : string (nifti file)
    File of brain to be normalized (registered)
inputspec.reference_brain : string (nifti file)
    Target brain file to normalize to
inputspec.dimension : integer
    Dimension of the image (default: 3)
inputspec.use_histogram_matching : boolean
    Histogram match the images before registration
inputspec.winsorize_lower_quantile : float
    Winsorize data based on quantiles (lower range)
inputspec.winsorize_higher_quantile : float
    Winsorize data based on quantiles (higher range)
inputspec.metric : list of strings
    Image metric(s) to be used at each stage
inputspec.metric_weight : list of floats
    Modulate the per-stage weighting of the corresponding metric
inputspec.radius_or_number_of_bins : list of integers
    Number of bins in each stage for the MI and Mattes metric, the
    radius for other metrics
inputspec.sampling_strategy : list of strings
    Sampling strategy (or strategies) to use for the metrics
    {None, Regular, or Random}
inputspec.sampling_percentage : list of floats
    Defines the sampling strategy
    {float value, or None}
inputspec.number_of_iterations : list of lists of integers
    Determines the convergence
inputspec.convergence_threshold : list of floats
    Threshold compared to the slope of the line fitted in convergence
inputspec.convergence_window_size : list of integers
    Window size of convergence calculations
inputspec.transforms : list of strings
    Selection of transform options. See antsRegistration documentation
    for a full list of options and their descriptions
inputspec.transform_parameters : list of lists of floats
    Fine-tuning for the different transform options
inputspec.shrink_factors : list of lists of integers
    Specify the shrink factor for the virtual domain (typically the
    fixed image) at each level
inputspec.smoothing_sigmas : list of lists of floats
    Specify the sigma of gaussian smoothing at each level

Workflow Outputs:

outputspec.warp_field : string (nifti file)
    Output warp field of registration
outputspec.inverse_warp_field : string (nifti file)
    Inverse of the warp field of the registration
outputspec.ants_affine_xfm : string (.mat file)
    The affine matrix of the registration
outputspec.ants_inverse_affine_xfm : string (.mat file)
    The affine matrix of the reverse registration
outputspec.composite_transform : string (nifti file)
    The combined transform including the warp field and rigid & affine
    linear warps
outputspec.normalized_output_brain : string (nifti file)
    Template-registered version of input brain

Registration Procedure:

  1. Calculates a nonlinear anatomical-to-template registration.

Workflow Graph:

Detailed Workflow Graph:

CPAC.registration.create_wf_apply_ants_warp(map_node, name='create_wf_apply_ants_warp')[source]

Applies previously calculated ANTS registration transforms to input images. This workflow employs the antsApplyTransforms tool:

http://stnava.github.io/ANTs/

name : string, optional
Name of the workflow.

apply_ants_warp_wf : nipype.pipeline.engine.Workflow

Workflow Inputs:

inputspec.input_image : string (nifti file)
    Image file of brain to be registered to reference
inputspec.reference_image : string (nifti file)
    Image file of brain or template being used as a reference
inputspec.transforms : list of filepaths (nifti, .mat, .txt)
    List of transforms and warps to be applied to the input image
inputspec.dimension : integer
    Dimension value of image being registered (2, 3, or 4)
inputspec.interpolation : string
    Type of interpolation to be used. See antsApplyTransforms
    documentation or Nipype interface documentation for options

Workflow Outputs:

outputspec.output_image : string (nifti file)
    Normalized output file

Workflow Graph:

Detailed Workflow Graph:

CPAC.registration.create_wf_c3d_fsl_to_itk(map_node, input_image_type=0, name='create_wf_c3d_fsl_to_itk')[source]

Converts an FSL-format output matrix to an ITK-format (ANTS) matrix for use with ANTS registration tools.

name : string, optional
Name of the workflow.

fsl_to_itk_conversion : nipype.pipeline.engine.Workflow

Workflow Inputs:

inputspec.affine_file : string (nifti file)
    Output matrix of FSL-based functional to anatomical registration
inputspec.reference_file : string (nifti file)
    File of skull-stripped anatomical brain to be used in affine
    conversion
inputspec.source_file : string (nifti file)
    Should match the input of the apply warp (in_file) unless you are
    applying the warp to a 4-d file, in which case this file should
    be a mean_functional file

Workflow Outputs:

outputspec.itk_transform : string (nifti file)
    Converted affine transform in ITK format usable with ANTS
CPAC.registration.create_wf_collect_transforms(map_node, name='create_wf_collect_transforms')[source]

DOCSTRINGS

name : string, optional
Name of the workflow.

collect_transforms_wf : nipype.pipeline.engine.Workflow

Workflow Inputs:

inputspec.transform_file : string (nifti file)
    Output matrix of FSL-based functional to anatomical registration
inputspec.reference_file : string (nifti file)
    File of skull-stripped anatomical brain to be used in affine
    conversion
inputspec.source_file : string (nifti file)
    Should match the input of the apply warp (in_file) unless you are
    applying the warp to a 4-d file, in which case this file should
    be a mean_functional file

Workflow Outputs:

outputspec.itk_transform : string (nifti file)
    Converted affine transform in ITK format usable with ANTS