highdicom icon indicating copy to clipboard operation
highdicom copied to clipboard

Add warning when empty segmentation is passed with omit_empty_frames

Open CPBridge opened this issue 3 years ago • 1 comments

Addresses #180

When the omit_empty_frames option is used for a Segmentation and an empty segmentation mask is passed (i.e. a mask with all zeros), the constructor will issue a UserWarning and ignore the omit_empty_frames option.

Add tests

CPBridge avatar Jul 06 '22 23:07 CPBridge

I am wondering whether it should be a user warning or a warning level log message. I would probably favor the latter, because it may be nice to know for which instance the warning is issued, because the fact that all frames are empty could be due to a problem in the application logic/code

I have changed to a logger warning for now. But we should probably wait for a consensus on #180 before merging

CPBridge avatar Jul 07 '22 23:07 CPBridge