-
Notifications
You must be signed in to change notification settings - Fork 6
Updated defacer to either use minimum or custom value #168
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
base: main
Are you sure you want to change the base?
Conversation
|
/format |
|
🤖 I will now format your code with black. Check the status here. |
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 pull request adds the ability to configure the masking value used during image defacing operations. The defacing process can now either use the minimum value of each image (default behavior) or a custom global value specified by the user.
Changes:
- Added
masking_valueparameter to the baseDefacerclass, allowing users to specify a custom value for masked regions - Updated the
apply_maskmethod to use either the custom masking value or the image minimum when applying masks - Propagated the
masking_valueparameter to theQuickshearDefacersubclass
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| brainles_preprocessing/defacing/defacer.py | Added masking_value parameter to base class constructor and updated apply_mask logic to use either custom or minimum value |
| brainles_preprocessing/defacing/quickshear/quickshear.py | Added masking_value parameter to QuickshearDefacer constructor and passed it to parent class |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
nicmuenster
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.
Different attempt at solving the issue in native python
|
/format |
|
🤖 I will now format your code with black. Check the status here. |
|
/format |
|
🤖 I will now format your code with black. Check the status here. |
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
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
brainles_preprocessing/defacing/defacer.py:1
- The docstring for the
masking_valueparameter in__init__is missing. The parameter is defined at line 11 but there's no Args section in the docstring to document it.
from abc import ABC, abstractmethod
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
neuronflow
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.
@nicmuenster, should we maybe add a TODO in the comments that the fallback (currently falling back to min) might be something that users want to do on a modality-specific basis?
No description provided.