- 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>
1.4 KiB
1.4 KiB
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.