Page MenuHomePhabricator

Multilabel color map does not produce unique colors
Closed, ResolvedPublic

Description

When viewing segmentations we rely on multilabel color map to display each label in a unique color. This is achieved by switching to the multilabel color map followed by running 'use whole image grey values' on the level window slider (also see T28421).
Unfortunately, even after running 'use whole image grey values' not all labels actually get a unique color value. And this is not even happening just in cases where a large number of unique values exist.

Reproduce

  • use data from here e132-projekte/Share/FabianAnMITKTeam/T28422
  • load image and segmentation
  • move segmentation to top of data manager
  • change segmentation label map to multilabel
  • right click level window slider, then 'used whole image grey values'
  • navigate to kidney tumor:

image.png (420×670 px, 120 KB)

both kidney and tumor are shown in yellow, not allowing us to distinguish them. This is even though the have different labels (kidney is 1, tumor is 6)

I can fix that by manually playing with the level window slider:

image.png (359×553 px, 89 KB)

but I really should not have to do that. If I do this manually I might inadvertently fuse two other labels without noticing.
Automatically assigning a unique color to each greyscale value should not be difficult.

(MITK Version: 2021.02 on Ubuntu 18.04)

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

isensee updated the task description. (Show Details)
kislinsk added a subscriber: kalali.
kislinsk added a subscriber: kislinsk.

This really shouldn't happen. A first look at the code revealed that the intention is to have at least 25 different colors for values 1-26 and after that repeatedly cycle through 12 colors.

The lookup table is set correctly but the rendered colors do not match.

If the image is converted to a segmentation (context menu -> Convert to segmentation), it is rendered correctly even though the very same lookup table is used. So I guess the issue is to be found within the 2d image mapper.

@isensee Is there a reason why you go the colormap way instead of converting the image to a segmentation?

@kislinsk sorry for the late reply. I am not using the convert to segmentation functionality because it draws contours by default and that is annoying because it obstructs too much from the image. Multilabel color map does exactly the right thing, is easy to use and does not require and additional mouse clicks. It is just more convenient :-)