Page MenuHomePhabricator

Level Window Multilabel Segmentation
Closed, ResolvedPublic


When using a multilabel segmentation, the automatically generated level window does not cover all the labels properly. It will sometimes even show only one of the labels in color and the rest as background. The correct behavior should be to make the background transparent (no color) and set the level window so that all foreground values are covered. For example data pls come to me (Fabian). I got plenty!

Revisions and Commits

Event Timeline

kislinsk triaged this task as Normal priority.Nov 16 2017, 3:47 PM
kalali added a project: Restricted Project.Sep 28 2018, 9:50 AM

This is a case where the multilabel segmentation is stored as a nifti image. If this segmentation is loaded into MITK it is represented as an Image (short type).

Images loaded initially:

loaded_images.png (452×683 px, 2 KB)

Segmentation set to Colormap: Multilabel:
seg_as_multilabel.png (452×683 px, 22 KB)

Level window set to: Use whole image grey values
seg_with_whole_grey_values.png (452×683 px, 24 KB)

If the segmentation is loaded initially the level window slider is set to [1,2]. However, the center of the level window (upper line edit) is set to 1 and the span around the center is also set to 1. This means that the level window slider should be set to [0.5, 1.5].

One idea is to automatically set the level window to use whole image grey values but the level window manager is not accessible from the data manager view. It is located and accessible inside the QmitkStdMultiWidget.

The range is newly computed if a colormap is chosen from the context menu.
Additionally the colormap-action can now be applied to multiple images at once.

There is a problem with this approach since it might happen that a user sets it's own level window and then chooses a colormap. But this colormap will then reset the level window to the whole grey value range.

LevelWindow::SetAuto is the function that crops the outliers and sets the range to the 2nd minimum / maximum value. This leads to cropping of label values for the given nifti labelmap images (this is the reason why the level window slider is set to [1,2] using the test data from above).

The range is set only if the option Multilabel is chosen.

kalali added a revision: Restricted Differential Revision.Oct 26 2018, 4:40 PM
kislinsk added a subscriber: kislinsk.

Cherry-picking into beta...