Page MenuHomePhabricator

[Segmentation] 3D tools overwrite / remove previous mask if reconfirmed
Closed, ResolvedPublic

Description

The 3D Tools (e.g. Threshold, FastMarching 3D, Region Growing 3D) compute a preview for the current settings. The preview can be confirmed and written into the slice (slices for 4D segmentations).
This will overwrite any existing segmentation mask - also if this mask was e.g. created by the simple Add-tool or even the same tool (e.g. using Threshold twice).

So in contrast to the 2D tools it is not possible to add up / combine different segmented patches one after another, like it can be easily done with the 2D tools.

This is especially problematic for static 4D segmentations: here you can not use the 3D tools (e.g. Threshold) to segment a slice and add another segmentation on the next timestep - it will overwrite the segmentation from the previous timestep.

To reproduce:

  • load a 3D image, open the segmentation plugin, create a new segmentation (labelsetimage)
  • use the Threshold-tool to create a segmentation mask
  • confirm the preview and see how the segmentation is written into the slice
  • use e.g. the UL Threshold to create another segmentation mask
  • confirm the preview and see how the new segmentation is written into the slice and the previous mask is completely removed
  • load a 4D image, open the multilabel-segmentation plugin, create a new STATIC segmentation (labelsetimage)
  • create a new label on the first layer
  • create another label on the first layer (distinct color)
  • use the 2D Add-tool to create a segmentation mask for the second label
  • use the 3D Threshold-tool to create a segmentation mask for the first label
  • see how the new segmentation is written into the slice and the previous mask is completely removed
  • change the timestep
    • see how the threshold segmentation mask does not fit the underlying image anymore that well
  • use the 3D Threshold-tool to create a segmentation mask for the first label on the new timestep
  • see how the new segmentation is written into the slice and the previous mask is completely removed
  • change back to the previous timestep
    • see how the threshold segmentation mask does not fit the underlying image anymore that well

There is a checkbox "Create as new segmentation" but this will only allow to create a new segmentation node and prevent overwriting - but it does not change the behavior when it comes to "combining masks one after another".

Revisions and Commits

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

Event Timeline

kalali triaged this task as Normal priority.EditedFeb 23 2022, 3:44 PM
kalali created this task.

This is a know issue and was already discussed here: T28131#223660

I just realized that this should be mentioned in the checklists!

floca added a revision: Restricted Differential Revision.Apr 5 2022, 5:47 PM
floca added a revision: Restricted Differential Revision.Apr 5 2022, 6:07 PM
floca added a revision: Restricted Differential Revision.Apr 6 2022, 6:51 PM

I realized that this is a slightly different topic and is not completely solved with D622:

  • creating a new e.g. Threshold-Segmentation on an already existing label will overwrite the same label
    • this is maybe desired but I would like to discuss the use case where a user wants to create different patches for the same mask by a segmentation tool multiple times
      • e.g. by using the threshold with a very low and a very high threshold and combining / adding both masks / patches
      • e.g. by creating different patches on different time steps for the same label (i.e. as written in the task description)

I realized that this is a slightly different topic and is not completely solved with D622:

  • creating a new e.g. Threshold-Segmentation on an already existing label will overwrite the same label
    • this is maybe desired but I would like to discuss the use case where a user wants to create different patches for the same mask by a segmentation tool multiple times
      • e.g. by using the threshold with a very low and a very high threshold and combining / adding both masks / patches
      • e.g. by creating different patches on different time steps for the same label (i.e. as written in the task description)

This is also covered by the transfer function. But I havent activated this feature. I deemed it to much intervention in the release phase. That feature should be generaly added for all auto tools after the upcoming release.

Ok, then we keep it for now with the Next Milestone tag. However, do you still claim this task? Do you want the D622 to be linked with this task?

floca removed floca as the assignee of this task.Apr 13 2022, 1:10 PM
floca added a project: Request for Discussion.

Task text needs clarification before some one works on it.

The feature to add preview content to a label instead of replacing it is understood. But the task text also criticises things, where I am not sure if it is realy a bug but just intended behavior.
e.g.

  • change the timestep
    • see how the threshold segmentation mask does not fit the underlying image anymore that well

As a static seg is used. I would expect this behavior. Even for a dynamic seg, if not "process all time steps" are activated.

[...] But the task text also criticises things, where I am not sure if it is realy a bug but just intended behavior.
e.g.

  • change the timestep
    • see how the threshold segmentation mask does not fit the underlying image anymore that well

As a static seg is used. I would expect this behavior. Even for a dynamic seg, if not "process all time steps" are activated.

This was not meant as a criticism but just to bring this behavior to the attention of the user. Because it is important to realize what's happening, to understand that a new mask was created and the old one was overwritten.

This was not meant as a criticism but just to bring this behavior to the attention of the user. Because it is important to realize what's happening, to understand that a new mask was created and the old one was overwritten.

Thank you for the clarification. 🙏

Solved in context of i.a. T28982. Now this is handled correctly and user can also configure the behavior.