121 feature non atlas centric preprocessing pipeline#139
Merged
neuronflow merged 33 commits intomainfrom Jul 17, 2025
Merged
Conversation
Improve docstrings/ exception message
Make niftyreg compatible with single path instead of list
…f github.com:BrainLesion/preprocessing into 121-feature-non-atlas-centric-preprocessing-pipeline
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the preprocessing pipeline to support multiple processing paradigms by introducing a non-atlas-centric approach alongside the existing atlas-centric preprocessing. The changes create a more modular architecture with specialized preprocessors for different use cases.
- Implementation of a new native space preprocessing pipeline that operates without atlas registration
- Refactoring of the existing preprocessor into separate atlas-centric and base preprocessor classes
- Addition of enhanced defacing capabilities with optional atlas registration for improved performance
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| brainles_preprocessing/preprocessor/preprocessor.py | Introduces BasePreprocessor abstract class with common preprocessing functionality |
| brainles_preprocessing/preprocessor/atlas_centric_preprocessor.py | Refactored atlas-centric preprocessor inheriting from BasePreprocessor |
| brainles_preprocessing/preprocessor/native_space_preprocessor.py | New native space preprocessor for processing without atlas registration |
| brainles_preprocessing/preprocessor/init.py | Module initialization with backward compatibility for deprecated Preprocessor class |
| brainles_preprocessing/modality.py | Enhanced modality classes with improved defacing support and flexible input handling |
| brainles_preprocessing/defacing/quickshear/quickshear.py | Enhanced QuickshearDefacer with configurable atlas registration |
| tests/test_preprocessor.py | Updated tests to use new AtlasCentricPreprocessor class |
| example/example_atlas_centric_preprocessor.py | New example demonstrating atlas-centric preprocessing |
| example/example_native_space_preprocessor.py | New example demonstrating native space preprocessing |
| example/example_modality_centric_preprocessor.py | Removed outdated example file |
Comments suppressed due to low confidence (2)
brainles_preprocessing/preprocessor/atlas_centric_preprocessor.py:209
- This comment and the following code block (lines 209-211) appear to be duplicated from the base class. Consider removing this duplication since the base class already handles this logic in the run_coregistration method.
transformation_matrix = self.center_modality.register(
example/example_native_space_preprocessor.py:93
- The output directory name 'mni_native_space_preprocessed_{subject}' is misleading since this is native space preprocessing, not MNI space. Consider renaming to 'native_space_preprocessed_{subject}'.
output_dir=Path(
copilot is right Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…f github.com:BrainLesion/preprocessing into 121-feature-non-atlas-centric-preprocessing-pipeline
Contributor
Collaborator
|
/format |
Contributor
|
🤖 I will now format your code with black. Check the status here. |
neuronflow
approved these changes
Jul 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.