xcp_d.workflows.anatomical module
Anatomical post-processing workflows.
- xcp_d.workflows.anatomical.init_ants_xfm_to_fsl_wf(mem_gb, omp_nthreads, name='ants_xfm_to_fsl_wf')[source]
Modify ANTS-style fMRIPrep transforms to work with Connectome Workbench/FSL FNIRT.
- Workflow Graph
-
(Source code, png, svg, pdf)
- Parameters:
- Inputs:
anat_to_template_xfm – ANTS/fMRIPrep-style H5 transform from T1w image to template.
template_to_anat_xfm – ANTS/fMRIPrep-style H5 transform from template to T1w image.
- Outputs:
world_xfm – TODO: Add description.
merged_warpfield – TODO: Add description.
merged_inv_warpfield – TODO: Add description.
- xcp_d.workflows.anatomical.init_generate_hcp_surfaces_wf(name='generate_hcp_surfaces_wf')[source]
Generate midthickness, inflated, and very-inflated HCP-style surfaces.
- Workflow Graph
- Parameters:
name (
str
, optional) – Name of the workflow. This is used for working directories and workflow graphs. Default is “generate_hcp_surfaces_wf”.- Inputs:
- xcp_d.workflows.anatomical.init_postprocess_anat_wf(t1w_available, t2w_available, target_space, 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
- Parameters:
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.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:
- xcp_d.workflows.anatomical.init_postprocess_surfaces_wf(subject_id, mesh_available, standard_space_mesh, morphometry_files, t1w_available, t2w_available, name='postprocess_surfaces_wf')[source]
Postprocess surfaces.
- Workflow Graph
- Parameters:
subject_id
mesh_available (bool)
standard_space_mesh (bool)
morphometry_files (list of str)
t1w_available (bool) – True if a T1w image is available.
t2w_available (bool) – True if a T2w image is available.
name (
str
, optional) – Name of the workflow. This is used for working directories and workflow graphs. Default is “postprocess_surfaces_wf”.
- Inputs:
t1w – Preprocessed T1w file. May be in native or standard space.
t2w – Preprocessed T2w file. May be in native or standard space.
anat_to_template_xfm (
str
) – Path to the T1w-to-MNI transform file. May be “identity”, for testing purposes.template_to_anat_xfm (
str
) – Path to the MNI-to-T1w transform file. May be “identity”, for testing purposes.lh_pial_surf, rh_pial_surf
lh_wm_surf, rh_wm_surf
sulcal_depth
sulcal_curv
cortical_thickness
cortical_thickness_corr
myelin
myelin_smoothed
- xcp_d.workflows.anatomical.init_warp_one_hemisphere_wf(participant_id, hemisphere, mem_gb, omp_nthreads, name='warp_one_hemisphere_wf')[source]
Apply transforms to warp one hemisphere’s surface files into standard space.
- Workflow Graph
-
(Source code, png, svg, pdf)
- Parameters:
- Inputs:
hemi_files (list of str) – A list of surface files for the requested hemisphere, in fsnative space.
world_xfm
merged_warpfield
merged_inv_warpfield
freesurfer_path – Path to FreeSurfer derivatives. Used to load the subject’s sphere file.
segmentation_software ({“FreeSurfer”, “MCRIBS”}) – The software used for the segmentation.
participant_id – Set from parameters.
- Outputs:
warped_hemi_files
- xcp_d.workflows.anatomical.init_warp_surfaces_to_template_wf(fmri_dir, subject_id, output_dir, omp_nthreads, name='warp_surfaces_to_template_wf')[source]
Transform surfaces from native to standard fsLR-32k space.
- Workflow Graph
-
(Source code, png, svg, pdf)
- Parameters:
fmri_dir (
str
) – Path to the preprocessed derivatives dataset. For example, “/path/to/dset/derivatives/fmriprep/”.subject_id (
str
) – The participant ID. This SHOULD NOT include thesub-
prefix.output_dir (
str
) – Path to the output directory forxcp_d
derivatives. For example, “/path/to/dset/derivatives/xcp_d”.As of version 0.7.0, ‘xcp_d’ will not be appended to the output directory.
omp_nthreads (
int
) – Maximum number of threads an individual process may use.name (
str
, optional) – Name of the workflow. This is used for working directories and workflow graphs. Default is “warp_surfaces_to_template_wf”.
- Inputs:
anat_to_template_xfm (
str
) – Path to the T1w-to-MNI transform file. May be “identity”, for testing purposes. The template in question should match the volumetric space of the BOLD CIFTI files being processed by the main xcpd workflow. For example, MNI152NLin6Asym for fsLR-space CIFTIs.template_to_anat_xfm (
str
) – Path to the MNI-to-T1w transform file. May be “identity”, for testing purposes. The template in question should match the volumetric space of the BOLD CIFTI files being processed by the main xcpd workflow. For example, MNI152NLin6Asym for fsLR-space CIFTIs.lh_pial_surf, rh_pial_surf (
str
) – Left- and right-hemisphere pial surface files in fsnative space.lh_wm_surf, rh_wm_surf (
str
) – Left- and right-hemisphere smoothed white matter surface files in fsnative space.
- Outputs: