Segment Editor: Threshold with masking

I am trying to use the Segment Editor Threshold tool with a mask. I select a subregion, the segment named mask in yellow, and set that segment as the Editable Area. Then I add a second segment, and select an intensity range with the Threshold tool. The preview extends outside the mask, but that’s ok. The view is [1] below. Next I select a range and hit Apply, which results in a subtraction from the mask segment, rather than Segment_2 containing only the thresholded region inside mask. Is this expected, a bug, or user error?

(I’ve also managed several times to get in a state in which none of the tools are responsive until I delete all segments, but I don’t have a reproduction workflow yet)





This is Slicer 4.10.0 on macOS 10.13 by the way.

What you describe seems to be the expected behavior: if in masking section “Overwrite other segments” is left at default value of “All segments” then you overwrite the mask segment when you draw in another segment.

For masking with a segment, I usually hide the mask segment and set “Overwrite other segments” to “Visible segments”.

Ok, that works. Thanks! I had tried setting “Overwrite other segments” to “None”, but that didn’t seem to work.

One minor thing I noticed, not sure if it is worth a bug report: switching the selected segment while the Threshold tool is active removes the content of the previously-selected segment. (screencap)

Thanks for reporting. Opacity of the segment is set to 0 and not reverted if we switch to another segment (you can restore it in Segmentations module / Display / Advanced). I’ll fix this.

1 Like

This has been fixed now (in r27625).

1 Like