Problem changing the individual segment opacity in slice views

I’m having trouble changing an individual segment’s opacity and was wondering if this was a bug or expected behavior.

I set the segmentation wide slice fill opacity to 1.0, and then set the individual segment opacity to 0.5. I observe that the segment in the 3D window changes appropriately to 50% opacity, but the opacity is not also changed in the slice views. Should the opacity value defined for the individual segment here in the Segmentations module apply to both the “3D” and “Slice fill” opacity? The [documentation] indicates that segment opacity and segmentation opacity should be multiplied. In this case 1 * 0.5 = 0.5 opacity for Slice fill for “Segment_1”.

I have observed this behavior in Slicer 5.0.3 (latest stable), Slicer 5.1.0-2022-08-16 (latest preview) and also Slicer 4.11.20210226 (former stable).

I see now that the hovertip for the “Opacity” table header says it is the segment opacity specifically for the 3D views. Is there a reason why this column is ultimately just calling SetSegmentOpacity3D rather than SetSegmentOpacity which would set the value for 2D Fill and 3D to be the same? The general term for the column header of “Opacity” seems like it should manipulate both, while the header should be “3D Opacity” if it really is only supposed to manipulate the 3D views and indicated by the tooltip.


I’ve issued the following PR which changes the opacity widget in the segments table to update not only Segment Opacity 3D, but also 2D Fill and 2D Outline.