highdicom
highdicom copied to clipboard
Add warning when empty segmentation is passed with omit_empty_frames
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
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