Page MenuHomePhabricator

[Statistics] Replace secondary mask in mitk::ImageStatisticsGenerator by an "AndMaskGenerator"
Open, NormalPublic

Description

Currently mitk::ImageStatisticsGenerator offers to define a secondary mask that will be combined (logical and) with the main mask. This functionality is e.g. used for the "ignore Zero" feature in the statistics.

The current implementation makes the business logic unnecessary complex and error prone.

A cleaner design (like in RTTB and originally planned) would be to introduce a "AndMaskGenerator" or "IntersectionMaskGenerator".
This generator takes a primary mask generator and a secondary mask generator. For the secondary you can define the "selecting" mask and its label.
The generator will the produce modify the results of the primary mask generator by the selected secondary mask.
Then we can build generator chains that will cover the current use cases and allow a cleaner and simplier ImageStatisticsGenerator.

E.G. Any mask generator (as primary mask) + IgnorePixelMaskGenerator (as secondary mask) -> AndMaskGenerator -> ImageStatsticsGenerator.

Event Timeline

floca triaged this task as Normal priority.Mar 15 2024, 9:31 AM
floca created this task.