Skip to content

Conversation

@ClePol
Copy link
Member

@ClePol ClePol commented Jan 8, 2026

This PR fixes multiple bugs in the corpus callosum module.

One critical bug was in the AC/PC localization, where the AC/PC was never correctly placed on the midslice.

Other bugs are mainly related to visualization and alternate subdivision schemes (not run in the default run_fastsurfer.sh configuration).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes multiple bugs in the FastSurfer corpus callosum (CC) module, with a focus on AC/PC localization and visualization issues.

  • Critical fix: AC/PC coordinates are now correctly placed on the midslice by converting physical coordinates to voxel coordinates (dividing FSAVERAGE_MIDDLE by voxel size)
  • Critical fix: Midslice identification for QC image generation now uses loop counter instead of slice index
  • Refactored subdivision tracking to directly store subdivision lines instead of retrospectively extracting them from contours

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
doc/overview/modules/CC.md Clarifies that anatomical landmarks use LIA voxel coordinates and references orig.mgz space
CorpusCallosum/utils/visualization.py Refactors plot functions with explicit view configurations, fixes reference contour selection, removes redundant plt.show()
CorpusCallosum/utils/types.py Adds subdivision_lines field to CCMeasuresDict type definition
CorpusCallosum/shape/subsegment_contour.py Standardizes subdivision functions to return and track subdivision_lines explicitly, ensures consistent A-to-P ordering, removes deprecated get_unique_contour_points function
CorpusCallosum/shape/postprocessing.py Fixes midslice detection bug, updates make_subdivision_mask to use subdivision_lines directly, removes CCMesh from return values
CorpusCallosum/shape/curvature.py Removes unused split_contours parameter from calculate_curvature_metrics
CorpusCallosum/fastsurfer_cc.py Fixes AC/PC coordinate calculation by converting FSAVERAGE_MIDDLE to voxel space, updates function call to match new 3-value return

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@dkuegler dkuegler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes.

@m-reuter m-reuter merged commit 6047404 into Deep-MI:dev Jan 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants