qsiprep.workflows.anatomical.volume module

Anatomical reference preprocessing workflows

qsiprep.workflows.anatomical.volume.init_anat_preproc_wf(num_anat_images, num_additional_t2ws, has_rois, anatomical_template, name='anat_preproc_wf')[source]

This workflow controls the anatomical preprocessing stages of qsiprep.

This includes:

  • Creation of a structural template (AC-PC aligned)

  • Skull-stripping and bias correction

  • Tissue segmentation

  • Normalization

(Source code)

Parameters:
  • num_anat_images (int) – Number of anatomical images available in the chosen modality

  • num_additional_t2ws (int) – If anat modality is T1w and there are available T2ws that can be used by DRBUDDI, how many are there?

  • has_rois (bool) – Are there lesion ROI files?

Inputs:
  • t1w – List of T1-weighted structural images

  • t2w – List of T2-weighted structural images

  • roi – A mask to exclude regions during standardization (as list)

  • subjects_dir – FreeSurfer SUBJECTS_DIR

Outputs:
  • t1_preproc – Bias-corrected structural template, defining T1w space

  • t1_brain – Skull-stripped t1_preproc

  • t1_mask – Mask of the skull-stripped template image

  • t1_seg – Segmentation of preprocessed structural image, including gray-matter (GM), white-matter (WM) and cerebrospinal fluid (CSF)

  • t1_tpms – List of tissue probability maps in T1w space

  • t2_preproc – List of preprocessed t2w files

  • t1_2_mni – T1w template, normalized to MNI space

  • t1_2_mni_forward_transform – ANTs-compatible affine-and-warp transform file

  • t1_2_mni_reverse_transform – ANTs-compatible affine-and-warp transform file (inverse)

  • t1_resampling_grid – Image of the preprocessed t1 to be used as the reference output for dwis

qsiprep.workflows.anatomical.volume.init_anat_derivatives_wf(anatomical_template) LiterateWorkflow[source]

Set up a battery of datasinks to store derivatives in the right location

qsiprep.workflows.anatomical.volume.init_anat_normalization_wf(anatomical_template, has_rois=False) LiterateWorkflow[source]

This workflow performs registration from the original anatomical reference to the template anatomical reference.

(Source code)

Parameters:

has_rois (bool) – Whether Registration should account for regions to exclude

Inputs:
  • in_file – T1-weighted structural image to skull-strip

  • roi – A mask to exclude regions during standardization (as list)

Outputs:
  • to_template_nonlinear_transform – Bias-corrected in_file, before skull-stripping

  • to_template_rigid_transform – Skull-stripped in_file

  • out_mask – Binary mask of the skull-stripped in_file

  • out_report – Reportlet visualizing quality of skull-stripping

qsiprep.workflows.anatomical.volume.init_anat_preproc_wf(num_anat_images, num_additional_t2ws, has_rois, anatomical_template, name='anat_preproc_wf')[source]

This workflow controls the anatomical preprocessing stages of qsiprep.

This includes:

  • Creation of a structural template (AC-PC aligned)

  • Skull-stripping and bias correction

  • Tissue segmentation

  • Normalization

(Source code)

Parameters:
  • num_anat_images (int) – Number of anatomical images available in the chosen modality

  • num_additional_t2ws (int) – If anat modality is T1w and there are available T2ws that can be used by DRBUDDI, how many are there?

  • has_rois (bool) – Are there lesion ROI files?

Inputs:
  • t1w – List of T1-weighted structural images

  • t2w – List of T2-weighted structural images

  • roi – A mask to exclude regions during standardization (as list)

  • subjects_dir – FreeSurfer SUBJECTS_DIR

Outputs:
  • t1_preproc – Bias-corrected structural template, defining T1w space

  • t1_brain – Skull-stripped t1_preproc

  • t1_mask – Mask of the skull-stripped template image

  • t1_seg – Segmentation of preprocessed structural image, including gray-matter (GM), white-matter (WM) and cerebrospinal fluid (CSF)

  • t1_tpms – List of tissue probability maps in T1w space

  • t2_preproc – List of preprocessed t2w files

  • t1_2_mni – T1w template, normalized to MNI space

  • t1_2_mni_forward_transform – ANTs-compatible affine-and-warp transform file

  • t1_2_mni_reverse_transform – ANTs-compatible affine-and-warp transform file (inverse)

  • t1_resampling_grid – Image of the preprocessed t1 to be used as the reference output for dwis

qsiprep.workflows.anatomical.volume.init_anat_reports_wf() LiterateWorkflow[source]

Set up a battery of datasinks to store reports in the right location

qsiprep.workflows.anatomical.volume.init_anat_template_wf(num_images) LiterateWorkflow[source]

This workflow generates a canonically oriented structural template from input anatomical images.

(Source code)

Parameters:

num_images (int) – Number of anatomical images

Inputs:

anatomical_images – List of structural images

Outputs:
  • template – Structural template, defining T1w space

  • template_transforms – List of affine transforms from template to original images

  • out_report – Conformation report

qsiprep.workflows.anatomical.volume.init_dl_prep_wf(name='dl_prep_wf') LiterateWorkflow[source]

Prepare images for use in the FreeSurfer deep learning functions

qsiprep.workflows.anatomical.volume.init_output_grid_wf() LiterateWorkflow[source]

Generate a non-oblique, uniform voxel-size grid around a brain.

qsiprep.workflows.anatomical.volume.init_synthseg_wf() LiterateWorkflow[source]
qsiprep.workflows.anatomical.volume.init_synthstrip_wf(do_padding=False, unfatsat=False, name='synthstrip_wf') LiterateWorkflow[source]
qsiprep.workflows.anatomical.volume.init_t2w_preproc_wf(num_t2ws, name='t2w_preproc_wf')[source]

If T1w is the anatomical contrast, you may also want to process the T2ws for worlflows that can use them (ie DRBUDDI). This