Skip to content

Conversation

@nicmuenster
Copy link
Collaborator

No description provided.

@nicmuenster nicmuenster linked an issue Jan 14, 2026 that may be closed by this pull request
@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jan 14, 2026

🤖 Code Formatting Reminder

Hello there! 👋 It looks like the code in this pull request might benefit from some formatting improvements.
Fix the issues locally or use our auto format action by commenting /format on this PR!

Code style: black

@nicmuenster
Copy link
Collaborator Author

/format

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jan 14, 2026

🤖 I will now format your code with black. Check the status here.

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 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_value parameter to the base Defacer class, allowing users to specify a custom value for masked regions
  • Updated the apply_mask method to use either the custom masking value or the image minimum when applying masks
  • Propagated the masking_value parameter to the QuickshearDefacer subclass

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.

@neuronflow neuronflow removed the request for review from MarcelRosier January 14, 2026 14:46
Copy link
Collaborator Author

@nicmuenster nicmuenster left a 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

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jan 14, 2026

🤖 Code Formatting Reminder

Hello there! 👋 It looks like the code in this pull request might benefit from some formatting improvements.
Fix the issues locally or use our auto format action by commenting /format on this PR!

Code style: black

@nicmuenster
Copy link
Collaborator Author

/format

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jan 14, 2026

🤖 I will now format your code with black. Check the status here.

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jan 14, 2026

🤖 Code Formatting Reminder

Hello there! 👋 It looks like the code in this pull request might benefit from some formatting improvements.
Fix the issues locally or use our auto format action by commenting /format on this PR!

Code style: black

@neuronflow
Copy link
Collaborator

/format

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jan 14, 2026

🤖 I will now format your code with black. Check the status here.

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

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_value parameter 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 neuronflow self-requested a review January 14, 2026 15:59
Copy link
Collaborator

@neuronflow neuronflow left a 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?

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.

[FEATURE] Adjustment for CT image defacing

3 participants