Page MenuHomePhabricator

Cannot create new label in multilabel segmentation
Closed, ResolvedPublic

Assigned To
Authored By
isensee
Dec 2 2021, 10:19 AM
Referenced Files
F2475877: image.nii.gz
Dec 2 2021, 10:19 AM
F2475878: seg.nii.gz
Dec 2 2021, 10:19 AM
Subscribers

Description

I have this rather special case where there is a large number of labels in a single image (450). This is an instance segmentation problem, so this number is needed.

When trying to add labels in the multilabel segmentation tool, nothing happens. MITK is computing something for a while, but neither is the new label created, nor is anything added to the list of labels. In addition, 'the number of labels' counter is not increased.

To reproduce:


  1. load image
  2. load segmentation
  3. right click on segmentation in data manager, select 'convert to segmentation'
  4. open multilabel plugin, select data and segmentation
  5. click 'Add new label', enter a label name + color
  6. MITK computes for a while (~10s) (-> why does that take so long? Might also be worth investigating)
  7. nothing happened. No new label was generated

Ubuntu 18.04 with 2021-11-09 MITK snapshot

Thank you :-)

Event Timeline

kislinsk triaged this task as High priority.

Okay, the fix is very simple as there is an unnecessary check in LabelSet::AddLabel() if the size of the label container is bigger than 255 and then return without any further action. I traced it back to the initial implementation of Sebastian Ordas and I guess it is only there since back then it wasn't clear if label sets should be 8-bit or more. So, a no-brainer to remove the check. All other parts of label set obviously work just fine with more labels.

Regarding the speed, however, I don't think that we will implement any big improvements in the current data structure of multi-label segmentations, since we are already working on a completely new structure for it and any fix would be obsolete any time soon.

Deleted branch from rMITK MITK: bugfix/T28898-AddMoreThan255Labels.