xcp_d.workflows.parcellation module
Workflows for parcellating imaging data.
- xcp_d.workflows.parcellation.init_load_atlases_wf(name='load_atlases_wf')[source]
Load atlases and warp them to the same space as the BOLD file.
- Workflow Graph
- Parameters:
name (
str, optional) – Name of the workflow. This is used for working directories and workflow graphs. Default is “load_atlases_wf”.- Inputs:
name_source (
str) – Path to the file that will be used as thesource_filefor derivatives. This is generally the preprocessed BOLD file. This file does not need to exist (e.g., in the case of a concatenated version of the filename).bold_file
- Outputs:
atlas_files
atlas_labels_files
- xcp_d.workflows.parcellation.init_parcellate_cifti_wf(mem_gb, compute_mask=True, name='parcellate_cifti_wf')[source]
Parcellate a CIFTI file using a set of atlases.
Part of the parcellation includes applying vertex-wise and node-wise masks.
Vertex-wise masks are typically calculated from the full BOLD run, wherein any vertex that has a time series of all zeros or NaNs is excluded. Additionally, if any volumes in a vertex’s time series are NaNs, that vertex will be excluded.
The node-wise mask is determined based on the vertex-wise mask and the workflow’s coverage threshold. Any nodes in the atlas with less than the coverage threshold’s % of vertices retained by the vertex-wise mask will have that node’s time series set to NaNs.
- Workflow Graph
(Source code, png, svg, pdf)
- Parameters:
mem_gb (
dict) – Dictionary of memory allocations.compute_mask (
bool) – Whether to compute a vertex-wise mask for the CIFTI file. When processing full BOLD runs, this should be True. When processing truncated BOLD runs or scalar maps, this should be False, and the vertex-wise mask should be provided via the inputnode.. Default is True.name (
str) – Workflow name. Default is “parcellate_cifti_wf”.
- Inputs:
in_file – CIFTI file to parcellate.
atlas_files – List of CIFTI atlas files.
atlas_labels_files – List of TSV atlas labels files.
vertexwise_coverage – Vertex-wise coverage mask. Only used if compute_mask is False.
coverage_cifti – Coverage CIFTI files. One for each atlas. Only used if compute_mask is False.
- Outputs:
parcellated_cifti – Parcellated CIFTI files. One for each atlas.
parcellated_tsv – Parcellated TSV files. One for each atlas.
vertexwise_coverage – Vertex-wise coverage mask. Only output if compute_mask is True.
coverage_cifti – Coverage CIFTI files. One for each atlas. Only output if compute_mask is True.
coverage_tsv – Coverage TSV files. One for each atlas. Only output if compute_mask is True.