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
|Restricted Differential Revision|
- Mentioned In
- T25056: Refactor data manager context menu
rMITK190ff81df40b: Apply changes of T23590 to the new decoupled context menu (actions)
T19971: Level Window Slider does not fit to values for Center&Window
rMITK30340839e462: Summary: Add a function to compute the whole image range, if a colormap was…
rMITKccc4c00b8ac5: Merge branch 'T23590-Correct-multilabel-colormap-level-window' of https…
rMITKc88481ec2c0a: Summary: Add a function to compute the whole image range, if a colormap was…
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:
Segmentation set to Colormap: Multilabel:
Level window set to: Use whole image grey values
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.
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).