Skip to content

Conversation

@ClePol
Copy link
Member

@ClePol ClePol commented Sep 17, 2025

This PR contains corpus callosum segmentation, head pose normalization and corpus callosum analysis modules.

This is work in progress. Integration in the run_fastsurfer.sh script is pending, and weights are not online yet.

@ClePol
Copy link
Member Author

ClePol commented Sep 26, 2025

All required features should be present at right now. I'm still running tests - in the meanwhile we can move forward with the --seg_only integration.

@m-reuter m-reuter marked this pull request as ready for review September 26, 2025 14:17
@m-reuter m-reuter requested a review from Copilot September 26, 2025 14:18
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 adds FastSurfer-CC, a comprehensive corpus callosum segmentation, head pose normalization, and analysis module to the FastSurfer repository. The implementation includes deep learning models for AC/PC localization and CC segmentation, along with detailed morphometric analysis capabilities.

  • Deep learning-based AC/PC localization and corpus callosum segmentation pipeline
  • Comprehensive morphometric analysis with thickness measurements and shape metrics
  • Interactive 3D visualization and surface mesh generation capabilities

Reviewed Changes

Copilot reviewed 40 out of 49 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
requirements.mac.txt Adds new dependencies for mesh processing and visualization
recon_surf/recon-surf.sh Updates CC processing path and comments out old commands
recon_surf/align_points.py Adds verbose parameter and debugging output to rigid alignment function
pyproject.toml Adds corpus callosum dependencies to project configuration
env/fastsurfer.yml Adds conda environment dependencies for mesh processing
doc/conf.py Updates documentation to include corpuscallosum module
doc/api/*.rst Adds API documentation for new CorpusCallosum modules
FastSurferCNN/download_checkpoints.py Integrates CC model checkpoint downloading
Docker/build.py Adds logging improvements for docker build process
CorpusCallosum/* Complete corpus callosum analysis implementation with segmentation, localization, and shape analysis

Tip: Customize your code reviews with copilot-instructions.md. Create the file or 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.

This is an incomplete review :( it is currently 250 comments long, but a lot are minor changes that are just having to be applied ... I will do that myself.

dkuegler

This comment was marked as duplicate.

@dkuegler dkuegler force-pushed the dev branch 3 times, most recently from 92f81b1 to 8ee1f0b Compare November 12, 2025 01:38
@dkuegler dkuegler force-pushed the dev branch 4 times, most recently from 9232375 to fc81092 Compare November 20, 2025 11:59
ClePol and others added 14 commits December 16, 2025 19:01
update plotting in localization of ac pc
…nified and clearer also fixing broken transformation matrices

Renaming of functions and variables for better description of function
prepare processing of non-isotropic images
Use lapy 1.4 function to save surface in vox2ras_tkr coordinates
Rename centroid_registration to register_centroids_to_fsavg
Fix vox_size arguments in multiple places
Use FastSurfer's thread_executor to perform parallelization
Fix generation of aseg_auto_statsfile in run_fastsurfer
Add a commented solution to vectorize subsegment_contour.subsegment_midline_orthogonal
Improve Error messages
Update/fix docstrings
improve type annotations, including additional overload signatures
Add a CCMeasurementsDict TypedDict for CC Measures
Reformatting

Various fixes to CC generation (messages to be edited)
…ur, fsaverage. Fixed multithreading bug. Documentation
Cleanup of
- typing
- docstrings
- function names
- variable names
- Add types with documentation
- Move contour documentation into contour module
…it a class method

Remove vox2ras_tkr from fsaverage information
Fix surface saving
Fix --slice_selection type function
Fix mapping from upright to orig space
Change types of ndarrays from python to numpy Scalar types
dkuegler and others added 4 commits December 22, 2025 18:01
- change instatiation of CCContour to from_* syntax
- update io functions for CCContour
- Optimize CCContour
- Fix vox2ras_tkr application for surface to save
- Add and use alternative implementation for CC endpoint finding (requires no image rotation)
- Remove resolution, where it is not needed and build all vox2vox and vox2ras operations on transformation matrices (including surfaces and image to midslab/midslice)
- Resolved outstanding issues where vox_size was used, but correct application of vox2ras should have been used (subdivision mask, cc_image)
- Fix cc_image
- Fix subdivision mask
- vectorize get_unique_contour_points
- Remove resolved FIXME comments
- Remove unused variables
FastSurfer is not compatible with numpy 2 right now, because numpy 2 has changed some of the names of datatypes.
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