cmp.stages.registration.registration module
Definition of config and stage classes for MRI co-registration.
- class cmp.stages.registration.registration.RegistrationConfig[source]
Bases:
traits.has_traits.HasTraits
Class used to store configuration parameters of a
RegistrationStage
instance.- pipeline
Pipeline type (Default: “Diffusion”)
- Type
traits.Enum([“Diffusion”, “fMRI”])
- registration_mode_trait
Choices of registration tools updated depending on the
pipeline
type. (Default: [‘FSL’, ‘ANTs’] if “Diffusion”, [‘FSL’, ‘BBregister (FS)’] if “fMRI”)- Type
traits.List([‘FSL’, ‘ANTs’, ‘BBregister (FS)’])
- registration_mode
Registration tool used from the
registration_mode_trait
list (Default: ‘ANTs’)- Type
traits.Str
- diffusion_imaging_model
Diffusion imaging model (‘DTI’ for instance)
- Type
traits.Str
- use_float_precision
Use ‘single’ instead of ‘double’ float representation to reduce memory usage of ANTs (Default: False)
- Type
traits.Bool
- ants_interpolation
Interpolation type used by ANTs that can be: ‘Linear’, ‘NearestNeighbor’, ‘CosineWindowedSinc’, ‘WelchWindowedSinc’, ‘HammingWindowedSinc’, ‘LanczosWindowedSinc’, ‘BSpline’, ‘MultiLabel’, or ‘Gaussian’ (Default: ‘Linear’)
- Type
traits.Enum
- ants_bspline_interpolation_parameters
ANTs BSpline interpolation parameters (Default: traits.Tuple(Int(3)))
- Type
traits.Tuple
- ants_gauss_interpolation_parameters
ANTs Gaussian interpolation parameters (Default: traits.Tuple(Float(5), Float(5)))
- Type
traits.Tuple
- ants_multilab_interpolation_parameters
ANTs Multi-label interpolation parameters (Default: traits.Tuple(Float(5), Float(5)))
- Type
traits.Tuple
- ants_lower_quantile
ANTs lower quantile (Default: 0.005)
- Type
traits.Float
- ants_upper_quantile
ANTs upper quantile (Default: 0.995)
- Type
traits.Float
- ants_convergence_thresh
ANTs convergence threshold (Default: 1e-06)
- Type
traits.Float
- ants_convergence_winsize
ANTs convergence window size (Default: 10)
- Type
traits.Int
- ants_linear_gradient_step
ANTS linear gradient step size (Default: 0.1)
- Type
traits.Float
- ants_linear_cost
Metric used by ANTs linear registration phase that can be ‘CC’, ‘MeanSquares’, ‘Demons’, ‘GC’, ‘MI’, or ‘Mattes’ (Default: ‘MI’)
- Type
traits.Enum
- ants_linear_sampling_strategy
ANTS sampling strategy for the linear registration phase that can be ‘None’, ‘Regular’, or ‘Random’ (Default: ‘Regular’)
- Type
traits.Enum
- ants_linear_sampling_perc
Percentage used if random sampling strategy is employed in the linear registration phase (Default: 0.25)
- Type
traits.Float
- ants_perform_syn
(Default: True)
- Type
traits.Bool
- ants_nonlinear_gradient_step
(Default: 0.1)
- Type
traits.Float
- ants_nonlinear_cost
Metric used by ANTs nonlinear (SyN) registration phase that can be ‘CC’, ‘MeanSquares’, ‘Demons’, ‘GC’, ‘MI’, or ‘Mattes’ (Default: ‘CC’)
- Type
traits.Enum
- ants_nonlinear_update_field_variance
Weight to update field variance in ANTs nonlinear (SyN) registration phase (Default: 3.0)
- Type
traits.Float
- ants_nonlinear_total_field_variance
Weight to give to total field variance in ANTs nonlinear (SyN) registration phase (Default: 0.0)
- Type
traits.Float
- flirt_args
FLIRT extra arguments that will be append to the FSL FLIRT command (Default: None)
- Type
traits.Str
- uses_qform
FSL FLIRT uses qform (Default: True)
- Type
traits.Bool
- dof
Specify number of degree-of-freedom to FSL FLIRT (Default: 6)
- Type
traits.Int
- fsl_cost
Metric used by FSL registration that can be ‘mutualinfo’, ‘corratio’, ‘normcorr’, ‘normmi’, ‘leastsq’, or ‘labeldiff’ (Default: ‘normmi’)
- Type
traits.Enum
- no_search
Enable FSL FLIRT “no search” option (Default: True)
- Type
traits.Bool
- init
Initialization type of FSL registration: ‘spm’, ‘fsl’, or ‘header’ (Default: ‘smp’)
- Type
traits.Enum(‘header’, [‘spm’, ‘fsl’, ‘header’])
- contrast_type
Contrast type specified to BBRegister: ‘t1’, ‘t2’, or ‘dti’ (Default: ‘dti’)
- Type
traits.Enum(‘dti’, [‘t1’, ‘t2’, ‘dti’])
- apply_to_eroded_wm
Apply estimated transform to eroded white-matter mask (Default: True)
- Type
traits.Bool
- apply_to_eroded_csf
Apply estimated transform to eroded cortico spinal fluid mask (Default: True)
- Type
traits.Bool
- apply_to_eroded_brain
Apply estimated transform to eroded brain mask (Default: False)
- Type
traits.Bool
- tracking_tool
Tool used for tractography
- Type
Enum([‘Dipy’, ‘MRtrix’])
- act_tracking
True if Anatomically-Constrained or Particle Filtering Tractography is enabled (Default: False)
- Type
traits.Bool
- gmwmi_seeding
True if tractography seeding is performed from the gray-matter / white-matter interface (Default: False)
- Type
traits.Bool
- class cmp.stages.registration.registration.RegistrationStage(pipeline_mode, fs_subjects_dir=None, fs_subject_id=None, bids_dir='', output_dir='')[source]
Bases:
cmp.stages.common.Stage
Class that represents the registration stage of both
DiffusionPipeline
andfMRIPipeline
.- fs_subjects_dir
Freesurfer subjects directory (needed by BBRegister)
- Type
traits.Directory
- fs_subject_id
Freesurfer subject (being processed) directory (needed by BBRegister)
- Type
traits.Str
- create_workflow()[source]
Create the workflow of the
RegistrationStage
See also
cmp.pipelines.diffusion.diffusion.DiffusionPipeline
,cmp.pipelines.functional.fMRI.fMRIPipeline
,cmp.stages.registration.registration.RegistrationConfig
- create_ants_workflow(flow, inputnode, outputnode)[source]
Create the registration workflow using ANTs.
- Parameters
flow (nipype.pipeline.engine.Workflow) – The nipype.pipeline.engine.Workflow instance of the Diffusion pipeline
inputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the inputs of the stage
outputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the outputs of the stage
- create_bbregister_workflow(flow, inputnode, outputnode)[source]
Create the workflow of the registration stage using FreeSurfer BBRegister.
- Parameters
flow (nipype.pipeline.engine.Workflow) – The nipype.pipeline.engine.Workflow instance of the fMRI pipeline
inputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the inputs of the stage
outputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the outputs of the stage
- create_flirt_workflow(flow, inputnode, outputnode)[source]
Create the workflow of the registration stage using FSL FLIRT.
- Parameters
flow (nipype.pipeline.engine.Workflow) – The nipype.pipeline.engine.Workflow instance of either the Diffusion pipeline or the fMRI pipeline
inputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the inputs of the stage
outputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the outputs of the stage
- create_workflow(flow, inputnode, outputnode)[source]
Create the stage workflow.
- Parameters
flow (nipype.pipeline.engine.Workflow) – The nipype.pipeline.engine.Workflow instance of either the Diffusion pipeline or the fMRI pipeline
inputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the inputs of the stage
outputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the outputs of the stage