You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When apply transform like CropForeground to a multichannel image, the bounding box is determined by checking select_fn on "any" channel. However, in many cases, we may want to check it on "all" channels, e.g., when cropping RGB images, we discard background pixels with all 3 channels being zero, instead of pixels with any one of the channel being zero.
Is your feature request related to a problem? Please describe.
When apply transform like
CropForeground
to a multichannel image, the bounding box is determined by checkingselect_fn
on "any" channel. However, in many cases, we may want to check it on "all" channels, e.g., when cropping RGB images, we discard background pixels with all 3 channels being zero, instead of pixels with any one of the channel being zero.MONAI/monai/transforms/utils.py
Line 1029 in 8c709de
Describe the solution you'd like
Add some option indicating that we should call
select_fn(data).all(0)
in the line of code above.The text was updated successfully, but these errors were encountered: