fix(SegmentationStyle): Fix inactive contour visibility and styling. (#5563)

* Opacity, fill and outline properties for active and inactive contours
are now consistent with those for label map segmentations.
The properties for inactive segmentations are applied to BOTH
inactive contours and label maps.

* Activate the selected segmentation for a type when the alpha, outline width, or fill/outline visibility is changed.
This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2025-11-19 17:55:53 -05:00
1 parent 62797acd9a
commit 5c17c262ea
23 files changed
+395 -361

No files matched your search

+9 -1
View File
@@ -137,10 +137,18 @@ export default async function init({
getSegmentationPresentationId
);
cornerstoneTools.segmentation.config.style.setStyle(
segmentationService.setStyle(
{ type: SegmentationRepresentations.Contour },
{
// Declare these alpha values at the Contour type level so that they can be set/changed/inherited for all contour segmentations.
fillAlpha: 0.5,
fillAlphaInactive: 0.4,
// In general do not fill contours so that hydrated RTSTRUCTs are not filled in when active or inactive by default.
// However, hydrated RTSTRUCTs are filled in when active or inactive if the user chooses to fill ALL contours.
// Those Contours created in OHIF (i.e. using the Segmentation Panel) will override both fill properties upon creation.
renderFill: false,
renderFillInactive: false,
}
);