Skip to content

Conversation

@dkuegler
Copy link
Member

This PR includes some of the changes that are part of FastSurferCC development, but in FastSurfer directories and also in content not directly part of FastSurferCC. Those changes are

  • Move the lta utilities from recon_surf and CerebNet into FastSurferCNN
  • thread_executor and process_executor functions in FastSurferCNN to unify the *PoolExecutor objects and more easily being able to use consistent threads --> Here is is updated in segstats.py and brainvolstats.py
  • Updates to docstrings
  • Improved type annotations, such as a simple nibabelImage type for teh nibabel common parent image
  • Formatting cleanup

ClePol and others added 4 commits December 11, 2025 11:34
… several files

- use thread_executor instead of internal own executor object in segstats and brainvolstats
- use DO_NOT_SAVE_FILE instead of empty string for defaults in segstats.py
- update formatting
- fix sphinx warnings (argparse extension)

- Remove extra Default statement from device argument
- Add Fornix Measure for brainvolstats.py
- Add path_or_none arg_type in arg_types.py
…nt component of FastSurfer (also being used by FastSurferCC)
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 performs maintenance updates for FastSurfer as part of the FastSurferCC integration effort, focusing on code organization, type annotations, and improved executor handling.

Key changes:

  • Moved LTA utilities from recon_surf and CerebNet to centralized FastSurferCNN/utils/lta.py module
  • Standardized thread/process executor usage via thread_executor() function in segstats.py and brainvolstats.py
  • Enhanced type annotations with nibabelImage, ShapeType, and AffineMatrix4x4 types throughout the codebase

Reviewed changes

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

Show a summary per file
File Description
recon_surf/lta.py Removed - functionality moved to FastSurferCNN/utils
recon_surf/align_seg.py Updated import to use new lta module location
doc/api/recon_surf.rst Removed lta module from documentation
doc/api/FastSurferCNN.utils.rst Added lta module to utils documentation
Tutorial/README.md Fixed trailing backtick in comment
HypVINN/data_loader/dataset.py Added .cpu() call before .numpy() for tensor conversion
FastSurferCNN/utils/run_tools.py Fixed escaped apostrophe in docstring
FastSurferCNN/utils/parser_defaults.py Removed "Default: auto" text duplication in help string
FastSurferCNN/utils/parallel.py Added shutdown_executors to all exports
FastSurferCNN/utils/metrics.py Fixed escaped apostrophe in docstring
FastSurferCNN/utils/lta.py New module with write_lta and read_lta functions plus LTADict type
FastSurferCNN/utils/common.py Improved line wrapping in error messages
FastSurferCNN/utils/brainvolstats.py Updated to use thread_executor and new type annotations
FastSurferCNN/utils/arg_types.py Added path_or_none function for argument parsing
FastSurferCNN/utils/init.py Added comprehensive type definitions including nibabelImage and ShapeType
FastSurferCNN/segstats.py Replaced ThreadPoolExecutor with thread_executor() and improved formatting
FastSurferCNN/run_prediction.py Updated type annotations to use nibabelImage
FastSurferCNN/reduce_to_aseg.py Updated type annotations with ShapeType and new nibabel types
FastSurferCNN/quick_qc.py Updated to use nibabelImage type
FastSurferCNN/models/interpolation_layer.py Improved code formatting and reduced line lengths
FastSurferCNN/data_loader/data_utils.py Updated return type documentation and nibabelImage usage
FastSurferCNN/data_loader/conform.py Added Union import and updated type annotations
CerebNet/utils/lr_scheduler.py Converted docstrings from Args/Returns to Parameters/Returns format
CerebNet/inference.py Updated to use nibabelImage type and improved docstrings
CerebNet/datasets/utils.py Removed LTADict and read_lta (moved to FastSurferCNN), added type hints
CerebNet/datasets/load_data.py Enhanced docstrings with proper parameter documentation
CerebNet/data_loader/loader.py Added type hints and improved docstring format
CerebNet/data_loader/dataset.py Updated to use nibabelImage type
CerebNet/data_loader/augmentation.py Improved docstring formatting with Notes and References sections

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dkuegler dkuegler force-pushed the feature/base-typing-format branch from 9bed68f to 19ba00d Compare December 16, 2025 17:12
@m-reuter m-reuter merged commit 6b6b985 into Deep-MI:dev Dec 16, 2025
2 checks passed
@dkuegler dkuegler deleted the feature/base-typing-format branch January 5, 2026 11:34
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