xcp_d.workflows.anatomical.init_postprocess_anat_wf

xcp_d.workflows.anatomical.init_postprocess_anat_wf(output_dir, input_type, t1w_available, t2w_available, target_space, dcan_qc, omp_nthreads, mem_gb, name='postprocess_anat_wf')[source]

Copy T1w, segmentation, and, optionally, T2w to the derivative directory.

If necessary, this workflow will also warp the images to standard space.

Workflow Graph

(Source code)

Parameters:
  • output_dir (str) – Path to the output directory for xcp_d derivatives. This should not include the xcp_d folder. For example, “/path/to/dset/derivatives/”.

  • input_type ({“fmriprep”, “dcan”, “hcp”, “nibabies”}) – The format of the incoming preprocessed BIDS derivatives. DCAN- and HCP-format derivatives will automatically be converted to a more BIDS-compliant format. fMRIPrep and Nibabies derivatives are assumed to be roughly equivalent in terms of file organization and naming.

  • t1w_available (bool) – True if a preprocessed T1w is available, False if not.

  • t2w_available (bool) – True if a preprocessed T2w is available, False if not.

  • target_space (str) – Target NIFTI template for T1w.

  • dcan_qc (bool) – This flag determines if DCAN-related QC steps will be taken. Enabling this flag will trigger the following steps:

    1. Brainsprite figures will be generated.

    2. The executive summary will be generated.

    3. DCAN QC files will be generated.

  • omp_nthreads (int) – Maximum number of threads an individual process may use.

  • mem_gb (float) – Memory limit, in gigabytes.

  • name (str, optional) – Name of the workflow. This is used for working directories and workflow graphs. Default is “postprocess_anat_wf”.

Inputs:
  • t1w (str) – Path to the preprocessed T1w file. This file may be in standard space or native T1w space.

  • t2w (str or None) – Path to the preprocessed T2w file. This file may be in standard space or native T1w space.

  • anat_dseg (str) – Path to the T1w segmentation file.

  • anat_to_template_xfm (str) – Path to the T1w-to-MNI transform file. May be “identity”, for testing purposes. We need to use MNI152NLin6Asym for the template.

  • template (str) – The target template.

Outputs:
  • t1w (str) – Path to the preprocessed T1w file in standard space.

  • t2w (str or None) – Path to the preprocessed T2w file in standard space.