Segmentation Service
Overview​
Using Segmentation Service you can create, edit and delete segmentation data, and change appearance of the segmentation including color, opacity and visibility.
Segmentations in OHIF are based on the Segmentations in Cornerstone3D. You can read more about it in the Cornerstone Segmentation. OHIF currently only supports one representation of the segmentation data.
Events​
There are seven events that get publish in MeasurementService
:
Event | Description |
---|---|
SEGMENTATION_MODIFIED | Fires when a segmentation is updated e.g., segment added, removed etc. |
SEGMENTATION_DATA_MODIFIED | Fires when the segmentation data changes |
SEGMENTATION_ADDED | Fires when a new segmentation is added to OHIF |
SEGMENTATION_REMOVED | Fires when a segmentation is removed from OHIF |
SEGMENT_LOADING_COMPLETE | Fires when a segment group adds its pixel data to the volume |
SEGMENTATION_LOADING_COMPLETE | Fires when the full segmentation volume is filled with its segments |
API​
Segmentation Creation​
createEmptyLabelmapForDisplaySetUID
: based on a reference displaySet, create a new segmentation. E.g., create a new segmentation based on a CT seriescreateSegmentationForSEGDisplaySet
: given a segDisplaySet loaded by a sopClassHandler, create a new segmentationaddSegmentationRepresentationToToolGroup
: given the toolGroupId, add the given segmentationId to the toolGroup.
Segmentation Behavior​
- setActiveSegmentationForToolGroup, getSegmentations, getSegmentation, jumpToSegmentCenter, highlightSegment
Segment Behavior​
- setSegmentLocked, removeSegment, addSegment, setSegmentLocked, setSegmentLabel, setActiveSegment, setSegmentRGBAColor
Segmentation Configuration​
Setters
- setSegmentVisibility, setSegmentColor, setSegmentRGBA, setSegmentOpacity, toggleSegmentationVisibility,