Page MenuHomePhabricator

[Segmentation] Newly created LabelSet segmentation is not displayed as "outline binary"
Open, NormalPublic

Assigned To
None
Authored By
kalali
Jan 7 2020, 4:47 PM
Referenced Files
F2524890: image.png
Mar 28 2022, 4:24 PM
F2524863: image.png
Mar 28 2022, 3:25 PM
F2504006: multilabel_filledmask.png
Feb 16 2022, 12:58 PM
F2504008: multilabel_filledmask_hidden.png
Feb 16 2022, 12:58 PM
F2504004: multilabel_outline.png
Feb 16 2022, 12:58 PM

Description

The ImageRendering Checklist states:

Segmentation Bundle aktivieren, starten und eine Segmentierung erzeugen.

  • In den 2D Renderwindows wird die Segmentierung als "outline binary" gezeigt (es sind also nur die Kanten zu sehen). Im 3D Renderwindow ist die Segmentierung gefüllt.

The segmentation is drawn as a filled solid label with an outline and the segmentation is not visible in the 3D render window.

Also using the Properties-View and enabling the outline binary property does not change anything.
It is also not possible to change the color of the newly created LabelSet segmentation using the Properties-View and changing the color-property.

I guess this has something to do with the LabelSet image type. We need to adress this in the checklist.

Revisions and Commits

Related Objects

Event Timeline

kalali triaged this task as Normal priority.Jan 7 2020, 4:47 PM
kalali created this task.

@norajitr also opts for a fix as he encountered several ocasions where this bug was annoying.

It seems as if datanode->GetBoolProperty("binary", binary, renderer) inside mitkImageVtkMapper2D always results in binary being false. This might be true for our LabelSet images, but the properties view still shows the property binary as true, e.g. for segmentations created with the classic segmentation view.

The mitkLabelSetImageVtkMapper2D does not even take the binary-property into account, so "outline binary" does strictly speaking not exist with LabelSet images.
There is a property called labelset.contour.active which is used to display the contour on request. But as far as I can see there was never an option / an implementation that allowed to display only the contour of a LabelSet image without showing the segmentation face.
There was already some discussion about this (see T19933 and related).

Showing the outline of a binary image (segmentation) still works.

kislinsk lowered the priority of this task from Normal to Low.Feb 24 2021, 11:18 AM
kislinsk removed a project: Request for Discussion.
kislinsk added a subscriber: kislinsk.

We are going to rewrite the 2-d LabelSetImage mapper and write a 3-d LabelSetImage mapper this year, where this will be addressed. We should at least clean up the duality of the contour properties (binary vs. labelset.contour). We should probably allow to show the contour without any filling and we should clean up the coupling between contours and active label.

kalali renamed this task from Newly created LabelSet segmentation is not displayed as "outline binary" to [Segmentation] Newly created LabelSet segmentation is not displayed as "outline binary".Jun 10 2021, 2:16 PM
kalali edited projects, added MITK (v2021.10); removed MITK.
kalali moved this task from Backlog to Segmentation on the MITK (v2021.10) board.
kalali raised the priority of this task from Low to Needs Triage.Jan 18 2022, 2:13 PM

We are going to rewrite the 2-d LabelSetImage mapper and write a 3-d LabelSetImage mapper this year, where this will be addressed. We should at least clean up the duality of the contour properties (binary vs. labelset.contour). We should probably allow to show the contour without any filling and we should clean up the coupling between contours and active label.

Just stumbled upon this: I bring this back to our attention for the upcoming segmentation-discussion (@floca).

We have to clarify the purposes/semantics of the properties (see above) in the future and which we want to keep.

kalali triaged this task as Normal priority.Jan 26 2022, 11:06 AM
kalali moved this task from MITK Meeting to Backlog on the Request for Discussion board.

I added a fix for this while working on T28142, which allows to show only the outline for LabelSetImages using the preference page (by using label transparency).
The way it it is visualized now:

  • showing the contour only draws the outline, no filled mask
  • contours are shown for all labels on all layers
  • active label is highlighted with a thicker contour
  • showing the transparent / filled mask does not show a contour
  • transparent / filled masks are shown for all labels on all layers
  • active label is currently not highlighted --> we need to discuss this

Some issues we need to discuss:

  • showing contours for non-overlapping (but directly neighboring) labels (on the same layer) looks unusual now
  • highlighting the active label with e.g. a more opaque filling is not possible with the current layer actors

We can discuss this and think about if we want to remove the option to switch between "Draw as outline" and "Draw as transparent overlay" and just add a simple option to draw an additional outline or not, but leave the filling of the inside to the user (by adjusting the transparency / opacity slider e.g. in the label set widget).

Some related things were already discussed before. Therefore I want to bring this task back into discussion: T22328: How to display active labels with multi label segmentations
The following things need to be clarified

  • show labels with opaque mask - for all labels, also on different layers?
  • show labels only with outline - for all labels, also on different layers?
  • highlight the active label
    • how to do this when showing the face (and no contour)?
    • how to do this when showing the contour (and probably no filled mask)? Currently the contour is drawn thicker.
kalali added a revision: Restricted Differential Revision.Feb 15 2022, 6:32 PM

I will add screenshots that show the current visualization:

multilabel_outline.png (1×2 px, 319 KB)

multilabel_filledmask.png (1×2 px, 286 KB)

multilabel_filledmask_hidden.png (1×2 px, 297 KB)

The following things need to be clarified

  • highlight the active label
    • how to do this when showing the face (and no contour)?

Here it was suggested to still use the outline of the active label again, as it was done before in the current develop.

The following things need to be clarified

  • highlight the active label
    • how to do this when showing the contour (and probably no filled mask)? Currently the contour is drawn thicker.

Here some suggestion were made that included:

  • drawing a second outline with a distinct color, e.g. white
  • drawing an outline with a different style (e.g. dashed)

We also discussed if we want to provide two different visualization styles

  • one for label inspection (maybe also think about highlighting labels if the user hovers the mouse above a label in the render window)
  • one for label manipulation / active tool interaction

The second one could be designed e.g. such that non-active labels are not shown at all (maybe this differs depending on their (un-)locked status)

Something that should be considered is an issue mentioned in a tested checklist:

  • image.png (338×963 px, 23 KB)

I guess this is related to the problem that was also mentioned elsewhere: There is only a single outline actor which is valid for the whole segmentation, taking all labels into account.

The following things need to be clarified

  • highlight the active label
    • how to do this when showing the contour (and probably no filled mask)? Currently the contour is drawn thicker.

Here some suggestion were made that included:

  • drawing a second outline with a distinct color, e.g. white
  • drawing an outline with a different style (e.g. dashed)

Currently I do not understand the mapper well enough to simply add a second line or a dashed line.
I will look into this (and update the corresponding differential) to have a simple solution for the upcoming release, what do you think @floca? A simple solution was already presented and it seems as if we need to allow hiding the outline contour at least (which is currently possible with the corresponding differential - see screenshots above).

Have we discussed this yesterday in the meeting?

We already discussed this some weeks ago. We talked about a second outline, dashed lines etc.
I updated the corresponding differential and added another solution, which automatically reduces the opacity of non-active labels. We can discuss if this is a work-around until we have a new / modified data structure.
The point I wanted to make is: From the feedback of the tester we should definitely provide an option to hide the outline contour at all (especially for active labels), so I tried the opacity-approach.

kalali edited projects, added MITK, Next Milestone; removed MITK (v2023.04).

I pushed my local branch to remote for others to continue working on it. The related differential {D594} has been updated and will remain open.

Unknown Object (User) added a subtask: Unknown Object (Maniphest Task).Jun 28 2023, 9:32 AM