cmp.pipelines.diffusion.diffusion module¶
Diffusion pipeline Class definition.
-
class
cmp.pipelines.diffusion.diffusion.
DiffusionPipeline
(project_info)[source]¶ Bases:
cmp.pipelines.common.Pipeline
Class that extends a
Pipeline
and represents the processing pipeline for diffusion MRI.It is composed of the preprocessing stage that preprocesses dMRI, the registration stage that co-registers T1w to the diffusion B0 and projects the parcellations to the native diffusion space, the diffusion stage that estimates tensors or fiber orientation distributions functions from the diffusion signal and reconstructs fiber using tractography, and finally the connectome stage that combines the output tractogram with the parcellations to create the structural connectivity matrices.
See also
cmp.stages.preprocessing.preprocessing.PreprocessingStage
,cmp.stages.registration.registration.RegistrationStage
,cmp.stages.diffusion.diffusion.DiffusionStage
,cmp.stages.connectome.connectome.ConnectomeStage
-
check_config
()[source]¶ Check if the list output formats in the configuration of the connectome stage is not empty.
- Returns
message – String that is empty if success, otherwise it contains the error message
- Return type
string
-
check_input
(layout, gui=True)[source]¶ Check if input of the diffusion pipeline are available.
- Parameters
layout (bids.BIDSLayout) – Instance of BIDSLayout
gui (traits.Bool) – Boolean used to display different messages but not really meaningful anymore since the GUI components have been migrated to
cmp.bidsappmanager
- Returns
valid_inputs – True if inputs are available
- Return type
traits.Bool
-
create_pipeline_flow
(cmp_deriv_subject_directory, nipype_deriv_subject_directory)[source]¶ Create the pipeline workflow.
- Parameters
cmp_deriv_subject_directory (Directory) – Main CMP output directory of a subject e.g.
/output_dir/cmp/sub-XX/(ses-YY)
nipype_deriv_subject_directory (Directory) – Intermediate Nipype output directory of a subject e.g.
/output_dir/nipype/sub-XX/(ses-YY)
- Returns
diffusion_flow – An instance of
nipype.pipeline.engine.Workflow
- Return type
nipype.pipeline.engine.Workflow
-
define_custom_mapping
(custom_last_stage)[source]¶ Define the pipeline to be executed until a specific stages.
Not used yet by CMP3.
- Parameters
custom_last_stage (string) – Last stage to execute. Valid values are: “Preprocessing”, “Registration”, “Diffusion” and “Connectome”.
-
global_conf
= <cmp.pipelines.diffusion.diffusion.Global_Configuration object>¶
-
input_folders
= ['anat', 'dwi']¶
-
now
= '20210308_0631'¶
-
ordered_stage_list
= ['Preprocessing', 'Registration', 'Diffusion', 'Connectome']¶
-
update_outputs_recon
(new)[source]¶ Update list of of outputs of the diffusion stage when
recon_processing_tool
is updated.- Parameters
new (string) – New value.
-
update_outputs_tracking
(new)[source]¶ Update list of of outputs of the diffusion stage when
tracking_processing_tool
is updated.- Parameters
new (string) – New value.
-
-
class
cmp.pipelines.diffusion.diffusion.
Global_Configuration
[source]¶ Bases:
traits.has_traits.HasTraits
Global pipeline configurations.
-
process_type
¶ Processing pipeline type
- Type
‘fMRI’
-
subjects
¶ List of subjects ID (in the form
sub-XX
)- Type
traits.List
-
subject
¶ Subject to be processed (in the form
sub-XX
)- Type
traits.Str
-
subject_session
¶ Subject session to be processed (in the form
ses-YY
)- Type
traits.Str
-
modalities
¶ List of available diffusion modalities red from the
acq-<modality>
filename keyword- Type
traits.List
-
dmri_bids_acq
¶ Diffusion modality to be processed
- Type
traits.Str
-