bbkonk
(Brandon)
February 7, 2024, 11:15pm
1
Not sure if this is a Slicer issue or a MONAI issue, but I’ve only hit the issue so far using the MONAILabel and MONAILabel Reviewer plugins. When I use threshold an image and see, for example Editable area = Inside segment_1), after “Apply” the segmentation mask for that label disappears from all 2d views. Any paint etc. drawing done after that point similarly does not appear in the 2d views. I do however see the label in the 3d view (including post-threshold values and any modifications I make with paint etc.).
bbkonk
(Brandon)
February 8, 2024, 1:35pm
2
I’ve tried a few versions including the stable 5.6.1 and the 5.7.0 release.
lassoan
(Andras Lasso)
February 11, 2024, 11:50am
3
The issue is fixed now in the Slicer Preview Release.
Slicer:main
← lassoan:fix-segment-disappear
opened 01:22PM - 09 Feb 24 UTC
When a single vtkMRMLSegmentEditorNode was used by multiple qSlicerSegmentEditor… Widget instances then after using Threshold effect, the current segment disappeared from slice views.
The reason was that Threshold effects in every segment editor widgets get activated (via sharing the segment editor node) and they all started preview, saved original segment opacity, and then on "Apply" restored the original segment opacity. However, the segment opacity that was restored by second, third, etc. effects were not the original anymore, but it was already the opacity that was set to 0 (it has to be set to 0 to prevent the current segment occluding the preview).
The solution could have been to store the original opacity in a shared location (e.g., in the segment editor node), but that would not have solved the slight rendering issue (preview glow was darker) and performance degradation caused by several effects showing the preview glow at the same time.
Fixed it by storing the object ID of the threshold effect that manipulates the segmentation display node in the node's "SegmentEditor.PreviewingEffect" attribute. All other Threshold effects check this attribute and if they find that another effect already provide preview then they don't display the preview.
This commit also fixes disappearing segment when selecting another segmentation node while the Threshold effect is active.
fixes #6874