Page MenuHomePhabricator

[Segmentation] Threshold tool crashes when new label is created during preview
Closed, ResolvedPublic


Steps to reproduce:

  • create a new segmentation
  • open "Threshold" or "UL Threshold" tool
  • add another label / label instance (which should now be active)
  • press "Confirm Segmentation"
  • -> an error pop ups Error accessing single time steps of the original image. Cannot create segmentation

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

s434n triaged this task as High priority.May 8 2023, 9:57 AM
s434n created this task.

Seems to be related to

Since I found the following comment on a crucial code location for this task: // this is a fix for T28131 / T28986, which should be refactored if T28524 is being worked on

The label mapping is corrupt when following the instructions given in the task description: {2, 2}. However, the source image does not have label value 2 since it was later added in the destination image while the tool has already been already. The method EnsureUpToDateUserDefinedActiveLabel() seems to be explicitly addressing this issue so I will check if I simply need to call it to fix this task.

edit: Everything in that regard is already correct but the preview image that was probably converted from an image to a label set image in the recent past, was not used as such, e.g., only pixels were written but label data was completely ignored.

kislinsk added a revision: Restricted Differential Revision.May 9 2023, 11:57 AM

Request for Discussion:

  • Notify tools about selected label changes or label property changes like color?
  • Show preview as active or inactive label (with or without border)?
kislinsk added subscribers: floca, kislinsk.

@floca wants to resolve these crashes differently. Handing over...