Page MenuHomePhabricator

How to display active labels with multi label segmentations
Closed, WontfixPublic


The basic 'single label segmentation' can be display in two different ways:

  • the outline of the segmentation is visible, showing the underlying image information inside (no color face)
  • the outline of the segmentation is hidden, showing a red face as a mask (transparency can be varied)

With the multi label segmentation concept, some questions / problems arise:

  • if a layer contains several labels and one is active, how should the non-active labels on the same layer be displayed? (currently only one outline mapper / outline poly data member exists in the 'LabelSetImageVtkMapper2D')
  • if a layer is active and contains an active label, how should the labels on different layers be displayed?
  • if a label is displayed with a contour only, it may happen that the underlying image information is not visible; instead another label may lay behind the contour with its face visible

Event Timeline

I think that the different layers should be rendered without knowing from each other and thus don't interact with each other. Just like layers used in an overhead projector. The user is in charge for switching on/off the visibility of these layers like in Photoshop. This is an easy to grasp concept and resolves a bunch of the questions. The "intelligence" for rendering should be inter-layer in my opinion. I guess if we want to continue both fill modes we have to extent them a little bit, i.e., separate properties for labels as a whole and the active label. We want to highlight the active label in some way anyways. The user can decide if he or she wants to outline like everything or just the active label. It wouldn't be much more code to write but we would have kind of full flexibility.

I have discussed this topic with a colleague who uses the (old) Segmentation plugin a lot and now will switch to MultiLabelSegmentation plugin.
A requirement is to see the gray values of the underlying image so the segmentation can be verified. -> The red face is a no go in this case and she wants to see it as contour.
We saw that in the current implementation the other labels would dissapear then but also found a way how to get along while not changing too much:


  • draw active label as contour without inner opaque mask / face. -> Inner pixels can be verified.
  • draw inactive labels with a very decent mask / face by using the opacity property of the multi segmetation node (opacity ~0.7). By changing the property in the DataManager the visualization can be adapted quickly.

mitk_MLS_sketch.jpg (479×451 px, 58 KB)

Modification of the property "opacity" by the way doesn't affect visualization at once (minor bug). This way the user thinks that the property can't be used. An update is caused e.g. by switching visibility of the labels off and on again.
Also showing the shadow of the contour was discussed as inappropriate as this also affects the visualization of the underlying image (at least toggable via preferences?).

Other than that: THANK YOU for moving over to multi label segmentation!

After discussing this topic a bit more we now have the opinion that only showing contours for all labels would be the best solution in our opinion.
The active label then can be highlighted by a thicker contour. And this would also preserve the same workflow as in the original Segmentation plugin, right?

All labels means all labels on the active layer or all labels on each layer?
As Stefan wrote, one could just handle a layer individually (e.g. the active layer) and just ignore handling the other layers. The user then has to hide the labels on other layers. But as far as I remember there is no button to automatically hide labels on the non-active layer automatically (you can hide / show labels on a layer by clicking the eye-icon or using the context menu).

Also take a look at the context menu of a label in the MultiLabelSegmentationPlugin. There you can also change the opacity of each individual label on the current layer with immediate response. For an experimental plugin in the latest release we decided to stick with this workflow. So each user can decide on his or her own to show the active label with a slightly transparent face or with zero opacity.

Oh, I didn't see that!!!
And it was documented in the F1 plugin manual... *RTFM*

The context menu adds many features to a label! We will test that, thank you!!!

kislinsk claimed this task.
kislinsk added a project: Auto-closed.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kislinsk removed kislinsk as the assignee of this task.May 26 2020, 12:05 PM
kislinsk removed a subscriber: kislinsk.