cmp.stages.diffusion.diffusion module¶
Definition of config and stage classes for diffusion reconstruction and tractography.
-
class
cmp.stages.diffusion.diffusion.
DiffusionConfig
[source]¶ Bases:
traits.has_traits.HasTraits
Class used to store configuration parameters of a
DiffusionStage
instance.-
diffusion_imaging_model_editor
¶ Available diffusion imaging models
- Type
[‘DSI’, ‘DTI’, ‘HARDI’, ‘multishell’]
-
diffusion_imaging_model
¶ Selected diffusion imaging model (Default: ‘DTI’)
- Type
traits.Str
-
dilate_rois
¶ Dilate parcellation regions-of-interest (Default: True)
- Type
traits.Bool
-
dilation_kernel
¶ Type of dilation kernel to used
- Type
traits.Enum([‘Box’, ‘Gauss’, ‘Sphere’])
-
dilation_radius
¶ Radius of the dilation kernel
- Type
traits.Enum([1, 2, 3, 4])
-
recon_processing_tool_editor
¶ List of processing tools available for diffusion signal reconstruction
- Type
[‘Dipy’, ‘MRtrix’]
-
tracking_processing_tool_editor
¶ List of processing tools available for tractography
- Type
[‘Dipy’, ‘MRtrix’]
-
processing_tool_editor
¶ List of processing tools available for diffusion signal reconstruction and tractography
- Type
[‘Dipy’, ‘MRtrix’]
-
recon_processing_tool
¶ Processing tool to use for diffusion signal modeling (Default: ‘MRtrix’)
- Type
traits.Str
-
tracking_processing_tool
¶ Processing tool to use for tractography (Default: ‘MRtrix’)
- Type
traits.Str
-
custom_track_file
¶ Custom tractogram file to used as input to the connectome stage (obsolete)
- Type
traits.File
-
dipy_recon_config
¶ Configuration instance of the Dipy reconstruction stage
- Type
Instance(HasTraits)
-
mrtrix_recon_config
¶ Configuration instance of the MRtrix3 reconstruction stage
- Type
Instance(HasTraits)
-
dipy_tracking_config
¶ Configuration instance of the Dipy tracking (tractography) stage
- Type
Instance(HasTraits)
-
mrtrix_tracking_config
¶ Configuration instance of the MRtrix3 tracking (tractography) stage
- Type
Instance(HasTraits)
-
diffusion_model_editor
¶ List of types of available local tractography algorithms.
- Type
[‘Deterministic’, ‘Probabilistic’]
-
diffusion_model
¶ Type of local tractography algorithm to use. (Default: ‘Probabilistic’)
- Type
traits.Str
See also
cmp.stages.diffusion.reconstruction.Dipy_recon_config
,cmp.stages.diffusion.reconstruction.MRtrix_recon_config
,cmp.stages.diffusion.tracking.Dipy_tracking_config
,cmp.stages.diffusion.tracking.MRtrix_tracking_config
,cmp.stages.diffusion.diffusion.DiffusionStage
-
update_dipy_tracking_SD
(new)[source]¶ Update
SD
ofdipy_tracking_config
whenlocal_model
is updated.- Parameters
new (string) – New value of
local_model
-
-
class
cmp.stages.diffusion.diffusion.
DiffusionStage
(bids_dir, output_dir)[source]¶ Bases:
cmp.stages.common.Stage
Class that represents the diffusion stage of a
DiffusionPipeline
.The diffusion stage workflow is composed of two sub-workflows: 1.
recon_flow
that estimates tensors or fiber orientation distribution functions from dMRI, 2.track_flow
that runs tractography from the output ofrecon_flow
.-
create_workflow
()[source]¶ Create the workflow of the
DiffusionStage
See also
cmp.pipelines.diffusion.diffusion.DiffusionPipeline
,cmp.stages.diffusion.diffusion.DiffusionConfig
,cmp.stages.diffusion.reconstruction.Dipy_recon_config
,cmp.stages.diffusion.reconstruction.MRtrix_recon_config
,cmp.stages.diffusion.tracking.Dipy_tracking_config
,cmp.stages.diffusion.tracking.MRtrix_tracking_config
,cmp.stages.diffusion.reconstruction.create_dipy_recon_flow
,cmp.stages.diffusion.reconstruction.create_mrtrix_recon_flow
,cmp.stages.diffusion.tracking.create_dipy_tracking_flow
,cmp.stages.diffusion.tracking.create_mrtrix_tracking_flow
-
create_workflow
(flow, inputnode, outputnode)[source]¶ Create the stage worflow.
- 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
-
-
cmp.stages.diffusion.diffusion.
strip_suffix
(file_input, prefix)[source]¶ Extract path of
file_input
and addprefix
to generate a prefix path for outputs.- Parameters
file_input (os.path.abspath) – Absolute path to an input file
prefix (os.path) – Prefix to used in the generation of the output prefix path.
- Returns
out_prefix_path – The generated prefix path
- Return type
os.path