fix(Segmentation): [Bug #5420] Segmentation color resets after using toggleOneUp (#5465)

This commit is contained in:
Vinícius Alves de Faria Resende authored and GitHub committed 2025-10-07 13:23:26 -04:00
1 parent 0803dce328
commit 2c6ce21c8f
2 files changed
+60 -5

No files matched your search

@@ -983,6 +983,12 @@ class SegmentationService extends PubSubService {
segmentIndex: number,
color: csTypes.Color
): void {
const segmentationRepresentations = this.getSegmentationRepresentations(viewportId, {
segmentationId,
});
const { colorLUTIndex } = segmentationRepresentations[0];
this._segmentationIdToColorLUTIndexMap.set(segmentationId, colorLUTIndex);
cstSegmentation.config.color.setSegmentIndexColor(
viewportId,
segmentationId,