Page MenuHomePhabricator

Multilabel Segmentation Utilities do not work for multilabel segmentations
Open, HighPublic


I have a (multilabel) segmentation that I would like to correct (tomo02_patch000). The part labeled in tomo02_patch000_add_0000 needs to be added to label1 and everything that is labeled in tomo02_patch000_remove_0000 needs to be removed from label 1 (set to 0). The multilabel segmentation utilities should be the right place for this, but they do not work with multilabel images for some reason?

Here are the files:

In python:

label_1 = multilabel_seg == 1
label_1 = (label_1 | (add_seg == 1))  # bitwise OR
label_1[remove_seg == 1] = False  # XOR would work, too
multilabel_seg[multilabel_seg ==1] = 0  # remove label 1 from multilabel image (so that we can replace it)
multilabel_seg[label_1] = 1 # update label1 in multilabel image. remember that label_1 is a bool mask

Would be great to be able to just do it in MITK. If you have questions, please contact me :-)

Ubuntu 18.04

image.png (20×533 px, 6 KB)

Event Timeline

kislinsk edited projects, added MITK (v2021.10); removed MITK.
kislinsk moved this task from Backlog to Segmentation on the MITK (v2021.10) board.

@isensee What exactly does not work?

  • Are you not able to load the data / ML nodes in the utilities selection widgets? That is a known bug and is addressed here: T28135
  • Are you not able to work with multiple labels at all? This is also a known problem, since the MultiLabel Utilities View was never correctly implemented for working with multiple labels.

Sorry but you probably have to wait - we are working heavily on the (ML) Segmentation redundancy and will probably come up with something more efficient, incorporating a new design for the MultiLabel Segmentations to flawlessly work with multiple labels.

However, I was able to presumably do what you wanted to do, see screenshots. This was a complex process and handcrafted solution but just to show if we are generally able to do what you want to do:
Before adding:

image.png (1×2 px, 277 KB)

After adding:

image.png (1×2 px, 269 KB)

Before removing:

image.png (1×2 px, 264 KB)

After removing:

image.png (1×2 px, 251 KB)

floca added a subscriber: floca.

@isensee Could you give some information regarding the question (see comment above) . Thanks.