-
Notifications
You must be signed in to change notification settings - Fork 144
FastSurfer-CC bugfixes #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… incorrect areas and visualization
There was a problem hiding this 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.
dkuegler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes.
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).