Page MenuHomePhabricator

[Segmentation] Segmentations cannot be serialized into project files and related crash
Closed, ResolvedPublic

Description

  • Open image
  • Create segmentation
  • Save project core.mod.scnSer.scnIo ERROR: No serializer found for LabelSetImage. Skipping object

When the segmentation has multiple groups, labels, instances before saving, closing the project after saving it will crash

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

kislinsk triaged this task as Unbreak Now! priority.Apr 28 2023, 10:32 AM
kislinsk created this task.

Crash seems to occur because the SurfaceInterpolationController observer logic is broken. It seems like registered observers ar never removed only added.
E.g. also if the segmentation is set to nullptr, nothing is removed from the old segmentation. That leads to the crash, because the events are triggered by the old segmentation when session is closed, but the controller has only a null ptr at this point.

The crash should go away if the observers are managed/removed correctly.

Serialization error: I already renamed LabelSetImageSerializer into MultiLabelSegmentationSerializer, but the data class still names LabeSetImage. I forgot that our scene serializer logic deduces the serializer by <className>+Serializer.
Thus it breaks now. I guess the simpelest solution for now would be to rename the serializer class back.

s434n added a revision: Restricted Differential Revision.May 3 2023, 5:26 PM
s434n added a revision: Restricted Differential Revision.May 3 2023, 5:40 PM