@ohif/extension-cornerstone 3.14.0-beta.11 → 3.14.0-beta.110
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 +2962 -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/FidelityIndicator/FidelityIndicator.tsx +152 -0
- package/src/components/FidelityIndicator/index.ts +1 -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 +109 -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 +13 -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 +9 -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/useViewportFidelity.ts +243 -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 +448 -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,805 @@
|
|
|
1
|
+
import type { Button } from '@ohif/core/types';
|
|
2
|
+
|
|
3
|
+
import { EVENTS } from '@cornerstonejs/core';
|
|
4
|
+
import { ViewportGridService, ToolbarService } from '@ohif/core';
|
|
5
|
+
import i18n from 'i18next';
|
|
6
|
+
import { UNSUPPORTED_WINDOW_LEVEL_VIEWPORT_TYPES } from '../constants';
|
|
7
|
+
|
|
8
|
+
const { TOOLBAR_SECTIONS } = ToolbarService;
|
|
9
|
+
|
|
10
|
+
const callbacks = (toolName: string) => [
|
|
11
|
+
{
|
|
12
|
+
commandName: 'setViewportForToolConfiguration',
|
|
13
|
+
commandOptions: {
|
|
14
|
+
toolName,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
export const setToolActiveToolbar = {
|
|
20
|
+
commandName: 'setToolActiveToolbar',
|
|
21
|
+
commandOptions: {
|
|
22
|
+
toolGroupIds: ['default', 'mpr', 'SRToolGroup', 'volume3d'],
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const toolbarButtons: Button[] = [
|
|
27
|
+
// sections
|
|
28
|
+
{
|
|
29
|
+
id: 'MeasurementTools',
|
|
30
|
+
uiType: 'ohif.toolButtonList',
|
|
31
|
+
props: {
|
|
32
|
+
buttonSection: true,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'MoreTools',
|
|
37
|
+
uiType: 'ohif.toolButtonList',
|
|
38
|
+
props: {
|
|
39
|
+
buttonSection: true,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'AdvancedRenderingControls',
|
|
44
|
+
uiType: 'ohif.advancedRenderingControls',
|
|
45
|
+
props: {
|
|
46
|
+
buttonSection: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
// tool defs
|
|
50
|
+
{
|
|
51
|
+
id: 'modalityLoadBadge',
|
|
52
|
+
uiType: 'ohif.modalityLoadBadge',
|
|
53
|
+
props: {
|
|
54
|
+
icon: 'Status',
|
|
55
|
+
label: i18n.t('Buttons:Status'),
|
|
56
|
+
tooltip: i18n.t('Buttons:Status'),
|
|
57
|
+
evaluate: {
|
|
58
|
+
name: 'evaluate.modalityLoadBadge',
|
|
59
|
+
hideWhenDisabled: true,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'navigationComponent',
|
|
65
|
+
uiType: 'ohif.navigationComponent',
|
|
66
|
+
props: {
|
|
67
|
+
icon: 'Navigation',
|
|
68
|
+
label: i18n.t('Buttons:Navigation'),
|
|
69
|
+
tooltip: i18n.t('Buttons:Navigate between segments/measurements and manage their visibility'),
|
|
70
|
+
evaluate: {
|
|
71
|
+
name: 'evaluate.navigationComponent',
|
|
72
|
+
hideWhenDisabled: true,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'trackingStatus',
|
|
78
|
+
uiType: 'ohif.trackingStatus',
|
|
79
|
+
props: {
|
|
80
|
+
icon: 'TrackingStatus',
|
|
81
|
+
label: i18n.t('Buttons:Tracking Status'),
|
|
82
|
+
tooltip: i18n.t('Buttons:View and manage tracking status of measurements and annotations'),
|
|
83
|
+
evaluate: {
|
|
84
|
+
name: 'evaluate.trackingStatus',
|
|
85
|
+
hideWhenDisabled: true,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'dataOverlayMenu',
|
|
91
|
+
uiType: 'ohif.dataOverlayMenu',
|
|
92
|
+
props: {
|
|
93
|
+
icon: 'ViewportViews',
|
|
94
|
+
label: i18n.t('Buttons:Data Overlay'),
|
|
95
|
+
tooltip: i18n.t(
|
|
96
|
+
'Buttons:Configure data overlay options and manage foreground/background display sets'
|
|
97
|
+
),
|
|
98
|
+
evaluate: 'evaluate.dataOverlayMenu',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'orientationMenu',
|
|
103
|
+
uiType: 'ohif.orientationMenu',
|
|
104
|
+
props: {
|
|
105
|
+
icon: 'OrientationSwitch',
|
|
106
|
+
label: i18n.t('Buttons:Orientation'),
|
|
107
|
+
tooltip: i18n.t(
|
|
108
|
+
'Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'
|
|
109
|
+
),
|
|
110
|
+
evaluate: {
|
|
111
|
+
name: 'evaluate.orientationMenu',
|
|
112
|
+
// hideWhenDisabled: true,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: 'windowLevelMenuEmbedded',
|
|
118
|
+
uiType: 'ohif.windowLevelMenuEmbedded',
|
|
119
|
+
props: {
|
|
120
|
+
icon: 'WindowLevel',
|
|
121
|
+
label: i18n.t('Buttons:Window Level'),
|
|
122
|
+
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
|
|
123
|
+
evaluate: {
|
|
124
|
+
name: 'evaluate.windowLevelMenuEmbedded',
|
|
125
|
+
hideWhenDisabled: true,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: 'windowLevelMenu',
|
|
131
|
+
uiType: 'ohif.windowLevelMenu',
|
|
132
|
+
props: {
|
|
133
|
+
icon: 'WindowLevel',
|
|
134
|
+
label: i18n.t('Buttons:Window Level'),
|
|
135
|
+
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
|
|
136
|
+
evaluate: {
|
|
137
|
+
name: 'evaluate.windowLevelMenu',
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: 'voiManualControlMenu',
|
|
143
|
+
uiType: 'ohif.voiManualControlMenu',
|
|
144
|
+
props: {
|
|
145
|
+
icon: 'WindowLevelAdvanced',
|
|
146
|
+
label: i18n.t('Buttons:Advanced Window Level'),
|
|
147
|
+
tooltip: i18n.t('Buttons:Advanced window/level settings with manual controls and presets'),
|
|
148
|
+
evaluate: 'evaluate.voiManualControlMenu',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: 'thresholdMenu',
|
|
153
|
+
uiType: 'ohif.thresholdMenu',
|
|
154
|
+
props: {
|
|
155
|
+
icon: 'Threshold',
|
|
156
|
+
label: i18n.t('Buttons:Threshold'),
|
|
157
|
+
tooltip: i18n.t('Buttons:Image threshold settings'),
|
|
158
|
+
evaluate: {
|
|
159
|
+
name: 'evaluate.thresholdMenu',
|
|
160
|
+
hideWhenDisabled: true,
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: 'opacityMenu',
|
|
166
|
+
uiType: 'ohif.opacityMenu',
|
|
167
|
+
props: {
|
|
168
|
+
icon: 'Opacity',
|
|
169
|
+
label: i18n.t('Buttons:Opacity'),
|
|
170
|
+
tooltip: i18n.t('Buttons:Image opacity settings'),
|
|
171
|
+
evaluate: {
|
|
172
|
+
name: 'evaluate.opacityMenu',
|
|
173
|
+
hideWhenDisabled: true,
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: 'Colorbar',
|
|
179
|
+
uiType: 'ohif.colorbar',
|
|
180
|
+
props: {
|
|
181
|
+
type: 'tool',
|
|
182
|
+
label: i18n.t('Buttons:Colorbar'),
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: 'Reset',
|
|
187
|
+
uiType: 'ohif.toolButton',
|
|
188
|
+
props: {
|
|
189
|
+
icon: 'tool-reset',
|
|
190
|
+
label: i18n.t('Buttons:Reset View'),
|
|
191
|
+
tooltip: i18n.t('Buttons:Reset View'),
|
|
192
|
+
commands: 'resetViewport',
|
|
193
|
+
evaluate: 'evaluate.action',
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
id: 'rotate-right',
|
|
198
|
+
uiType: 'ohif.toolButton',
|
|
199
|
+
props: {
|
|
200
|
+
icon: 'tool-rotate-right',
|
|
201
|
+
label: i18n.t('Buttons:Rotate Right'),
|
|
202
|
+
tooltip: i18n.t('Buttons:Rotate +90'),
|
|
203
|
+
commands: 'rotateViewportCW',
|
|
204
|
+
evaluate: [
|
|
205
|
+
'evaluate.action',
|
|
206
|
+
{
|
|
207
|
+
name: 'evaluate.viewport.supported',
|
|
208
|
+
unsupportedViewportTypes: ['video'],
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: 'flipHorizontal',
|
|
215
|
+
uiType: 'ohif.toolButton',
|
|
216
|
+
props: {
|
|
217
|
+
icon: 'tool-flip-horizontal',
|
|
218
|
+
label: i18n.t('Buttons:Flip Horizontal'),
|
|
219
|
+
tooltip: i18n.t('Buttons:Flip Horizontally'),
|
|
220
|
+
commands: 'flipViewportHorizontal',
|
|
221
|
+
evaluate: [
|
|
222
|
+
'evaluate.viewportProperties.toggle',
|
|
223
|
+
{
|
|
224
|
+
name: 'evaluate.viewport.supported',
|
|
225
|
+
unsupportedViewportTypes: ['video', 'volume3d'],
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: 'ImageSliceSync',
|
|
232
|
+
uiType: 'ohif.toolButton',
|
|
233
|
+
props: {
|
|
234
|
+
icon: 'link',
|
|
235
|
+
label: i18n.t('Buttons:Image Slice Sync'),
|
|
236
|
+
tooltip: i18n.t('Buttons:Enable position synchronization on stack viewports'),
|
|
237
|
+
commands: {
|
|
238
|
+
commandName: 'toggleSynchronizer',
|
|
239
|
+
commandOptions: {
|
|
240
|
+
type: 'imageSlice',
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
listeners: {
|
|
244
|
+
[EVENTS.VIEWPORT_NEW_IMAGE_SET]: {
|
|
245
|
+
commandName: 'toggleImageSliceSync',
|
|
246
|
+
commandOptions: { toggledState: true },
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
evaluate: [
|
|
250
|
+
'evaluate.cornerstone.synchronizer',
|
|
251
|
+
{
|
|
252
|
+
name: 'evaluate.viewport.supported',
|
|
253
|
+
unsupportedViewportTypes: ['video', 'volume3d'],
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: 'ReferenceLines',
|
|
260
|
+
uiType: 'ohif.toolButton',
|
|
261
|
+
props: {
|
|
262
|
+
icon: 'tool-referenceLines',
|
|
263
|
+
label: i18n.t('Buttons:Reference Lines'),
|
|
264
|
+
tooltip: i18n.t('Buttons:Show Reference Lines'),
|
|
265
|
+
commands: 'toggleEnabledDisabledToolbar',
|
|
266
|
+
listeners: {
|
|
267
|
+
[ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('ReferenceLines'),
|
|
268
|
+
[ViewportGridService.EVENTS.VIEWPORTS_READY]: callbacks('ReferenceLines'),
|
|
269
|
+
},
|
|
270
|
+
evaluate: [
|
|
271
|
+
'evaluate.cornerstoneTool.toggle',
|
|
272
|
+
{
|
|
273
|
+
name: 'evaluate.viewport.supported',
|
|
274
|
+
unsupportedViewportTypes: ['video'],
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
id: 'ImageOverlayViewer',
|
|
281
|
+
uiType: 'ohif.toolButton',
|
|
282
|
+
props: {
|
|
283
|
+
icon: 'toggle-dicom-overlay',
|
|
284
|
+
label: i18n.t('Buttons:Image Overlay'),
|
|
285
|
+
tooltip: i18n.t('Buttons:Toggle Image Overlay'),
|
|
286
|
+
commands: 'toggleEnabledDisabledToolbar',
|
|
287
|
+
evaluate: [
|
|
288
|
+
'evaluate.cornerstoneTool.toggle',
|
|
289
|
+
{
|
|
290
|
+
name: 'evaluate.viewport.supported',
|
|
291
|
+
unsupportedViewportTypes: ['video'],
|
|
292
|
+
},
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
id: 'StackScroll',
|
|
298
|
+
uiType: 'ohif.toolButton',
|
|
299
|
+
props: {
|
|
300
|
+
icon: 'tool-stack-scroll',
|
|
301
|
+
label: i18n.t('Buttons:Stack Scroll'),
|
|
302
|
+
tooltip: i18n.t('Buttons:Stack Scroll'),
|
|
303
|
+
commands: setToolActiveToolbar,
|
|
304
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
id: 'invert',
|
|
309
|
+
uiType: 'ohif.toolButton',
|
|
310
|
+
props: {
|
|
311
|
+
icon: 'tool-invert',
|
|
312
|
+
label: i18n.t('Buttons:Invert'),
|
|
313
|
+
tooltip: i18n.t('Buttons:Invert Colors'),
|
|
314
|
+
commands: 'invertViewport',
|
|
315
|
+
evaluate: [
|
|
316
|
+
'evaluate.viewportProperties.toggle',
|
|
317
|
+
{
|
|
318
|
+
name: 'evaluate.viewport.supported',
|
|
319
|
+
unsupportedViewportTypes: ['video'],
|
|
320
|
+
},
|
|
321
|
+
],
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
id: 'Probe',
|
|
326
|
+
uiType: 'ohif.toolButton',
|
|
327
|
+
props: {
|
|
328
|
+
icon: 'tool-probe',
|
|
329
|
+
label: i18n.t('Buttons:Probe'),
|
|
330
|
+
tooltip: i18n.t('Buttons:Probe'),
|
|
331
|
+
commands: setToolActiveToolbar,
|
|
332
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
id: 'Cine',
|
|
337
|
+
uiType: 'ohif.toolButton',
|
|
338
|
+
props: {
|
|
339
|
+
icon: 'tool-cine',
|
|
340
|
+
label: i18n.t('Buttons:Cine'),
|
|
341
|
+
tooltip: i18n.t('Buttons:Cine'),
|
|
342
|
+
commands: 'toggleCine',
|
|
343
|
+
evaluate: [
|
|
344
|
+
'evaluate.cine',
|
|
345
|
+
{
|
|
346
|
+
name: 'evaluate.viewport.supported',
|
|
347
|
+
unsupportedViewportTypes: ['volume3d'],
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
id: 'Angle',
|
|
354
|
+
uiType: 'ohif.toolButton',
|
|
355
|
+
props: {
|
|
356
|
+
icon: 'tool-angle',
|
|
357
|
+
label: i18n.t('Buttons:Angle'),
|
|
358
|
+
tooltip: i18n.t('Buttons:Angle'),
|
|
359
|
+
commands: setToolActiveToolbar,
|
|
360
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
id: 'CobbAngle',
|
|
365
|
+
uiType: 'ohif.toolButton',
|
|
366
|
+
props: {
|
|
367
|
+
icon: 'icon-tool-cobb-angle',
|
|
368
|
+
label: i18n.t('Buttons:Cobb Angle'),
|
|
369
|
+
tooltip: i18n.t('Buttons:Cobb Angle'),
|
|
370
|
+
commands: setToolActiveToolbar,
|
|
371
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
id: 'Magnify',
|
|
376
|
+
uiType: 'ohif.toolButton',
|
|
377
|
+
props: {
|
|
378
|
+
icon: 'tool-magnify',
|
|
379
|
+
label: i18n.t('Buttons:Zoom-in'),
|
|
380
|
+
tooltip: i18n.t('Buttons:Zoom-in'),
|
|
381
|
+
commands: setToolActiveToolbar,
|
|
382
|
+
evaluate: [
|
|
383
|
+
'evaluate.cornerstoneTool',
|
|
384
|
+
{
|
|
385
|
+
name: 'evaluate.viewport.supported',
|
|
386
|
+
unsupportedViewportTypes: ['video'],
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
id: 'CalibrationLine',
|
|
393
|
+
uiType: 'ohif.toolButton',
|
|
394
|
+
props: {
|
|
395
|
+
icon: 'tool-calibration',
|
|
396
|
+
label: i18n.t('Buttons:Calibration'),
|
|
397
|
+
tooltip: i18n.t('Buttons:Calibration Line'),
|
|
398
|
+
commands: setToolActiveToolbar,
|
|
399
|
+
evaluate: [
|
|
400
|
+
'evaluate.cornerstoneTool',
|
|
401
|
+
{
|
|
402
|
+
name: 'evaluate.viewport.supported',
|
|
403
|
+
unsupportedViewportTypes: ['video'],
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
id: 'TagBrowser',
|
|
410
|
+
uiType: 'ohif.toolButton',
|
|
411
|
+
props: {
|
|
412
|
+
icon: 'dicom-tag-browser',
|
|
413
|
+
label: i18n.t('Buttons:Dicom Tag Browser'),
|
|
414
|
+
tooltip: i18n.t('Buttons:Dicom Tag Browser'),
|
|
415
|
+
commands: 'openDICOMTagViewer',
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
id: 'AdvancedMagnify',
|
|
420
|
+
uiType: 'ohif.toolButton',
|
|
421
|
+
props: {
|
|
422
|
+
icon: 'icon-tool-loupe',
|
|
423
|
+
label: i18n.t('Buttons:Magnify Probe'),
|
|
424
|
+
tooltip: i18n.t('Buttons:Magnify Probe'),
|
|
425
|
+
commands: 'toggleActiveDisabledToolbar',
|
|
426
|
+
evaluate: [
|
|
427
|
+
'evaluate.cornerstoneTool.toggle.ifStrictlyDisabled',
|
|
428
|
+
{
|
|
429
|
+
name: 'evaluate.viewport.supported',
|
|
430
|
+
unsupportedViewportTypes: ['video'],
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
id: 'UltrasoundDirectionalTool',
|
|
437
|
+
uiType: 'ohif.toolButton',
|
|
438
|
+
props: {
|
|
439
|
+
icon: 'icon-tool-ultrasound-bidirectional',
|
|
440
|
+
label: i18n.t('Buttons:Ultrasound Directional'),
|
|
441
|
+
tooltip: i18n.t('Buttons:Ultrasound Directional'),
|
|
442
|
+
commands: setToolActiveToolbar,
|
|
443
|
+
evaluate: [
|
|
444
|
+
'evaluate.cornerstoneTool',
|
|
445
|
+
{
|
|
446
|
+
name: 'evaluate.modality.supported',
|
|
447
|
+
supportedModalities: ['US', 'ECG'],
|
|
448
|
+
},
|
|
449
|
+
],
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
id: 'WindowLevelRegion',
|
|
454
|
+
uiType: 'ohif.toolButton',
|
|
455
|
+
props: {
|
|
456
|
+
icon: 'icon-tool-window-region',
|
|
457
|
+
label: i18n.t('Buttons:Window Level Region'),
|
|
458
|
+
tooltip: i18n.t('Buttons:Window Level Region'),
|
|
459
|
+
commands: setToolActiveToolbar,
|
|
460
|
+
evaluate: [
|
|
461
|
+
'evaluate.cornerstoneTool',
|
|
462
|
+
{
|
|
463
|
+
name: 'evaluate.viewport.supported',
|
|
464
|
+
unsupportedViewportTypes: ['video'],
|
|
465
|
+
},
|
|
466
|
+
],
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
id: 'Length',
|
|
471
|
+
uiType: 'ohif.toolButton',
|
|
472
|
+
props: {
|
|
473
|
+
icon: 'tool-length',
|
|
474
|
+
label: i18n.t('Buttons:Length'),
|
|
475
|
+
tooltip: i18n.t('Buttons:Length Tool'),
|
|
476
|
+
commands: setToolActiveToolbar,
|
|
477
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
id: 'Bidirectional',
|
|
482
|
+
uiType: 'ohif.toolButton',
|
|
483
|
+
props: {
|
|
484
|
+
icon: 'tool-bidirectional',
|
|
485
|
+
label: i18n.t('Buttons:Bidirectional'),
|
|
486
|
+
tooltip: i18n.t('Buttons:Bidirectional Tool'),
|
|
487
|
+
commands: setToolActiveToolbar,
|
|
488
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
id: 'ArrowAnnotate',
|
|
493
|
+
uiType: 'ohif.toolButton',
|
|
494
|
+
props: {
|
|
495
|
+
icon: 'tool-annotate',
|
|
496
|
+
label: i18n.t('Buttons:Annotation'),
|
|
497
|
+
tooltip: i18n.t('Buttons:Arrow Annotate'),
|
|
498
|
+
commands: setToolActiveToolbar,
|
|
499
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
500
|
+
},
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
id: 'EllipticalROI',
|
|
504
|
+
uiType: 'ohif.toolButton',
|
|
505
|
+
props: {
|
|
506
|
+
icon: 'tool-ellipse',
|
|
507
|
+
label: i18n.t('Buttons:Ellipse'),
|
|
508
|
+
tooltip: i18n.t('Buttons:Ellipse ROI'),
|
|
509
|
+
commands: setToolActiveToolbar,
|
|
510
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
id: 'RectangleROI',
|
|
515
|
+
uiType: 'ohif.toolButton',
|
|
516
|
+
props: {
|
|
517
|
+
icon: 'tool-rectangle',
|
|
518
|
+
label: i18n.t('Buttons:Rectangle'),
|
|
519
|
+
tooltip: i18n.t('Buttons:Rectangle ROI'),
|
|
520
|
+
commands: setToolActiveToolbar,
|
|
521
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
id: 'CircleROI',
|
|
526
|
+
uiType: 'ohif.toolButton',
|
|
527
|
+
props: {
|
|
528
|
+
icon: 'tool-circle',
|
|
529
|
+
label: i18n.t('Buttons:Circle'),
|
|
530
|
+
tooltip: i18n.t('Buttons:Circle Tool'),
|
|
531
|
+
commands: setToolActiveToolbar,
|
|
532
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
id: 'PlanarFreehandROI',
|
|
537
|
+
uiType: 'ohif.toolButton',
|
|
538
|
+
props: {
|
|
539
|
+
icon: 'icon-tool-freehand-roi',
|
|
540
|
+
label: i18n.t('Buttons:Freehand ROI'),
|
|
541
|
+
tooltip: i18n.t('Buttons:Freehand ROI'),
|
|
542
|
+
commands: setToolActiveToolbar,
|
|
543
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
id: 'SplineROI',
|
|
548
|
+
uiType: 'ohif.toolButton',
|
|
549
|
+
props: {
|
|
550
|
+
icon: 'icon-tool-spline-roi',
|
|
551
|
+
label: i18n.t('Buttons:Spline ROI'),
|
|
552
|
+
tooltip: i18n.t('Buttons:Spline ROI'),
|
|
553
|
+
commands: setToolActiveToolbar,
|
|
554
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
555
|
+
},
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
id: 'LivewireContour',
|
|
559
|
+
uiType: 'ohif.toolButton',
|
|
560
|
+
props: {
|
|
561
|
+
icon: 'icon-tool-livewire',
|
|
562
|
+
label: i18n.t('Buttons:Livewire tool'),
|
|
563
|
+
tooltip: i18n.t('Buttons:Livewire tool'),
|
|
564
|
+
commands: setToolActiveToolbar,
|
|
565
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
566
|
+
},
|
|
567
|
+
},
|
|
568
|
+
// Window Level
|
|
569
|
+
{
|
|
570
|
+
id: 'WindowLevel',
|
|
571
|
+
uiType: 'ohif.toolButton',
|
|
572
|
+
props: {
|
|
573
|
+
icon: 'tool-window-level',
|
|
574
|
+
label: i18n.t('Buttons:Window Level'),
|
|
575
|
+
commands: setToolActiveToolbar,
|
|
576
|
+
evaluate: [
|
|
577
|
+
'evaluate.cornerstoneTool',
|
|
578
|
+
{
|
|
579
|
+
name: 'evaluate.viewport.supported',
|
|
580
|
+
unsupportedViewportTypes: ['wholeSlide', ...UNSUPPORTED_WINDOW_LEVEL_VIEWPORT_TYPES],
|
|
581
|
+
},
|
|
582
|
+
],
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
id: 'Pan',
|
|
587
|
+
uiType: 'ohif.toolButton',
|
|
588
|
+
props: {
|
|
589
|
+
type: 'tool',
|
|
590
|
+
icon: 'tool-move',
|
|
591
|
+
label: i18n.t('Buttons:Pan'),
|
|
592
|
+
commands: setToolActiveToolbar,
|
|
593
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
594
|
+
},
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
id: 'Zoom',
|
|
598
|
+
uiType: 'ohif.toolButton',
|
|
599
|
+
props: {
|
|
600
|
+
type: 'tool',
|
|
601
|
+
icon: 'tool-zoom',
|
|
602
|
+
label: i18n.t('Buttons:Zoom'),
|
|
603
|
+
commands: setToolActiveToolbar,
|
|
604
|
+
evaluate: 'evaluate.cornerstoneTool',
|
|
605
|
+
},
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
id: 'TrackballRotate',
|
|
609
|
+
uiType: 'ohif.toolButton',
|
|
610
|
+
props: {
|
|
611
|
+
type: 'tool',
|
|
612
|
+
icon: 'tool-3d-rotate',
|
|
613
|
+
label: i18n.t('Buttons:3D Rotate'),
|
|
614
|
+
commands: setToolActiveToolbar,
|
|
615
|
+
evaluate: {
|
|
616
|
+
name: 'evaluate.cornerstoneTool',
|
|
617
|
+
disabledText: i18n.t('Buttons:Select a 3D viewport to enable this tool'),
|
|
618
|
+
},
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
id: 'Capture',
|
|
623
|
+
uiType: 'ohif.toolButton',
|
|
624
|
+
props: {
|
|
625
|
+
icon: 'tool-capture',
|
|
626
|
+
label: i18n.t('Buttons:Capture'),
|
|
627
|
+
commands: 'showDownloadViewportModal',
|
|
628
|
+
evaluate: [
|
|
629
|
+
'evaluate.action',
|
|
630
|
+
{
|
|
631
|
+
name: 'evaluate.viewport.supported',
|
|
632
|
+
unsupportedViewportTypes: ['video', 'wholeSlide'],
|
|
633
|
+
},
|
|
634
|
+
],
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
id: 'Layout',
|
|
639
|
+
uiType: 'ohif.layoutSelector',
|
|
640
|
+
props: {
|
|
641
|
+
rows: 3,
|
|
642
|
+
columns: 4,
|
|
643
|
+
evaluate: 'evaluate.action',
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
id: 'Crosshairs',
|
|
648
|
+
uiType: 'ohif.toolButton',
|
|
649
|
+
props: {
|
|
650
|
+
type: 'tool',
|
|
651
|
+
icon: 'tool-crosshair',
|
|
652
|
+
label: i18n.t('Buttons:Crosshairs'),
|
|
653
|
+
tooltip: i18n.t('Buttons:Click to toggle on or off'),
|
|
654
|
+
commands: {
|
|
655
|
+
commandName: 'toggleActiveDisabledToolbar',
|
|
656
|
+
commandOptions: {
|
|
657
|
+
toolGroupIds: ['mpr'],
|
|
658
|
+
},
|
|
659
|
+
},
|
|
660
|
+
evaluate: {
|
|
661
|
+
name: 'evaluate.cornerstoneTool.toggleWithModifier',
|
|
662
|
+
disabledText: i18n.t('Buttons:Select an MPR viewport to enable this tool'),
|
|
663
|
+
toggledOnIcon: 'tool-crosshair-checked',
|
|
664
|
+
defaultIcon: 'tool-crosshair',
|
|
665
|
+
},
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
id: 'SegmentLabelTool',
|
|
670
|
+
uiType: 'ohif.toolBoxButton',
|
|
671
|
+
props: {
|
|
672
|
+
icon: 'tool-segment-label',
|
|
673
|
+
label: i18n.t('Buttons:Segment Label Display'),
|
|
674
|
+
tooltip: i18n.t(
|
|
675
|
+
'Buttons:Click to show or hide segment labels when hovering with your mouse.'
|
|
676
|
+
),
|
|
677
|
+
commands: { commandName: 'toggleSegmentLabel' },
|
|
678
|
+
evaluate: [
|
|
679
|
+
'evaluate.cornerstoneTool.toggle',
|
|
680
|
+
{
|
|
681
|
+
name: 'evaluate.cornerstone.hasSegmentation',
|
|
682
|
+
},
|
|
683
|
+
],
|
|
684
|
+
},
|
|
685
|
+
},
|
|
686
|
+
// {
|
|
687
|
+
// id: 'Undo',
|
|
688
|
+
// uiType: 'ohif.toolButton',
|
|
689
|
+
// props: {
|
|
690
|
+
// type: 'tool',
|
|
691
|
+
// icon: 'prev-arrow',
|
|
692
|
+
// label: 'Undo',
|
|
693
|
+
// commands: {
|
|
694
|
+
// commandName: 'undo',
|
|
695
|
+
// },
|
|
696
|
+
// evaluate: 'evaluate.action',
|
|
697
|
+
// },
|
|
698
|
+
// },
|
|
699
|
+
// {
|
|
700
|
+
// id: 'Redo',
|
|
701
|
+
// uiType: 'ohif.toolButton',
|
|
702
|
+
// props: {
|
|
703
|
+
// type: 'tool',
|
|
704
|
+
// icon: 'next-arrow',
|
|
705
|
+
// label: 'Redo',
|
|
706
|
+
// commands: {
|
|
707
|
+
// commandName: 'redo',
|
|
708
|
+
// },
|
|
709
|
+
// evaluate: 'evaluate.action',
|
|
710
|
+
// },
|
|
711
|
+
// },
|
|
712
|
+
];
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Default toolbar layout: which buttons appear in each toolbar section.
|
|
716
|
+
* Registered as a customization so modes (and `?customization=` modules) can
|
|
717
|
+
* append/replace entries without rebuilding.
|
|
718
|
+
*/
|
|
719
|
+
export const toolbarSections = {
|
|
720
|
+
[TOOLBAR_SECTIONS.primary]: [
|
|
721
|
+
'MeasurementTools',
|
|
722
|
+
'Zoom',
|
|
723
|
+
'Pan',
|
|
724
|
+
'TrackballRotate',
|
|
725
|
+
'WindowLevel',
|
|
726
|
+
'Capture',
|
|
727
|
+
'Layout',
|
|
728
|
+
'Crosshairs',
|
|
729
|
+
'MoreTools',
|
|
730
|
+
],
|
|
731
|
+
|
|
732
|
+
[TOOLBAR_SECTIONS.viewportActionMenu.topLeft]: ['orientationMenu', 'dataOverlayMenu'],
|
|
733
|
+
|
|
734
|
+
[TOOLBAR_SECTIONS.viewportActionMenu.bottomMiddle]: ['AdvancedRenderingControls'],
|
|
735
|
+
|
|
736
|
+
AdvancedRenderingControls: [
|
|
737
|
+
'windowLevelMenuEmbedded',
|
|
738
|
+
'voiManualControlMenu',
|
|
739
|
+
'Colorbar',
|
|
740
|
+
'opacityMenu',
|
|
741
|
+
'thresholdMenu',
|
|
742
|
+
],
|
|
743
|
+
|
|
744
|
+
[TOOLBAR_SECTIONS.viewportActionMenu.topRight]: [
|
|
745
|
+
'modalityLoadBadge',
|
|
746
|
+
'trackingStatus',
|
|
747
|
+
'navigationComponent',
|
|
748
|
+
],
|
|
749
|
+
|
|
750
|
+
[TOOLBAR_SECTIONS.viewportActionMenu.bottomLeft]: ['windowLevelMenu'],
|
|
751
|
+
|
|
752
|
+
MeasurementTools: [
|
|
753
|
+
'Length',
|
|
754
|
+
'Bidirectional',
|
|
755
|
+
'ArrowAnnotate',
|
|
756
|
+
'EllipticalROI',
|
|
757
|
+
'RectangleROI',
|
|
758
|
+
'CircleROI',
|
|
759
|
+
'PlanarFreehandROI',
|
|
760
|
+
'SplineROI',
|
|
761
|
+
'LivewireContour',
|
|
762
|
+
],
|
|
763
|
+
|
|
764
|
+
MoreTools: [
|
|
765
|
+
'Reset',
|
|
766
|
+
'rotate-right',
|
|
767
|
+
'flipHorizontal',
|
|
768
|
+
'ImageSliceSync',
|
|
769
|
+
'ReferenceLines',
|
|
770
|
+
'ImageOverlayViewer',
|
|
771
|
+
'StackScroll',
|
|
772
|
+
'invert',
|
|
773
|
+
'Probe',
|
|
774
|
+
'Cine',
|
|
775
|
+
'Angle',
|
|
776
|
+
'CobbAngle',
|
|
777
|
+
'Magnify',
|
|
778
|
+
'CalibrationLine',
|
|
779
|
+
'TagBrowser',
|
|
780
|
+
'AdvancedMagnify',
|
|
781
|
+
'UltrasoundDirectionalTool',
|
|
782
|
+
'WindowLevelRegion',
|
|
783
|
+
'SegmentLabelTool',
|
|
784
|
+
],
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Capability packs registered (at default scope) by the cornerstone extension:
|
|
789
|
+
* - `cornerstone.toolbarButtons` – the general toolbar button definitions
|
|
790
|
+
* - `cornerstone.toolbarSections` – the general toolbar layout (section -> button ids)
|
|
791
|
+
*
|
|
792
|
+
* These are pure "what can exist" packs — they carry no mode identity. Modes
|
|
793
|
+
* compose them with `{ $reference }` markers in their own `toolbarButtons` /
|
|
794
|
+
* `toolbarSections` instance arrays, which the mode route seeds into the Mode
|
|
795
|
+
* customization scope on enter; URL `?customization=` modules extend the result
|
|
796
|
+
* through the `mode` phase (e.g.
|
|
797
|
+
* `mode.basic.toolbarButtons: { $push: [{ $reference: '...' }] }`).
|
|
798
|
+
*/
|
|
799
|
+
const toolbarButtonsCustomization = {
|
|
800
|
+
'cornerstone.toolbarButtons': toolbarButtons,
|
|
801
|
+
'cornerstone.toolbarSections': toolbarSections,
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
export { toolbarButtons };
|
|
805
|
+
export default toolbarButtonsCustomization;
|