fix(segmentation): Allow for manually added label map and contour segmentations to be used as viewport data overlays. (#5562)
This commit is contained in:
1 parent
5c44fe06dc
commit
02f6744dab
4 files changed
+25
-15
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { Enums as csToolsEnums } from '@cornerstonejs/tools';
|
||||
|
||||
import {
|
||||
setUpSelectedSegmentationsForViewportHandler,
|
||||
setupSegmentationDataModifiedHandler,
|
||||
@@ -28,7 +30,7 @@ export const setUpSegmentationEventHandlers = ({ servicesManager, commandsManage
|
||||
}
|
||||
|
||||
const segmentation = segmentationService.getSegmentation(segmentationId);
|
||||
const label = segmentation.cachedStats.info;
|
||||
const label = segmentation.label;
|
||||
const imageIds =
|
||||
segmentation.representationData?.Labelmap?.imageIds ??
|
||||
segmentation.representationData?.Contour?.imageIds;
|
||||
@@ -39,7 +41,9 @@ export const setUpSegmentationEventHandlers = ({ servicesManager, commandsManage
|
||||
SOPClassUID: '1.2.840.10008.5.1.4.1.1.66.4',
|
||||
SOPClassHandlerId: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
|
||||
SeriesDescription: label,
|
||||
Modality: 'SEG',
|
||||
Modality: segmentation.representationData[csToolsEnums.SegmentationRepresentations.Contour]
|
||||
? 'RTSTRUCT'
|
||||
: 'SEG',
|
||||
numImageFrames: imageIds.length,
|
||||
imageIds,
|
||||
isOverlayDisplaySet: true,
|
||||
|
||||
Reference in new issue
Block a user