-
Notifications
You must be signed in to change notification settings - Fork 240
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
Mask values outside of a LabelMap #521
Comments
Hi, @Svdvoort. Thanks for your proposal. I think this would be helpful.
That's great! And yes, this is the preferred workflow, thanks. I agree it shouldn't be complicated. Have you thought of how this would work? Maybe an interface similar to the normalization transforms, using |
Great! Yes, I would just make it a subclass of |
I'm not sure this counts as normalization. The masking logic is now in |
Indeed you're right, |
I'm not sure I understand.
I'd say |
See above for the propose pull request.
At first instance I thought there could be some confusion as |
🚀 Feature
Have an IntensityTransform that sets values outside of a certain LabelMap to a specific value.
Motivation
This can be handy for example for skull-stripping (as also discussed in #428 ) when a brain mask is already available or in general when a foreground mask is available and you want to mask out the 'background'
Pitch
Easily use a transform to mask out certain parts of the image.
Alternatives
It is possible to do intensity normalization with a mask using the current IntensityTransforms, and these only take into account the values within the mask, but it doesn't seem to be actually possible to set the values outside of the mask.
Additional context
I can implement this feature but wanted to open a request first according to the contributing guidelines and to check whether there's not something that I missed.
The text was updated successfully, but these errors were encountered: