Files
ohif-viewer/platform/docs/docs/migration-guide/3p12-to-3p13/segmentation-service.md
T
b35354120a fix(segmentation overlay): update viewport ds list upon seg delete - OHIF-2425 (#5729)
- add segmentationExists check to getSopClassHandlerModule
- now firing SEGMENTATION_REMOVED and SEGMENTATION_REPRESENTATION_REMOVED events
- centralized segmentation removal in a listener
- when a segmentation is deleted (completely), remove it from all viewports it overlays
- when a segmentation is removed from a viewport, remove it as overlay from the viewport

---------

Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
2026-02-18 20:31:43 -05:00

1.4 KiB
Raw Blame History

sidebar_position, sidebar_label, title
sidebar_position sidebar_label title
2 SegmentationService SegmentationService API change

SegmentationService – method rename

The SegmentationService method for removing segmentation representations from a viewport has been renamed to better reflect its behavior.

Change

3.12 (old) 3.13 (new)
removeSegmentationRepresentations removeRepresentationsFromViewport

The signature is unchanged:

removeRepresentationsFromViewport(
  viewportId: string,
  specifier?: {
    segmentationId?: string;
    type?: SegmentationRepresentations;
  }
): void

Migration

Replace calls to removeSegmentationRepresentations with removeRepresentationsFromViewport.

Before (3.12):

segmentationService.removeSegmentationRepresentations(viewportId);
// or with a specifier:
segmentationService.removeSegmentationRepresentations(viewportId, { segmentationId });

After (3.13):

segmentationService.removeRepresentationsFromViewport(viewportId);
// or with a specifier:
segmentationService.removeRepresentationsFromViewport(viewportId, { segmentationId });

Reason

The new name makes it clear that the method removes representations from a specific viewport, rather than removing segmentations globally.