HomePhabricator
Diffusion MITK 41d11b884ad5

[Segmentation/IO] Fix several crashes with empty groups

Tags
None
Referenced Files
F2658792: EmptyGroups.mitk
May 12 2023, 11:37 AM
Subscribers
None

Description

[Segmentation/IO] Fix several crashes with empty groups

Summary:

  • Make LabelSetImage::GetLabelsInGroup() robust against empty group scenarios
  • Make interpolation robust against multiple new empty groups at once

Fixes T29573

Test Plan:

  • Create segmentation
  • Delete last label from Group 0
  • Save empty segmentation -> no crash anymore
  • Load empty segmentation -> segmentation contains an empty Group 0
  • Save project -> no crash anymore
  • Load project -> project contains segmentation with empty Group 0

Furthermore open F2658792 to fiddle around with several segmentations that have different empty groups.

Reviewers: floca, O1 MITK Reviewer Group I

Reviewed By: floca, O1 MITK Reviewer Group I

Maniphest Tasks: T29573

Differential Revision: https://phabricator.mitk.org/D828

Details

Provenance
kislinskAuthored on May 12 2023, 9:32 AM
kislinskPushed on May 12 2023, 11:37 AM
Reviewer
O1: MITK Reviewer Group I
Differential Revision
Restricted Differential Revision
Parents
rMITKd9f6ca2f596d: Automatically set .json file ending for MxN layout files
rMITK774bfbbef98e: Fix reinitialization of group-to-label map
Branches
Unknown
Tags
Unknown
Tasks
T29573: [Segmentation] Segmentation without label (only empty Group 0) cannot be saved