@ohif/extension-cornerstone 3.14.0-beta.10 → 3.14.0-beta.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/915.ohif-extension-cornerstone.umd.js +1 -1
- package/dist/ohif-extension-cornerstone.umd.js +1 -5
- package/package.json +33 -25
- package/src/Viewport/OHIFCornerstoneViewport.css +46 -0
- package/src/Viewport/OHIFCornerstoneViewport.tsx +502 -0
- package/src/Viewport/Overlays/CornerstoneOverlays.tsx +103 -0
- package/src/Viewport/Overlays/CustomizableViewportOverlay.css +25 -0
- package/src/Viewport/Overlays/CustomizableViewportOverlay.tsx +469 -0
- package/src/Viewport/Overlays/ViewportImageScrollbar.tsx +106 -0
- package/src/Viewport/Overlays/ViewportImageSliceLoadingIndicator.tsx +87 -0
- package/src/Viewport/Overlays/ViewportOrientationMarkers.css +41 -0
- package/src/Viewport/Overlays/ViewportOrientationMarkers.tsx +136 -0
- package/src/Viewport/Overlays/ViewportSliceProgressScrollbar/ViewportSliceProgressScrollbar.tsx +195 -0
- package/src/Viewport/Overlays/ViewportSliceProgressScrollbar/helpers.ts +46 -0
- package/src/Viewport/Overlays/ViewportSliceProgressScrollbar/hooks.ts +383 -0
- package/src/Viewport/Overlays/ViewportSliceProgressScrollbar/index.ts +1 -0
- package/src/Viewport/Overlays/ViewportSliceProgressScrollbar/types.ts +17 -0
- package/src/Viewport/Overlays/utils.ts +66 -0
- package/src/commandsModule.ts +2951 -0
- package/src/components/AccordionGroup/AccordionGroup.tsx +195 -0
- package/src/components/AccordionGroup/index.ts +4 -0
- package/src/components/ActiveViewportWindowLevel/ActiveViewportWindowLevel.tsx +23 -0
- package/src/components/ActiveViewportWindowLevel/index.js +1 -0
- package/src/components/AdvancedRenderingControls/AdvancedRenderingControls.tsx +149 -0
- package/src/components/AdvancedRenderingControls/index.ts +1 -0
- package/src/components/CinePlayer/CinePlayer.tsx +247 -0
- package/src/components/CinePlayer/index.ts +3 -0
- package/src/components/DicomUpload/DicomUpload.tsx +111 -0
- package/src/components/DicomUpload/DicomUploadProgress.tsx +396 -0
- package/src/components/DicomUpload/DicomUploadProgressItem.tsx +119 -0
- package/src/components/ExportSegmentationSubMenuItem.tsx +75 -0
- package/src/components/MeasurementItems.tsx +70 -0
- package/src/components/MeasurementTableNested.tsx +30 -0
- package/src/components/MeasurementsMenu.tsx +84 -0
- package/src/components/MeasurementsOrAdditionalFindings.tsx +82 -0
- package/src/components/ModalityLoadBadge/ModalityLoadBadge.tsx +171 -0
- package/src/components/ModalityLoadBadge/index.ts +1 -0
- package/src/components/NavigationComponent/NavigationComponent.tsx +138 -0
- package/src/components/NavigationComponent/index.ts +3 -0
- package/src/components/OHIFViewportActionCorners.tsx +94 -0
- package/src/components/OpacityMenu/OpacityMenu.tsx +54 -0
- package/src/components/OpacityMenu/OpacityMenuWrapper.tsx +85 -0
- package/src/components/OpacityMenu/index.ts +2 -0
- package/src/components/PanelAccordionTrigger.tsx +48 -0
- package/src/components/SegmentationToolConfig.tsx +71 -0
- package/src/components/SegmentationUtilityButton.tsx +61 -0
- package/src/components/SelectItemWithModality.tsx +29 -0
- package/src/components/SeriesMeasurements.tsx +90 -0
- package/src/components/SeriesSummaryFromDisplaySet.tsx +21 -0
- package/src/components/StudyMeasurements.tsx +88 -0
- package/src/components/StudyMeasurementsActions.tsx +75 -0
- package/src/components/StudySummaryFromMetadata.test.ts +47 -0
- package/src/components/StudySummaryFromMetadata.tsx +31 -0
- package/src/components/StudySummaryWithActions.tsx +14 -0
- package/src/components/ThresholdMenu/ThresholdMenu.tsx +104 -0
- package/src/components/ThresholdMenu/ThresholdMenuWrapper.tsx +85 -0
- package/src/components/ThresholdMenu/index.ts +2 -0
- package/src/components/TrackingStatus/TrackingStatus.tsx +32 -0
- package/src/components/TrackingStatus/index.ts +1 -0
- package/src/components/VOIManualControlMenu/VOIManualControlMenu.tsx +190 -0
- package/src/components/VOIManualControlMenu/VOIManualControlMenuWrapper.tsx +85 -0
- package/src/components/VOIManualControlMenu/index.ts +2 -0
- package/src/components/ViewportColorbar/ViewportColorbar.tsx +150 -0
- package/src/components/ViewportColorbar/ViewportColorbarsContainer.tsx +125 -0
- package/src/components/ViewportColorbar/index.ts +5 -0
- package/src/components/ViewportDataOverlaySettingMenu/ViewportDataOverlayMenu.tsx +538 -0
- package/src/components/ViewportDataOverlaySettingMenu/ViewportDataOverlayMenuWrapper.tsx +91 -0
- package/src/components/ViewportDataOverlaySettingMenu/utils.ts +118 -0
- package/src/components/ViewportOrientationMenu/ViewportOrientationMenu.tsx +249 -0
- package/src/components/ViewportOrientationMenu/ViewportOrientationMenuWrapper.tsx +29 -0
- package/src/components/ViewportWindowLevel/ViewportWindowLevel.tsx +261 -0
- package/src/components/ViewportWindowLevel/getViewportVolumeHistogram.ts +72 -0
- package/src/components/ViewportWindowLevel/histogramWorker.js +97 -0
- package/src/components/ViewportWindowLevel/index.js +1 -0
- package/src/components/ViewportWindowLevel/utils.ts +176 -0
- package/src/components/WindowLevelActionMenu/Colorbar.tsx +30 -0
- package/src/components/WindowLevelActionMenu/Colormap.tsx +121 -0
- package/src/components/WindowLevelActionMenu/VolumeLighting.tsx +82 -0
- package/src/components/WindowLevelActionMenu/VolumeRenderingOptions.tsx +38 -0
- package/src/components/WindowLevelActionMenu/VolumeRenderingPresets.tsx +36 -0
- package/src/components/WindowLevelActionMenu/VolumeRenderingPresetsContent.tsx +78 -0
- package/src/components/WindowLevelActionMenu/VolumeRenderingQuality.tsx +64 -0
- package/src/components/WindowLevelActionMenu/VolumeShade.tsx +47 -0
- package/src/components/WindowLevelActionMenu/VolumeShift.tsx +92 -0
- package/src/components/WindowLevelActionMenu/WindowLevel.tsx +157 -0
- package/src/components/WindowLevelActionMenu/WindowLevelActionMenu.tsx +102 -0
- package/src/components/WindowLevelActionMenu/WindowLevelActionMenuWrapper.tsx +131 -0
- package/src/components/WindowLevelActionMenu/defaultWindowLevelPresets.ts +23 -0
- package/src/components/WindowLevelActionMenu/index.ts +11 -0
- package/src/components/WindowLevelActionMenu/windowLevelPresetHotkeys.test.ts +19 -0
- package/src/components/index.ts +12 -0
- package/src/constants/index.ts +13 -0
- package/src/customizations/CustomDropdownMenuContent.tsx +106 -0
- package/src/customizations/CustomSegmentStatisticsHeader.tsx +140 -0
- package/src/customizations/captureViewportModalCustomization.tsx +175 -0
- package/src/customizations/colorbarCustomization.ts +93 -0
- package/src/customizations/gpuSettingsPresetCustomization.ts +8 -0
- package/src/customizations/layoutSelectorCustomization.ts +104 -0
- package/src/customizations/measurementsCustomization.ts +124 -0
- package/src/customizations/miscCustomization.ts +22 -0
- package/src/customizations/modalityColorMapCustomization.ts +23 -0
- package/src/customizations/segmentationHydrationCustomization.ts +16 -0
- package/src/customizations/segmentationPanelCustomization.tsx +119 -0
- package/src/customizations/segmentationToolbarCustomization.ts +964 -0
- package/src/customizations/toolGroupToolsCustomization.ts +204 -0
- package/src/customizations/toolbarButtonsCustomization.ts +805 -0
- package/src/customizations/viewportClickCommandsCustomization.ts +15 -0
- package/src/customizations/viewportDownloadWarningCustomization.tsx +6 -0
- package/src/customizations/viewportOverlayCustomization.tsx +46 -0
- package/src/customizations/viewportScrollbarCustomization.tsx +27 -0
- package/src/customizations/viewportToolsCustomization.ts +33 -0
- package/src/customizations/volumeRenderingCustomization.ts +14 -0
- package/src/customizations/windowLevelPresetsCustomization.ts +5 -0
- package/src/enums.ts +9 -0
- package/src/getCustomizationModule.tsx +54 -0
- package/src/getHangingProtocolModule.ts +47 -0
- package/src/getPanelModule.tsx +128 -0
- package/src/getSopClassHandlerModule.js +284 -0
- package/src/getToolbarModule.tsx +622 -0
- package/src/hooks/index.ts +8 -0
- package/src/hooks/useActiveViewportSegmentationRepresentations.ts +14 -0
- package/src/hooks/useMeasurementTracking.ts +132 -0
- package/src/hooks/useMeasurements.ts +104 -0
- package/src/hooks/useSegmentations.ts +147 -0
- package/src/hooks/useViewportDisplaySets.ts +284 -0
- package/src/hooks/useViewportHover.ts +77 -0
- package/src/hooks/useViewportRendering.tsx +868 -0
- package/src/hooks/useViewportSegmentations.ts +245 -0
- package/src/hps/fourUp.ts +117 -0
- package/src/hps/frameView.ts +1581 -0
- package/src/hps/main3D.ts +142 -0
- package/src/hps/mpr.ts +197 -0
- package/src/hps/mprAnd3DVolumeViewport.ts +124 -0
- package/src/hps/only3D.ts +70 -0
- package/src/hps/primary3D.ts +142 -0
- package/src/hps/primaryAxial.ts +114 -0
- package/src/id.js +5 -0
- package/src/index.tsx +350 -0
- package/src/init.tsx +445 -0
- package/src/initCineService.ts +75 -0
- package/src/initContextMenu.ts +94 -0
- package/src/initCornerstoneTools.js +188 -0
- package/src/initDoubleClick.ts +82 -0
- package/src/initMeasurementService.ts +576 -0
- package/src/initStudyPrefetcherService.ts +33 -0
- package/src/initWADOImageLoader.js +56 -0
- package/src/panels/PanelMeasurement.tsx +84 -0
- package/src/panels/PanelSegmentation.tsx +338 -0
- package/src/services/ColorbarService/ColorbarService.ts +242 -0
- package/src/services/ColorbarService/index.ts +2 -0
- package/src/services/CornerstoneCacheService/CornerstoneCacheService.ts +326 -0
- package/src/services/CornerstoneCacheService/index.js +3 -0
- package/src/services/SegmentationService/RTSTRUCT/mapROIContoursToRTStructData.ts +36 -0
- package/src/services/SegmentationService/SegmentationService.test.ts +3698 -0
- package/src/services/SegmentationService/SegmentationService.ts +2376 -0
- package/src/services/SegmentationService/backends/ISegmentationBackend.ts +102 -0
- package/src/services/SegmentationService/backends/ISegmentationServiceInternals.ts +44 -0
- package/src/services/SegmentationService/backends/LegacySegmentationBackend.ts +139 -0
- package/src/services/SegmentationService/backends/NextSegmentationBackend.ts +159 -0
- package/src/services/SegmentationService/backends/index.ts +4 -0
- package/src/services/SegmentationService/index.ts +3 -0
- package/src/services/SyncGroupService/SyncGroupService.ts +264 -0
- package/src/services/SyncGroupService/createHydrateSegmentationSynchronizer.ts +118 -0
- package/src/services/SyncGroupService/index.js +3 -0
- package/src/services/ToolGroupService/ToolGroupService.test.ts +83 -0
- package/src/services/ToolGroupService/ToolGroupService.ts +541 -0
- package/src/services/ToolGroupService/index.js +3 -0
- package/src/services/ViewedDataService/ViewedDataService.ts +58 -0
- package/src/services/ViewedDataService/index.ts +3 -0
- package/src/services/ViewportService/CornerstoneViewportService.ts +1814 -0
- package/src/services/ViewportService/IViewportService.ts +64 -0
- package/src/services/ViewportService/Viewport.ts +372 -0
- package/src/services/ViewportService/adapter/IViewportAdapter.contract.test.ts +467 -0
- package/src/services/ViewportService/adapter/IViewportAdapter.ts +179 -0
- package/src/services/ViewportService/adapter/LegacyViewportAdapter.ts +240 -0
- package/src/services/ViewportService/adapter/NextViewportAdapter.ts +241 -0
- package/src/services/ViewportService/adapter/getViewportAdapter.ts +62 -0
- package/src/services/ViewportService/adapter/index.ts +16 -0
- package/src/services/ViewportService/backends/IViewportBackend.ts +195 -0
- package/src/services/ViewportService/backends/IViewportOperations.ts +98 -0
- package/src/services/ViewportService/backends/IViewportServiceInternals.ts +47 -0
- package/src/services/ViewportService/backends/LegacyViewportBackend.ts +264 -0
- package/src/services/ViewportService/backends/LegacyViewportOperations.ts +272 -0
- package/src/services/ViewportService/backends/NextViewportBackend.ts +671 -0
- package/src/services/ViewportService/backends/NextViewportOperations.ts +169 -0
- package/src/services/ViewportService/backends/README.md +62 -0
- package/src/services/ViewportService/backends/dataIdRegistry.ts +121 -0
- package/src/services/ViewportService/backends/viewportOperations.ts +71 -0
- package/src/services/ViewportService/constants.ts +3 -0
- package/src/state.ts +34 -0
- package/src/stores/index.ts +5 -0
- package/src/stores/presentationUtils.ts +42 -0
- package/src/stores/useLutPresentationStore.ts +166 -0
- package/src/stores/usePositionPresentationStore.ts +172 -0
- package/src/stores/useSegmentationPresentationStore.test.ts +146 -0
- package/src/stores/useSegmentationPresentationStore.ts +417 -0
- package/src/stores/useSelectedSegmentationsForViewportStore.ts +85 -0
- package/src/stores/useSynchronizersStore.ts +84 -0
- package/src/synchronizers/frameViewSynchronizer.ts +52 -0
- package/src/tools/CalibrationLineTool.ts +97 -0
- package/src/tools/ImageOverlayViewerTool.tsx +279 -0
- package/src/tools/OverlayPlaneModuleProvider.ts +40 -0
- package/src/tools/WindowLevelTool.test.ts +55 -0
- package/src/tools/WindowLevelTool.ts +22 -0
- package/src/types/AppTypes.ts +70 -0
- package/src/types/Colorbar.ts +114 -0
- package/src/types/Colormap.ts +16 -0
- package/src/types/CornerstoneCacheService.ts +40 -0
- package/src/types/CornerstoneServices.ts +18 -0
- package/src/types/Presentation.ts +83 -0
- package/src/types/SelectedSegmentationByTypeMap.ts +3 -0
- package/src/types/ViewportPresets.ts +53 -0
- package/src/types/VolumeLighting.ts +7 -0
- package/src/types/VolumeRenderingConfig.ts +8 -0
- package/src/types/WindowLevel.ts +5 -0
- package/src/types/index.ts +10 -0
- package/src/utils/ActiveViewportBehavior.tsx +80 -0
- package/src/utils/CornerstoneViewportDownloadForm.tsx +319 -0
- package/src/utils/DicomFileUploader.ts +204 -0
- package/src/utils/JumpPresets.ts +14 -0
- package/src/utils/autoHydrateViewportTypes.ts +69 -0
- package/src/utils/colormaps.js +1597 -0
- package/src/utils/createSegmentationForViewport.ts +83 -0
- package/src/utils/dicomLoaderService.js +225 -0
- package/src/utils/ecgMetadata.test.ts +137 -0
- package/src/utils/ecgMetadata.ts +109 -0
- package/src/utils/findNearbyToolData.test.ts +125 -0
- package/src/utils/findNearbyToolData.ts +21 -0
- package/src/utils/generateSegmentationCSVReport.test.ts +324 -0
- package/src/utils/generateSegmentationCSVReport.ts +131 -0
- package/src/utils/getActiveViewportEnabledElement.test.ts +70 -0
- package/src/utils/getActiveViewportEnabledElement.ts +8 -0
- package/src/utils/getCenterExtent.test.ts +313 -0
- package/src/utils/getCenterExtent.ts +46 -0
- package/src/utils/getCornerstoneBlendMode.test.ts +59 -0
- package/src/utils/getCornerstoneBlendMode.ts +25 -0
- package/src/utils/getCornerstoneOrientation.test.ts +78 -0
- package/src/utils/getCornerstoneOrientation.ts +31 -0
- package/src/utils/getCornerstoneViewportType.test.ts +169 -0
- package/src/utils/getCornerstoneViewportType.ts +88 -0
- package/src/utils/getInterleavedFrames.test.ts +85 -0
- package/src/utils/getInterleavedFrames.ts +73 -0
- package/src/utils/getLegacyViewportType.ts +64 -0
- package/src/utils/getNthFrames.test.ts +145 -0
- package/src/utils/getNthFrames.ts +31 -0
- package/src/utils/getViewportEnabledElement.test.ts +83 -0
- package/src/utils/getViewportEnabledElement.ts +8 -0
- package/src/utils/getViewportOrientationFromImageOrientationPatient.test.ts +50 -0
- package/src/utils/getViewportOrientationFromImageOrientationPatient.ts +56 -0
- package/src/utils/hydrationUtils.test.ts +572 -0
- package/src/utils/hydrationUtils.ts +197 -0
- package/src/utils/imageSliceSync/calculateViewportRegistrations.ts +28 -0
- package/src/utils/imageSliceSync/toggleImageSliceSync.ts +101 -0
- package/src/utils/index.ts +29 -0
- package/src/utils/initGpuSettingsPreset.ts +51 -0
- package/src/utils/initViewTiming.test.ts +342 -0
- package/src/utils/initViewTiming.ts +52 -0
- package/src/utils/initWebWorkerProgressHandler.test.ts +381 -0
- package/src/utils/initWebWorkerProgressHandler.ts +110 -0
- package/src/utils/interleave.test.ts +304 -0
- package/src/utils/interleave.ts +32 -0
- package/src/utils/interleaveCenterLoader.test.ts +547 -0
- package/src/utils/interleaveCenterLoader.ts +143 -0
- package/src/utils/interleaveTopToBottom.test.ts +487 -0
- package/src/utils/interleaveTopToBottom.ts +132 -0
- package/src/utils/isAnyDisplaySetCommon.ts +18 -0
- package/src/utils/isDisplaySetOverlayable.ts +96 -0
- package/src/utils/isMeasurementWithinViewport.test.ts +340 -0
- package/src/utils/isMeasurementWithinViewport.ts +33 -0
- package/src/utils/isReferenceViewable.test.ts +581 -0
- package/src/utils/isReferenceViewable.ts +95 -0
- package/src/utils/loadDisplaySetData.ts +49 -0
- package/src/utils/measurementServiceMappings/Angle.ts +200 -0
- package/src/utils/measurementServiceMappings/ArrowAnnotate.ts +176 -0
- package/src/utils/measurementServiceMappings/Bidirectional.ts +193 -0
- package/src/utils/measurementServiceMappings/CircleROI.ts +227 -0
- package/src/utils/measurementServiceMappings/CobbAngle.ts +206 -0
- package/src/utils/measurementServiceMappings/EllipticalROI.ts +221 -0
- package/src/utils/measurementServiceMappings/Length.ts +206 -0
- package/src/utils/measurementServiceMappings/LivewireContour.ts +175 -0
- package/src/utils/measurementServiceMappings/PlanarFreehandROI.ts +228 -0
- package/src/utils/measurementServiceMappings/Probe.ts +192 -0
- package/src/utils/measurementServiceMappings/RectangleROI.ts +225 -0
- package/src/utils/measurementServiceMappings/SegmentBidirectional.ts +184 -0
- package/src/utils/measurementServiceMappings/SplineROI.ts +227 -0
- package/src/utils/measurementServiceMappings/UltrasoundDirectional.ts +214 -0
- package/src/utils/measurementServiceMappings/UltrasoundPleuraBLine.ts +179 -0
- package/src/utils/measurementServiceMappings/constants/supportedTools.js +21 -0
- package/src/utils/measurementServiceMappings/index.ts +3 -0
- package/src/utils/measurementServiceMappings/measurementServiceMappingsFactory.ts +324 -0
- package/src/utils/measurementServiceMappings/utils/getDisplayUnit.js +3 -0
- package/src/utils/measurementServiceMappings/utils/getHandlesFromPoints.js +14 -0
- package/src/utils/measurementServiceMappings/utils/getIsLocked.ts +5 -0
- package/src/utils/measurementServiceMappings/utils/getIsVisible.ts +6 -0
- package/src/utils/measurementServiceMappings/utils/getSOPInstanceAttributes.js +66 -0
- package/src/utils/measurementServiceMappings/utils/getValueDisplayString.js +12 -0
- package/src/utils/measurementServiceMappings/utils/index.ts +17 -0
- package/src/utils/measurementServiceMappings/utils/selection.ts +33 -0
- package/src/utils/mpr/getProtocolViewportStructureFromGridViewports.ts +74 -0
- package/src/utils/nextViewportPolicies.ts +41 -0
- package/src/utils/nextViewports.ts +157 -0
- package/src/utils/nthLoader.test.ts +317 -0
- package/src/utils/nthLoader.ts +78 -0
- package/src/utils/presentations/getViewportPresentations.test.ts +280 -0
- package/src/utils/presentations/getViewportPresentations.ts +151 -0
- package/src/utils/promptHydrationDialog.test.ts +490 -0
- package/src/utils/promptHydrationDialog.ts +197 -0
- package/src/utils/removeViewportSegmentationRepresentations.test.ts +129 -0
- package/src/utils/removeViewportSegmentationRepresentations.ts +17 -0
- package/src/utils/segmentUtils.test.ts +515 -0
- package/src/utils/segmentUtils.ts +46 -0
- package/src/utils/segmentationExportUtils.test.ts +100 -0
- package/src/utils/segmentationExportUtils.ts +171 -0
- package/src/utils/segmentationHandlers.test.ts +614 -0
- package/src/utils/segmentationHandlers.ts +164 -0
- package/src/utils/setUpAnnotationEventHandlers.ts +26 -0
- package/src/utils/setUpSegmentationEventHandlers.test.ts +372 -0
- package/src/utils/setUpSegmentationEventHandlers.ts +122 -0
- package/src/utils/toggleVOISliceSync.test.ts +606 -0
- package/src/utils/toggleVOISliceSync.ts +103 -0
- package/src/utils/transitions.test.ts +351 -0
- package/src/utils/transitions.ts +300 -0
- package/src/utils/updateSegmentationStats.test.ts +942 -0
- package/src/utils/updateSegmentationStats.ts +192 -0
- package/src/utils/viewportDataShape.ts +85 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'layoutSelector.advancedPresetGenerator': ({
|
|
3
|
+
servicesManager,
|
|
4
|
+
}: {
|
|
5
|
+
servicesManager: AppTypes.ServicesManager;
|
|
6
|
+
}) => {
|
|
7
|
+
const _areSelectorsValid = (
|
|
8
|
+
hp: AppTypes.HangingProtocol.Protocol,
|
|
9
|
+
displaySets: AppTypes.DisplaySet[],
|
|
10
|
+
hangingProtocolService: AppTypes.HangingProtocolService
|
|
11
|
+
) => {
|
|
12
|
+
if (!hp.displaySetSelectors || Object.values(hp.displaySetSelectors).length === 0) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return hangingProtocolService.areRequiredSelectorsValid(
|
|
17
|
+
Object.values(hp.displaySetSelectors),
|
|
18
|
+
displaySets[0]
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const generateAdvancedPresets = ({
|
|
23
|
+
servicesManager,
|
|
24
|
+
}: {
|
|
25
|
+
servicesManager: AppTypes.ServicesManager;
|
|
26
|
+
}) => {
|
|
27
|
+
const { hangingProtocolService, viewportGridService, displaySetService } =
|
|
28
|
+
servicesManager.services;
|
|
29
|
+
|
|
30
|
+
const hangingProtocols = Array.from(hangingProtocolService.protocols.values());
|
|
31
|
+
|
|
32
|
+
const viewportId = viewportGridService.getActiveViewportId();
|
|
33
|
+
|
|
34
|
+
if (!viewportId) {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
const displaySetInstanceUIDs = viewportGridService.getDisplaySetsUIDsForViewport(viewportId);
|
|
38
|
+
|
|
39
|
+
if (!displaySetInstanceUIDs) {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const displaySets = displaySetInstanceUIDs.map(uid => {
|
|
44
|
+
const displaySet = displaySetService.getDisplaySetByUID(uid);
|
|
45
|
+
const referencedDisplaySetUID = displaySet?.measurements?.[0]?.displaySetInstanceUID;
|
|
46
|
+
if (displaySet.Modality === 'SR' && referencedDisplaySetUID) {
|
|
47
|
+
return displaySetService.getDisplaySetByUID(referencedDisplaySetUID);
|
|
48
|
+
}
|
|
49
|
+
return displaySet;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return hangingProtocols
|
|
53
|
+
.map(hp => {
|
|
54
|
+
if (!hp.isPreset) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const areValid = _areSelectorsValid(hp, displaySets, hangingProtocolService);
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
icon: hp.icon,
|
|
62
|
+
title: hp.name,
|
|
63
|
+
commandOptions: {
|
|
64
|
+
protocolId: hp.id,
|
|
65
|
+
},
|
|
66
|
+
disabled: !areValid,
|
|
67
|
+
};
|
|
68
|
+
})
|
|
69
|
+
.filter(preset => preset !== null);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return generateAdvancedPresets({ servicesManager });
|
|
73
|
+
},
|
|
74
|
+
'layoutSelector.commonPresets': [
|
|
75
|
+
{
|
|
76
|
+
icon: 'layout-common-1x1',
|
|
77
|
+
commandOptions: {
|
|
78
|
+
numRows: 1,
|
|
79
|
+
numCols: 1,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
icon: 'layout-common-1x2',
|
|
84
|
+
commandOptions: {
|
|
85
|
+
numRows: 1,
|
|
86
|
+
numCols: 2,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
icon: 'layout-common-2x2',
|
|
91
|
+
commandOptions: {
|
|
92
|
+
numRows: 2,
|
|
93
|
+
numCols: 2,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
icon: 'layout-common-2x3',
|
|
98
|
+
commandOptions: {
|
|
99
|
+
numRows: 2,
|
|
100
|
+
numCols: 3,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'cornerstone.measurements': {
|
|
3
|
+
Angle: {
|
|
4
|
+
displayText: [],
|
|
5
|
+
report: [],
|
|
6
|
+
},
|
|
7
|
+
CobbAngle: {
|
|
8
|
+
displayText: [],
|
|
9
|
+
report: [],
|
|
10
|
+
},
|
|
11
|
+
ArrowAnnotate: {
|
|
12
|
+
displayText: [],
|
|
13
|
+
report: [],
|
|
14
|
+
},
|
|
15
|
+
RectangleROi: {
|
|
16
|
+
displayText: [],
|
|
17
|
+
report: [],
|
|
18
|
+
},
|
|
19
|
+
CircleROI: {
|
|
20
|
+
displayText: [],
|
|
21
|
+
report: [],
|
|
22
|
+
},
|
|
23
|
+
EllipticalROI: {
|
|
24
|
+
displayText: [],
|
|
25
|
+
report: [],
|
|
26
|
+
},
|
|
27
|
+
Bidirectional: {
|
|
28
|
+
displayText: [],
|
|
29
|
+
report: [],
|
|
30
|
+
},
|
|
31
|
+
Length: {
|
|
32
|
+
displayText: [],
|
|
33
|
+
report: [],
|
|
34
|
+
},
|
|
35
|
+
LivewireContour: {
|
|
36
|
+
displayText: [],
|
|
37
|
+
report: [],
|
|
38
|
+
},
|
|
39
|
+
SplineROI: {
|
|
40
|
+
displayText: [
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Areas',
|
|
43
|
+
value: 'area',
|
|
44
|
+
type: 'value',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: 'areaUnits',
|
|
48
|
+
for: ['area'],
|
|
49
|
+
type: 'unit',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
report: [
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Area',
|
|
55
|
+
value: 'area',
|
|
56
|
+
type: 'value',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Unit',
|
|
60
|
+
value: 'areaUnits',
|
|
61
|
+
type: 'value',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
PlanarFreehandROI: {
|
|
66
|
+
displayTextOpen: [
|
|
67
|
+
{
|
|
68
|
+
displayName: 'Length',
|
|
69
|
+
value: 'length',
|
|
70
|
+
type: 'value',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
displayText: [
|
|
74
|
+
{
|
|
75
|
+
displayName: 'Mean',
|
|
76
|
+
value: 'mean',
|
|
77
|
+
type: 'value',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
displayName: 'Max',
|
|
81
|
+
value: 'max',
|
|
82
|
+
type: 'value',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
displayName: 'Area',
|
|
86
|
+
value: 'area',
|
|
87
|
+
type: 'value',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
value: 'pixelValueUnits',
|
|
91
|
+
for: ['mean', 'max'],
|
|
92
|
+
type: 'unit',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
value: 'areaUnits',
|
|
96
|
+
for: ['area'],
|
|
97
|
+
type: 'unit',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
report: [
|
|
101
|
+
{
|
|
102
|
+
displayName: 'Mean',
|
|
103
|
+
value: 'mean',
|
|
104
|
+
type: 'value',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
displayName: 'Max',
|
|
108
|
+
value: 'max',
|
|
109
|
+
type: 'value',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
displayName: 'Area',
|
|
113
|
+
value: 'area',
|
|
114
|
+
type: 'value',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
displayName: 'Unit',
|
|
118
|
+
value: 'unit',
|
|
119
|
+
type: 'value',
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CinePlayer } from '@ohif/ui-next';
|
|
2
|
+
import DicomUpload from '../components/DicomUpload/DicomUpload';
|
|
3
|
+
|
|
4
|
+
// Provide a wider default container for the DICOM Upload modal, without
|
|
5
|
+
// affecting other dialogs. We attach a static property that WorkList reads.
|
|
6
|
+
const DicomUploadWithSize = Object.assign(DicomUpload, {
|
|
7
|
+
containerClassName: 'max-w-3xl',
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
cinePlayer: CinePlayer,
|
|
12
|
+
autoCineModalities: ['OT', 'US'],
|
|
13
|
+
'panelMeasurement.disableEditing': false,
|
|
14
|
+
onBeforeSRAddMeasurement: ({ measurement, StudyInstanceUID, SeriesInstanceUID }) => {
|
|
15
|
+
return measurement;
|
|
16
|
+
},
|
|
17
|
+
onBeforeDicomStore: ({ dicomDict, measurementData, naturalizedReport }) => {
|
|
18
|
+
return dicomDict;
|
|
19
|
+
},
|
|
20
|
+
dicomUploadComponent: DicomUploadWithSize,
|
|
21
|
+
codingValues: {},
|
|
22
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'cornerstone.modalityOverlayDefaultColorMaps': {
|
|
3
|
+
defaultSettings: {
|
|
4
|
+
PT: {
|
|
5
|
+
colormap: 'hsv',
|
|
6
|
+
// Note: Right now, there is a nonlinear relationship between the opacity value
|
|
7
|
+
// below and how it will get applied to the image. The limitation is in rendering.
|
|
8
|
+
// We are working on this and will remove this note when it's fixed.
|
|
9
|
+
// But don't expect 0.5 to be 50% opacity, but rather close to that.
|
|
10
|
+
opacity: 0.5,
|
|
11
|
+
},
|
|
12
|
+
RTDOSE: {
|
|
13
|
+
colormap: 'Isodose',
|
|
14
|
+
// Note: Right now, there is a nonlinear relationship between the opacity value
|
|
15
|
+
// below and how it will get applied to the image. The limitation is in rendering.
|
|
16
|
+
// We are working on this and will remove this note when it's fixed.
|
|
17
|
+
// But don't expect 0.5 to be 50% opacity, but rather close to that.
|
|
18
|
+
|
|
19
|
+
opacity: 0.5,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
/**
|
|
3
|
+
* Viewport types a hydrated segmentation is allowed to appear in
|
|
4
|
+
* automatically.
|
|
5
|
+
*
|
|
6
|
+
* `null` (the default) means every viewport type that can render it, which is
|
|
7
|
+
* the behaviour hydration has always had. Set it to a list of OHIF viewport
|
|
8
|
+
* types - the vocabulary of a hanging protocol's
|
|
9
|
+
* `viewportOptions.viewportType` - to narrow that, e.g.
|
|
10
|
+
* `['stack', 'volume']` to keep automatic hydration out of 3D viewports,
|
|
11
|
+
* where the labelmap has to be converted to a surface first. Narrowing this
|
|
12
|
+
* does not stop a user adding the segmentation to such a viewport by hand
|
|
13
|
+
* from the overlay menu.
|
|
14
|
+
*/
|
|
15
|
+
'cornerstone.segmentation.autoHydrateViewportTypes': null,
|
|
16
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { CustomDropdownMenuContent } from './CustomDropdownMenuContent';
|
|
2
|
+
import { CustomSegmentStatisticsHeader } from './CustomSegmentStatisticsHeader';
|
|
3
|
+
import SegmentationToolConfig from '../components/SegmentationToolConfig';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { SegmentationRepresentations } from '@cornerstonejs/tools/enums';
|
|
6
|
+
|
|
7
|
+
export default function getSegmentationPanelCustomization({ commandsManager, servicesManager }) {
|
|
8
|
+
const { segmentationService } = servicesManager.services;
|
|
9
|
+
|
|
10
|
+
let contourRenderFillChangedGlobally = false;
|
|
11
|
+
|
|
12
|
+
// Listen to when the global CONTOUR type renderFill style property is changed.
|
|
13
|
+
const { unsubscribe } = segmentationService.subscribe(
|
|
14
|
+
segmentationService.EVENTS.SEGMENTATION_STYLE_MODIFIED,
|
|
15
|
+
({ specifier, style }) => {
|
|
16
|
+
if (
|
|
17
|
+
specifier.type === SegmentationRepresentations.Contour &&
|
|
18
|
+
specifier.segmentationId == null &&
|
|
19
|
+
specifier.viewportId == null &&
|
|
20
|
+
style.renderFill != null
|
|
21
|
+
) {
|
|
22
|
+
unsubscribe();
|
|
23
|
+
contourRenderFillChangedGlobally = true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
'panelSegmentation.customDropdownMenuContent': CustomDropdownMenuContent,
|
|
30
|
+
'panelSegmentation.customSegmentStatisticsHeader': CustomSegmentStatisticsHeader,
|
|
31
|
+
'panelSegmentation.disableEditing': false,
|
|
32
|
+
'panelSegmentation.showAddSegment': true,
|
|
33
|
+
'panelSegmentation.onSegmentationAdd': async ({
|
|
34
|
+
segmentationRepresentationType = SegmentationRepresentations.Labelmap,
|
|
35
|
+
}) => {
|
|
36
|
+
const { viewportGridService } = servicesManager.services;
|
|
37
|
+
const viewportId = viewportGridService.getState().activeViewportId;
|
|
38
|
+
if (segmentationRepresentationType === SegmentationRepresentations.Labelmap) {
|
|
39
|
+
commandsManager.run('createLabelmapForViewport', { viewportId });
|
|
40
|
+
} else if (segmentationRepresentationType === SegmentationRepresentations.Contour) {
|
|
41
|
+
const segmentationId = await commandsManager.run('createContourForViewport', {
|
|
42
|
+
viewportId,
|
|
43
|
+
});
|
|
44
|
+
// Override the default (i.e. hydrated RTSTRUCT) style for contours if the global CONTOUR type
|
|
45
|
+
// renderFill style property has not been changed.
|
|
46
|
+
if (!contourRenderFillChangedGlobally) {
|
|
47
|
+
segmentationService.setStyle(
|
|
48
|
+
{ segmentationId, type: SegmentationRepresentations.Contour },
|
|
49
|
+
{
|
|
50
|
+
renderFill: true,
|
|
51
|
+
renderFillInactive: true,
|
|
52
|
+
},
|
|
53
|
+
// Do not merge so that these created contours inherit other type-specific style properties like the fill alpha.
|
|
54
|
+
// Merging would otherwise permanently inherit the fill alpha and any inheritance from the type level would be lost.
|
|
55
|
+
false
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// If the global CONTOUR type renderFill style property is already set, do not subscribe to the SEGMENTATION_STYLE_MODIFIED event.
|
|
60
|
+
if (contourRenderFillChangedGlobally) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Subscribe to the SEGMENTATION_STYLE_MODIFIED event to listen for changes to the CONTOUR type renderFill style property.
|
|
65
|
+
const { unsubscribe } = segmentationService.subscribe(
|
|
66
|
+
segmentationService.EVENTS.SEGMENTATION_STYLE_MODIFIED,
|
|
67
|
+
({ specifier, style }) => {
|
|
68
|
+
if (
|
|
69
|
+
specifier.type === SegmentationRepresentations.Contour &&
|
|
70
|
+
specifier.segmentationId == null &&
|
|
71
|
+
specifier.viewportId == null &&
|
|
72
|
+
style.renderFill != null
|
|
73
|
+
) {
|
|
74
|
+
// We are here because the renderFill style property is globally being changed for ALL contours.
|
|
75
|
+
// When this occurs, the desire is for ALL contours to inherit the property. To make this happen,
|
|
76
|
+
// we have to clear the style property that was set for this specific segmentation
|
|
77
|
+
// when it was created above.
|
|
78
|
+
// We can now also unsubscribe because this change only needs to be made when the global CONTOUR type
|
|
79
|
+
// renderFill style property is first changed.
|
|
80
|
+
|
|
81
|
+
contourRenderFillChangedGlobally = true;
|
|
82
|
+
unsubscribe();
|
|
83
|
+
segmentationService.setStyle(
|
|
84
|
+
{ segmentationId, type: SegmentationRepresentations.Contour },
|
|
85
|
+
{},
|
|
86
|
+
false
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
'panelSegmentation.tableMode': 'collapsed',
|
|
94
|
+
'panelSegmentation.readableText': {
|
|
95
|
+
// the values will appear in this order
|
|
96
|
+
min: 'Min Value',
|
|
97
|
+
minLPS: 'Min Coord',
|
|
98
|
+
max: 'Max Value',
|
|
99
|
+
maxLPS: 'Max Coord',
|
|
100
|
+
mean: 'Mean Value',
|
|
101
|
+
stdDev: 'Standard Deviation',
|
|
102
|
+
count: 'Voxel Count',
|
|
103
|
+
median: 'Median',
|
|
104
|
+
skewness: 'Skewness',
|
|
105
|
+
kurtosis: 'Kurtosis',
|
|
106
|
+
peakValue: 'Peak Value',
|
|
107
|
+
peakLPS: 'Peak Coord',
|
|
108
|
+
volume: 'Volume',
|
|
109
|
+
lesionGlycolysis: 'Lesion Glycolysis',
|
|
110
|
+
center: 'Center',
|
|
111
|
+
},
|
|
112
|
+
'labelMapSegmentationToolbox.config': () => {
|
|
113
|
+
return <SegmentationToolConfig />;
|
|
114
|
+
},
|
|
115
|
+
'contourSegmentationToolbox.config': () => {
|
|
116
|
+
return <SegmentationToolConfig />;
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|