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)