HomePhabricator
Diffusion MITK d3f539e52e74

T26350 Add multi label support to statistic

Description

T26350 Add multi label support to statistic

Summary:
BREAKING!!! ImageStatisticsContainer does no store statistics for multiple label Why: Support of multi label masks in statistics view etc... How To Adapt: Also query for the label you want to receive the statistic

Removed QmitkImageStatisticsCalculationJob

Added modified to the mask generator to ensure correct update of the mask on time change. E.g. PlanarFigureMaskGenerator did not correctly update.

Adapted Qmitk classes to statistics container rework

Fixed crash in statistic model if "no zeros" is activated

Fixed error in FeatureBasedEdgeDetectionFilter as mask was ignored.

Fixed error in the QmitkImageStatisticView as histogram was not always shown correctly

Added Label color decoration to label tree items

Add mitk::WeakPointer support for const types.

Improved performance of statistics computation in case of many images/masks by filtering the node events more carefully (higher specifity).

  • Fixed T27655
  • corrected typos

Make histogram group invisible as default

BREAKING!!! MaskGenerator interface was changed. Why: Should support multiple masks. E.g. to cover mask sources that could have overlapping labels (e.g. like the groups in MultiLabelSegmentation). HowToAdapt: - If one calls MaskGenerator:GetMask()...

...the ID/munber of the mask must no be passed. For single mask generators it is always 0. - Change old GetMask() implementation to DoGetMask(). Also implement GetNumberOfMasks for custom mask generators.

Additionally:
+ Added MultiLabelMaskGenerator
+ Added support of multiple LabelSetImage groups in the statistic

Added modified to the mask generator to ensure correct update of the mask on time change. E.g. PlanarFigureMaskGenerator did not correctly update.

Introduced ITKEventObserverGuards to allow the combination of mitk::WeakPointer and mitk::Label (w/o leading to a crash).

Added mutex to secure internal label and group maps of LabelSetImage.

Fixed implementation/usage of node in QmitkMultiLabelManager and QmitkMultiLabelInspector

  • Added observer that widgets also react if the data of the node

is changed if a node is monitored.

Fixed crash of statstic view if a mask with only empty labels is selected.

Ensured that changing the segmentation content also triggers code that listens to node modification events (e.g. render windows or QmitkImageStatisticsModel).

This is needed as a workarround until T27307 is properly solved.

Adapted widget text in order to make the purpose easier to grasp.

Test Plan: Code review, workbench testing

Reviewers: O1 MITK Reviewer Group I, O3 MITK Reviewer Group II, kislinsk

Reviewed By: O1 MITK Reviewer Group I, O3 MITK Reviewer Group II, kislinsk

Subscribers: kislinsk, s434n

Maniphest Tasks: T30347, T27655, T27258

Differential Revision: https://phabricator.mitk.org/D906

Merged Changes