Page MenuHomePhabricator

[Multilabel Segmentation] Fill / Erase tool does not fully respect multiple labels
Open, HighPublic

Description

Using the Multilabel segmentation plugin view and the Fill / Erase tool, a label set image with multiple labels is not correctly handled.
If the Fill / Erase tool is used inside a hole of label A while segmenting on Label B, the boundaries of the segmentation mask of label A are used as a "hole".

To reproduce:

  • load an image, open the multilabel segmentation plugin view, create a new label set image
  • create a new label on the first layer (automatic popup dialog)
  • create another label on the first layer (different color)
  • create a mask with a hole for the first label
  • select the second label and fill the hole of the first label

--> The hole is filled with the color of the second label. Instead the whole image should be filled with the color of the second label since the "second label" has no holes (no segmentation mask at all).

A similar problem occurs with the "Erase" tool were the boundaries of the first label are used to define the area to remove for the second label.

Event Timeline

floca added a subscriber: floca.

May be I do not understand the problem right. But the described behavior sounds correct to me. Flood fill should stop on another (not the label you clicked on (including background) label boundary. The only thing you could discuss is wether it is important if another label is locked or not.

May be I do not understand the problem right. But the described behavior sounds correct to me. Flood fill should stop on another (not the label you clicked on (including background) label boundary. The only thing you could discuss is wether it is important if another label is locked or not.

Maybe a quick screenshot-example shows what I find disturbing:
Click with "Fill" tool somewhere outside of the red label results in:

image.png (617×623 px, 136 KB)

Click with "Fill" tool inside the hole of the red label results in:

image.png (623×621 px, 131 KB)

In the second case I was expecting the blue label to be filling the whole image, leaving out the area of the red label (no overlap), like it is shown in the first screenshot.
Because when the blue label is calculated, it looks for the boundaries of the blue label. There are no boundaries so the whole image is filled - however, the red area is not "painted over".
If this is not the expected result, because the boundaries of the red label are taken into account (as it is done in the second screenshot), then I guess the first case is wrong.

Btw., I also tested it with unlocked labels and here the behavior of both cases is also different: Filling outside the area creates a blue label on the whole image, painting over the red label.
Filling inside the hole only fills the hole, no "painting over".