Skip to content

Commit

Permalink
Clarify that warped surfaces can be overlaid on the MNI152NLin6Asym t…
Browse files Browse the repository at this point in the history
…emplate (#1349)
  • Loading branch information
tsalo authored Jan 2, 2025
1 parent 43c649a commit 0e8fe76
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/outputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ The resulting mesh files will reflect the subject's morphology with the same geo
as fsLR-32k surfaces, which may be useful for visualizing fsLR-space derivatives on a subject's
brain.

The mesh files are also warped so that they can be overlaid on top of the MNI152NLin6Asym template,
as in XCP-D's brainsprite.

.. code-block::
xcp_d/
Expand Down
3 changes: 2 additions & 1 deletion xcp_d/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,9 @@ def _build_parser():
help="""\
If used, a workflow will be run to warp native-space (``fsnative``) reconstructed cortical
surfaces (``surf.gii`` files) produced by Freesurfer into standard (``fsLR``) space.
Additionally, the fsLR-space surfaces will be warped such that they can be overlaid on the
MNI152NLin6Asym template.
These surface files are primarily used for visual quality assessment.
By default, this workflow is disabled.
**IMPORTANT**: This parameter can only be run if the --file-format flag is set to cifti.
""",
Expand Down
13 changes: 10 additions & 3 deletions xcp_d/workflows/anatomical/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def init_postprocess_surfaces_wf(
they will be copied to the output directory.
These fsLR-space mesh files retain the subject's morphology,
and are thus useful for visualizing fsLR-space statistical derivatives on the subject's brain.
The workflow will also rigidly align the meshes to the MNI152NLin6Asym template,
so that they can be overlaid on top of the template for visualization.
As long as process-surfaces is enabled and mesh files (in either space) are available,
HCP-style midthickness, inflated, and very-inflated surfaces will be generated from them.
Expand Down Expand Up @@ -298,6 +300,9 @@ def init_warp_surfaces_to_template_wf(
):
"""Transform surfaces from native to standard fsLR-32k space.
The workflow will also rigidly align the meshes to the MNI152NLin6Asym template,
so that they can be overlaid on top of the template for visualization.
Workflow Graph
.. workflow::
:graph2use: orig
Expand Down Expand Up @@ -926,7 +931,7 @@ def init_warp_one_hemisphere_wf(
6. Apply the anatomical-to-template warpfield to the 32k surfaces.
This and the previous step make it so you can overlay the pial and white matter surfaces
on the associated volumetric template (e.g., for XCP-D's brainsprite).
- This important thing is that the volumetric template must match the template space
- The important thing is that the volumetric template must match the template space
used here.
"""
workflow = Workflow(name=name)
Expand Down Expand Up @@ -988,7 +993,8 @@ def init_warp_one_hemisphere_wf(
]) # fmt:skip

# Apply FLIRT-format anatomical-to-template affine transform to 32k surfs
# NOTE: What does this step do? Aren't the data in fsLR/dhcpAsym-32k from resample_to_fsLR32k?
# I think this makes it so you can overlay the pial and white matter surfaces on the
# associated volumetric template (e.g., for XCP-D's brainsprite).
apply_affine_to_fsLR32k = pe.MapNode(
ApplyAffine(num_threads=omp_nthreads),
name='apply_affine_to_fsLR32k',
Expand All @@ -1002,7 +1008,8 @@ def init_warp_one_hemisphere_wf(
]) # fmt:skip

# Apply FNIRT-format (forward) anatomical-to-template warpfield
# NOTE: What does this step do?
# I think this makes it so you can overlay the pial and white matter surfaces on the
# associated volumetric template (e.g., for XCP-D's brainsprite).
apply_warpfield_to_fsLR32k = pe.MapNode(
ApplyWarpfield(num_threads=omp_nthreads),
name='apply_warpfield_to_fsLR32k',
Expand Down

0 comments on commit 0e8fe76

Please sign in to comment.