Add optional smoothing filter support to reconstruction module#41
Merged
acsenrafilho merged 4 commits intodevelopfrom Jul 4, 2025
Merged
Add optional smoothing filter support to reconstruction module#41acsenrafilho merged 4 commits intodevelopfrom
acsenrafilho merged 4 commits intodevelopfrom
Conversation
Co-authored-by: acsenrafilho <9722993+acsenrafilho@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [FEATURE] Add possibility to user set a smoothing filter in the output map (reconstruction module)
Add optional smoothing filter support to reconstruction module
Jul 3, 2025
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
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.
This PR adds optional spatial filtering (smoothing) functionality to the reconstruction module's
create_mapmethods, allowing users to reduce noise and improve SNR in output maps as part of the standard processing pipeline.Overview
In most ASL data processing workflows, it is common practice to apply spatial filtering to output maps to reduce noise, enhance signal-to-noise ratio (SNR), and improve interpretability. This feature addresses that need by adding smoothing capabilities directly to the reconstruction classes.
Key Features
smoothing=None, smoothing_params=Noneadded to allcreate_mapmethodssigma=1.0, median usessize=3CBFMapping,MultiTE_ASLMapping, andMultiDW_ASLMappingUsage Examples
Implementation Details
New Components
asltk/smooth/median.py: New median filter implementation usingscipy.ndimageasltk/reconstruction/smooth_utils.py: Utility functions for consistent smoothing applicationcreate_mapmethods: All reconstruction classes now support smoothing parametersModified Classes
CBFMapping.create_map(): Returns{'cbf', 'cbf_norm', 'att'}with optional smoothingMultiTE_ASLMapping.create_map(): Returns{'cbf', 'cbf_norm', 'att', 't1blgm'}with optional smoothingMultiDW_ASLMapping.create_map(): Returns all diffusion maps with optional smoothingError Handling
Testing
Benefits
Fixes #15.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.