cmp.stages.segmentation.segmentation module¶
Definition of config and stage classes for segmentation.
-
class
cmp.stages.segmentation.segmentation.SegmentationConfig[source]¶ Bases:
traits.has_traits.HasTraitsClass used to store configuration parameters of a
SegmentationStageobject.-
seg_tool¶ Choice of segmentation tool that can be “Freesurfer”
- Type
traits.Enum([“Freesurfer”])
-
make_isotropic¶ Resample to isotropic resolution (Default: False)
- Type
traits.Bool
-
isotropic_vox_size¶ Isotropic resolution to be resampled (Default: 1.2, desc=’’)
- Type
traits.Float
-
isotropic_interpolation¶ Interpolation type used for resampling that can be: ‘cubic’, ‘weighted’, ‘nearest’, ‘sinc’, or ‘interpolate’, (Default: ‘cubic’)
- Type
traits.Enum
-
brain_mask_extraction_tool¶ Choice of brain extraction tool: “Freesurfer”, “BET”, or “ANTs” (Default: Freesurfer)
- Type
traits.Enum
-
ants_templatefile¶ Anatomical template used by ANTS brain extraction
- Type
traits.File
-
ants_probmaskfile¶ Brain probability mask used by ANTS brain extraction
- Type
traits.File
-
ants_regmaskfile¶ Mask (defined in the template space) used during registration in ANTs brain extraction. To limit the metric computation to a specific region.
- Type
traits.File
-
use_fsl_brain_mask¶ Use FSL BET for brain extraction (Default: False)
- Type
traits.Bool
-
brain_mask_path¶ Custom brain mask path
- Type
traits.File
-
use_existing_freesurfer_data¶ (Default: False)
- Type
traits.Bool
-
freesurfer_subjects_dir¶ Freesurfer subjects directory path usually
/output_dir/freesurfer- Type
traits.Str
-
freesurfer_subject_id¶ Freesurfer subject (being processed) ID in the form
sub-XX(_ses-YY)- Type
traits.Str
-
freesurfer_args¶ Extra Freesurfer
recon-allarguments- Type
traits.Str
-
white_matter_mask¶ Custom white-matter mask
- Type
traits.File
-
number_of_threads¶ Number of threads leveraged by OpenMP and used in the stage by Freesurfer and ANTs (Default: 1)
- Type
traits.Int
-
-
class
cmp.stages.segmentation.segmentation.SegmentationStage(bids_dir, output_dir)[source]¶ Bases:
cmp.stages.common.StageClass that represents the segmentation stage of a
AnatomicalPipeline.-
create_workflow()[source]¶ Create the workflow of the
SegmentationStage
See also
cmp.pipelines.anatomical.anatomical.AnatomicalPipeline,cmp.stages.segmentation.segmentation.SegmentationConfig-
create_workflow(flow, inputnode, outputnode)[source]¶ Create the stage worflow.
- Parameters
flow (nipype.pipeline.engine.Workflow) – The nipype.pipeline.engine.Workflow instance of the anatomical 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
-