@cornerstonejs/tools 2.0.0-beta.20 → 2.0.0-beta.22
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/esm/cursors/SVGCursorDescriptor.d.ts +1 -1
- package/dist/esm/cursors/SVGCursorDescriptor.js +7 -0
- package/dist/esm/cursors/SVGMouseCursor.d.ts +1 -1
- package/dist/esm/cursors/elementCursor.d.ts +1 -1
- package/dist/esm/cursors/elementCursor.js +1 -1
- package/dist/esm/drawingSvg/draw.d.ts +2 -1
- package/dist/esm/drawingSvg/drawArrow.d.ts +1 -1
- package/dist/esm/drawingSvg/drawCircle.d.ts +1 -1
- package/dist/esm/drawingSvg/drawEllipse.d.ts +1 -1
- package/dist/esm/drawingSvg/drawEllipse.js +1 -0
- package/dist/esm/drawingSvg/drawEllipseByCoordinates.d.ts +1 -1
- package/dist/esm/drawingSvg/drawHandle.d.ts +1 -1
- package/dist/esm/drawingSvg/drawHandles.d.ts +1 -1
- package/dist/esm/drawingSvg/drawHeight.d.ts +3 -0
- package/dist/esm/drawingSvg/drawHeight.js +42 -0
- package/dist/esm/drawingSvg/drawLine.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLink.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLinkedTextBox.d.ts +1 -1
- package/dist/esm/drawingSvg/drawPath.d.ts +1 -1
- package/dist/esm/drawingSvg/drawPolyline.d.ts +1 -1
- package/dist/esm/drawingSvg/drawRect.d.ts +1 -1
- package/dist/esm/drawingSvg/drawRect.js +1 -0
- package/dist/esm/drawingSvg/drawRectByCoordinates.d.ts +1 -1
- package/dist/esm/drawingSvg/drawRedactionRect.d.ts +3 -1
- package/dist/esm/drawingSvg/drawTextBox.d.ts +1 -1
- package/dist/esm/drawingSvg/getSvgDrawingHelper.d.ts +1 -1
- package/dist/esm/drawingSvg/getSvgDrawingHelper.js +2 -2
- package/dist/esm/drawingSvg/index.d.ts +2 -1
- package/dist/esm/drawingSvg/index.js +2 -1
- package/dist/esm/enums/ToolBindings.d.ts +3 -1
- package/dist/esm/enums/ToolBindings.js +2 -0
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyDown.d.ts +1 -1
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyDown.js +2 -2
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyUp.d.ts +1 -1
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyUp.js +2 -2
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDown.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDown.js +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownActivate.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownActivate.js +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownAnnotationAction.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownAnnotationAction.js +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDrag.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDrag.js +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseMove.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseMove.js +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseWheel.d.ts +2 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseWheel.js +15 -2
- package/dist/esm/eventDispatchers/shared/customCallbackHandler.js +3 -2
- package/dist/esm/eventDispatchers/shared/getActiveToolForKeyboardEvent.d.ts +1 -1
- package/dist/esm/eventDispatchers/shared/getActiveToolForKeyboardEvent.js +2 -2
- package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.d.ts +1 -1
- package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.js +5 -6
- package/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.d.ts +1 -1
- package/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.js +2 -2
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForKeyboardEvents.d.ts +2 -2
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForKeyboardEvents.js +2 -2
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForMouseEvent.d.ts +4 -3
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForMouseEvent.js +2 -2
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForMouseEvent.d.ts +3 -3
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForMouseEvent.js +2 -2
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForTouchEvent.d.ts +2 -2
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForTouchEvent.js +2 -2
- package/dist/esm/eventDispatchers/touchEventHandlers/touchDrag.d.ts +1 -1
- package/dist/esm/eventDispatchers/touchEventHandlers/touchDrag.js +1 -1
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStart.d.ts +1 -1
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStart.js +1 -1
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStartActivate.d.ts +1 -1
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStartActivate.js +1 -1
- package/dist/esm/eventListeners/annotations/annotationCompletedListener.d.ts +1 -1
- package/dist/esm/eventListeners/annotations/annotationRemovedListener.d.ts +1 -1
- package/dist/esm/eventListeners/annotations/annotationSelectionListener.js +1 -1
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +3 -3
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +22 -21
- package/dist/esm/eventListeners/mouse/getMouseEventPoints.d.ts +1 -1
- package/dist/esm/eventListeners/mouse/getMouseEventPoints.js +4 -1
- package/dist/esm/eventListeners/mouse/mouseDownListener.js +9 -1
- package/dist/esm/eventListeners/segmentation/imageChangeEventListener.js +9 -7
- package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js +3 -3
- package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.js +2 -2
- package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.js +3 -2
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js +5 -5
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js +4 -2
- package/dist/esm/eventListeners/touch/getTouchEventPoints.d.ts +1 -1
- package/dist/esm/index.d.ts +4 -3
- package/dist/esm/index.js +4 -3
- package/dist/esm/init.js +2 -2
- package/dist/esm/stateManagement/annotation/AnnotationRenderingEngine.d.ts +20 -0
- package/dist/esm/stateManagement/annotation/AnnotationRenderingEngine.js +112 -0
- package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.d.ts +3 -3
- package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js +0 -2
- package/dist/esm/stateManagement/annotation/annotationLocking.d.ts +1 -1
- package/dist/esm/stateManagement/annotation/annotationSelection.js +1 -1
- package/dist/esm/stateManagement/annotation/annotationState.d.ts +4 -4
- package/dist/esm/stateManagement/annotation/annotationState.js +4 -6
- package/dist/esm/stateManagement/annotation/annotationVisibility.d.ts +1 -1
- package/dist/esm/stateManagement/annotation/annotationVisibility.js +1 -1
- package/dist/esm/stateManagement/annotation/config/ToolStyle.d.ts +1 -1
- package/dist/esm/stateManagement/annotation/config/getFont.d.ts +2 -2
- package/dist/esm/stateManagement/annotation/config/getState.d.ts +1 -1
- package/dist/esm/stateManagement/annotation/config/helpers.d.ts +2 -2
- package/dist/esm/stateManagement/annotation/getAnnotation.d.ts +2 -0
- package/dist/esm/stateManagement/annotation/getAnnotation.js +6 -0
- package/dist/esm/stateManagement/annotation/helpers/state.d.ts +2 -2
- package/dist/esm/stateManagement/annotation/utilities/defineProperties.d.ts +1 -1
- package/dist/esm/stateManagement/index.d.ts +1 -3
- package/dist/esm/stateManagement/index.js +3 -2
- package/dist/esm/{tools/displayTools → stateManagement/segmentation}/SegmentationRenderingEngine.d.ts +6 -4
- package/dist/esm/{tools/displayTools → stateManagement/segmentation}/SegmentationRenderingEngine.js +23 -19
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.d.ts +29 -13
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js +73 -23
- package/dist/esm/stateManagement/segmentation/activeSegmentation.d.ts +5 -4
- package/dist/esm/stateManagement/segmentation/activeSegmentation.js +15 -6
- package/dist/esm/stateManagement/segmentation/addColorLUT.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/addColorLUT.js +5 -0
- package/dist/esm/stateManagement/segmentation/addRepresentationData.d.ts +3 -3
- package/dist/esm/stateManagement/segmentation/addRepresentationData.js +1 -1
- package/dist/esm/stateManagement/segmentation/addSegmentation.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/addSegmentation.js +11 -0
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentation.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/{addRepresentation.js → addSegmentationRepresentation.js} +31 -10
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentationState.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentationState.js +10 -0
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.js +9 -0
- package/dist/esm/stateManagement/segmentation/addSegmentations.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/config/index.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/config/index.js +2 -2
- package/dist/esm/stateManagement/segmentation/config/segmentationColor.js +8 -6
- package/dist/esm/stateManagement/segmentation/config/segmentationConfig.d.ts +5 -5
- package/dist/esm/stateManagement/segmentation/config/segmentationConfig.js +17 -12
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.d.ts +5 -5
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.js +16 -13
- package/dist/esm/stateManagement/segmentation/convertVolumeToStackSegmentation.d.ts +0 -8
- package/dist/esm/stateManagement/segmentation/convertVolumeToStackSegmentation.js +7 -82
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationDataModified.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationDataModified.js +11 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationModified.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationModified.js +18 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationRemoved.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationRemoved.js +8 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationRepresentationModified.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationRepresentationModified.js +8 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationRepresentationRemoved.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationRepresentationRemoved.js +8 -0
- package/dist/esm/stateManagement/segmentation/getActiveSegmentIndex.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/getActiveSegmentIndex.js +7 -0
- package/dist/esm/stateManagement/segmentation/getActiveSegmentationRepresentation.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getActiveSegmentationRepresentation.js +5 -0
- package/dist/esm/stateManagement/segmentation/getAllSegmentationRepresentations.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getAllSegmentationRepresentations.js +6 -0
- package/dist/esm/stateManagement/segmentation/getColorLUT.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getColorLUT.js +5 -0
- package/dist/esm/stateManagement/segmentation/getCurrentLabelmapImageIdForViewport.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/getCurrentLabelmapImageIdForViewport.js +5 -0
- package/dist/esm/stateManagement/segmentation/getGlobalConfig.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getGlobalConfig.js +5 -0
- package/dist/esm/stateManagement/segmentation/getNextColorLUTIndex.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/getNextColorLUTIndex.js +5 -0
- package/dist/esm/stateManagement/segmentation/getPerSegmentConfig.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getPerSegmentConfig.js +5 -0
- package/dist/esm/stateManagement/segmentation/getSegmentation.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getSegmentation.js +5 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentation.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentation.js +5 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationConfig.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationConfig.js +5 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationViewportStates.d.ts +7 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationViewportStates.js +6 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationVisibility.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationVisibility.js +5 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentations.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentations.js +12 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationsForSegmentation.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationsForSegmentation.js +5 -0
- package/dist/esm/stateManagement/segmentation/getSegmentations.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getSegmentations.js +6 -0
- package/dist/esm/stateManagement/segmentation/getViewportIdsWithSegmentation.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/getViewportIdsWithSegmentation.js +10 -0
- package/dist/esm/stateManagement/segmentation/helpers/clipAndCacheSurfacesForViewport.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/helpers/clipAndCacheSurfacesForViewport.js +1 -1
- package/dist/esm/stateManagement/segmentation/helpers/normalizeSegmentationInput.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/helpers/updateStackSegmentationState.d.ts +8 -0
- package/dist/esm/stateManagement/segmentation/helpers/updateStackSegmentationState.js +31 -0
- package/dist/esm/stateManagement/segmentation/helpers/validateSegmentationInput.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/index.d.ts +4 -4
- package/dist/esm/stateManagement/segmentation/index.js +4 -4
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/contourComputationStrategies.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/contourComputationStrategies.js +5 -4
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/utils/createAndAddContourSegmentationsFromClippedSurfaces.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/utils/createAndAddContourSegmentationsFromClippedSurfaces.js +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/utils/extractContourData.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.js +13 -22
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.js +2 -6
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.js +10 -15
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.js +2 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.js +3 -4
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.js +3 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.js +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.js +4 -4
- package/dist/esm/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.js +4 -3
- package/dist/esm/stateManagement/segmentation/polySeg/computeAndAddRepresentation.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/computeAndAddRepresentation.js +1 -1
- package/dist/esm/stateManagement/segmentation/removeColorLUT.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/removeColorLUT.js +5 -0
- package/dist/esm/stateManagement/segmentation/removeRepresentation.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/removeRepresentation.js +9 -0
- package/dist/esm/stateManagement/segmentation/removeSegmentation.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/removeSegmentation.js +7 -0
- package/dist/esm/stateManagement/segmentation/removeSegmentationRepresentations.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/{removeRepresentationsFromViewport.js → removeSegmentationRepresentations.js} +11 -8
- package/dist/esm/stateManagement/segmentation/segmentIndex.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/segmentIndex.js +6 -10
- package/dist/esm/stateManagement/segmentation/segmentLocking.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/segmentLocking.js +3 -3
- package/dist/esm/stateManagement/segmentation/segmentationState.d.ts +29 -38
- package/dist/esm/stateManagement/segmentation/segmentationState.js +29 -157
- package/dist/esm/stateManagement/segmentation/setActiveSegmentationRepresentation.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/setActiveSegmentationRepresentation.js +9 -0
- package/dist/esm/stateManagement/segmentation/setGlobalConfig.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/setGlobalConfig.js +9 -0
- package/dist/esm/stateManagement/segmentation/setPerSegmentConfig.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/setPerSegmentConfig.js +9 -0
- package/dist/esm/stateManagement/segmentation/setSegmentationRepresentationConfig.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/setSegmentationRepresentationConfig.js +9 -0
- package/dist/esm/stateManagement/segmentation/setSegmentationRepresentationVisibility.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/setSegmentationRepresentationVisibility.js +5 -0
- package/dist/esm/stateManagement/segmentation/triggerSegmentationEvents.d.ts +5 -5
- package/dist/esm/stateManagement/segmentation/triggerSegmentationEvents.js +5 -45
- package/dist/esm/stateManagement/segmentation/updateLabelmapSegmentationImageReferences.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/updateLabelmapSegmentationImageReferences.js +5 -0
- package/dist/esm/store/SynchronizerManager/Synchronizer.d.ts +7 -3
- package/dist/esm/store/SynchronizerManager/Synchronizer.js +2 -1
- package/dist/esm/store/SynchronizerManager/createSynchronizer.d.ts +3 -3
- package/dist/esm/store/SynchronizerManager/createSynchronizer.js +2 -2
- package/dist/esm/store/SynchronizerManager/destroy.js +1 -1
- package/dist/esm/store/SynchronizerManager/destroySynchronizer.js +1 -1
- package/dist/esm/store/SynchronizerManager/getAllSynchronizers.d.ts +1 -1
- package/dist/esm/store/SynchronizerManager/getAllSynchronizers.js +1 -1
- package/dist/esm/store/SynchronizerManager/getSynchronizer.d.ts +1 -1
- package/dist/esm/store/SynchronizerManager/getSynchronizer.js +1 -1
- package/dist/esm/store/SynchronizerManager/getSynchronizersForViewport.d.ts +1 -1
- package/dist/esm/store/SynchronizerManager/getSynchronizersForViewport.js +1 -1
- package/dist/esm/store/ToolGroupManager/ToolGroup.d.ts +3 -3
- package/dist/esm/store/ToolGroupManager/ToolGroup.js +12 -8
- package/dist/esm/store/ToolGroupManager/createToolGroup.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/createToolGroup.js +1 -1
- package/dist/esm/store/ToolGroupManager/destroy.js +3 -3
- package/dist/esm/store/ToolGroupManager/destroyToolGroup.js +1 -1
- package/dist/esm/store/ToolGroupManager/getAllToolGroups.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/getAllToolGroups.js +1 -1
- package/dist/esm/store/ToolGroupManager/getToolGroup.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/getToolGroup.js +1 -1
- package/dist/esm/store/ToolGroupManager/getToolGroupForViewport.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/getToolGroupForViewport.js +1 -1
- package/dist/esm/store/ToolGroupManager/getToolGroupsWithToolName.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/getToolGroupsWithToolName.js +1 -1
- package/dist/esm/store/addEnabledElement.d.ts +1 -1
- package/dist/esm/store/addEnabledElement.js +1 -1
- package/dist/esm/store/addTool.d.ts +1 -0
- package/dist/esm/store/addTool.js +3 -3
- package/dist/esm/store/filterMoveableAnnotationTools.d.ts +1 -1
- package/dist/esm/store/filterToolsWithAnnotationsForElement.d.ts +1 -1
- package/dist/esm/store/filterToolsWithMoveableHandles.d.ts +1 -1
- package/dist/esm/store/index.d.ts +1 -2
- package/dist/esm/store/index.js +1 -2
- package/dist/esm/store/removeEnabledElement.d.ts +1 -1
- package/dist/esm/store/removeEnabledElement.js +1 -1
- package/dist/esm/store/state.d.ts +4 -3
- package/dist/esm/store/state.js +1 -1
- package/dist/esm/synchronizers/callbacks/areViewportsCoplanar .d.ts +1 -1
- package/dist/esm/synchronizers/callbacks/cameraSyncCallback.d.ts +2 -2
- package/dist/esm/synchronizers/callbacks/imageSliceSyncCallback.d.ts +2 -2
- package/dist/esm/synchronizers/callbacks/presentationViewSyncCallback.d.ts +1 -1
- package/dist/esm/synchronizers/callbacks/slabThicknessSyncCallback.d.ts +1 -1
- package/dist/esm/synchronizers/callbacks/voiSyncCallback.d.ts +5 -2
- package/dist/esm/synchronizers/callbacks/zoomPanSyncCallback.d.ts +2 -2
- package/dist/esm/synchronizers/synchronizers/createCameraPositionSynchronizer.d.ts +1 -1
- package/dist/esm/synchronizers/synchronizers/createImageSliceSynchronizer.d.ts +1 -1
- package/dist/esm/synchronizers/synchronizers/createPresentationViewSynchronizer.d.ts +2 -2
- package/dist/esm/synchronizers/synchronizers/createPresentationViewSynchronizer.js +1 -1
- package/dist/esm/synchronizers/synchronizers/createSlabThicknessSynchronizer.d.ts +1 -1
- package/dist/esm/synchronizers/synchronizers/createVOISynchronizer.d.ts +1 -1
- package/dist/esm/synchronizers/synchronizers/createZoomPanSynchronizer.d.ts +1 -1
- package/dist/esm/tools/AdvancedMagnifyTool.d.ts +97 -8
- package/dist/esm/tools/AdvancedMagnifyTool.js +506 -4
- package/dist/esm/tools/AnnotationEraserTool.d.ts +1 -1
- package/dist/esm/tools/AnnotationEraserTool.js +2 -2
- package/dist/esm/tools/CrosshairsTool.d.ts +5 -5
- package/dist/esm/tools/CrosshairsTool.js +5 -4
- package/dist/esm/tools/MIPJumpToClickTool.d.ts +1 -2
- package/dist/esm/tools/MIPJumpToClickTool.js +2 -3
- package/dist/esm/tools/MagnifyTool.d.ts +2 -3
- package/dist/esm/tools/MagnifyTool.js +1 -1
- package/dist/esm/tools/OrientationMarkerTool.d.ts +41 -58
- package/dist/esm/tools/OrientationMarkerTool.js +8 -7
- package/dist/esm/tools/OverlayGridTool.d.ts +2 -4
- package/dist/esm/tools/OverlayGridTool.js +1 -1
- package/dist/esm/tools/PanTool.d.ts +1 -1
- package/dist/esm/tools/PanTool.js +5 -0
- package/dist/esm/tools/PlanarRotateTool.d.ts +3 -1
- package/dist/esm/tools/PlanarRotateTool.js +18 -4
- package/dist/esm/tools/ReferenceCursors.d.ts +2 -5
- package/dist/esm/tools/ReferenceLinesTool.d.ts +4 -6
- package/dist/esm/tools/ReferenceLinesTool.js +1 -1
- package/dist/esm/tools/ScaleOverlayTool.d.ts +7 -9
- package/dist/esm/tools/ScaleOverlayTool.js +1 -2
- package/dist/esm/tools/SculptorTool/CircleSculptCursor.d.ts +4 -4
- package/dist/esm/tools/SculptorTool.d.ts +1 -1
- package/dist/esm/tools/SculptorTool.js +3 -3
- package/dist/esm/tools/SegmentationIntersectionTool.d.ts +2 -2
- package/dist/esm/tools/StackScrollTool.d.ts +2 -1
- package/dist/esm/tools/StackScrollTool.js +17 -3
- package/dist/esm/tools/StackScrollToolMouseWheelTool.d.ts +1 -2
- package/dist/esm/tools/StackScrollToolMouseWheelTool.js +1 -2
- package/dist/esm/tools/TrackballRotateTool.d.ts +1 -1
- package/dist/esm/tools/TrackballRotateTool.js +4 -0
- package/dist/esm/tools/VolumeRotateMouseWheelTool.d.ts +2 -3
- package/dist/esm/tools/WindowLevelRegionTool.d.ts +3 -3
- package/dist/esm/tools/WindowLevelRegionTool.js +2 -4
- package/dist/esm/tools/WindowLevelTool.d.ts +1 -1
- package/dist/esm/tools/WindowLevelTool.js +12 -7
- package/dist/esm/tools/ZoomTool.d.ts +2 -2
- package/dist/esm/tools/ZoomTool.js +2 -2
- package/dist/esm/tools/annotation/AngleTool.d.ts +5 -7
- package/dist/esm/tools/annotation/AngleTool.js +4 -3
- package/dist/esm/tools/annotation/ArrowAnnotateTool.d.ts +5 -7
- package/dist/esm/tools/annotation/ArrowAnnotateTool.js +1 -1
- package/dist/esm/tools/annotation/BidirectionalTool.d.ts +5 -7
- package/dist/esm/tools/annotation/BidirectionalTool.js +2 -3
- package/dist/esm/tools/annotation/CircleROITool.d.ts +5 -7
- package/dist/esm/tools/annotation/CircleROITool.js +15 -13
- package/dist/esm/tools/annotation/CobbAngleTool.d.ts +5 -7
- package/dist/esm/tools/annotation/CobbAngleTool.js +1 -1
- package/dist/esm/tools/annotation/DragProbeTool.d.ts +3 -5
- package/dist/esm/tools/annotation/DragProbeTool.js +0 -5
- package/dist/esm/tools/annotation/EllipticalROITool.d.ts +5 -7
- package/dist/esm/tools/annotation/EllipticalROITool.js +13 -9
- package/dist/esm/tools/annotation/HeightTool.d.ts +36 -0
- package/dist/esm/tools/annotation/HeightTool.js +434 -0
- package/dist/esm/tools/annotation/KeyImageTool.d.ts +4 -6
- package/dist/esm/tools/annotation/KeyImageTool.js +1 -1
- package/dist/esm/tools/annotation/LengthTool.d.ts +5 -7
- package/dist/esm/tools/annotation/LengthTool.js +8 -7
- package/dist/esm/tools/annotation/LivewireContourTool.d.ts +3 -4
- package/dist/esm/tools/annotation/LivewireContourTool.js +5 -3
- package/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.d.ts +1 -2
- package/dist/esm/tools/annotation/PlanarFreehandROITool.d.ts +21 -4
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js +160 -118
- package/dist/esm/tools/annotation/ProbeTool.d.ts +4 -6
- package/dist/esm/tools/annotation/ProbeTool.js +17 -33
- package/dist/esm/tools/annotation/RectangleROITool.d.ts +5 -5
- package/dist/esm/tools/annotation/RectangleROITool.js +12 -9
- package/dist/esm/tools/annotation/SplineContourSegmentationTool.d.ts +1 -1
- package/dist/esm/tools/annotation/SplineROITool.d.ts +1 -3
- package/dist/esm/tools/annotation/SplineROITool.js +9 -6
- package/dist/esm/tools/annotation/UltrasoundDirectionalTool.d.ts +5 -7
- package/dist/esm/tools/annotation/UltrasoundDirectionalTool.js +6 -7
- package/dist/esm/tools/annotation/VideoRedactionTool.d.ts +4 -5
- package/dist/esm/tools/annotation/VideoRedactionTool.js +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/findOpenUShapedContourVectorToPeak.d.ts +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +2 -2
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js +1 -1
- package/dist/esm/tools/annotation/splines/CardinalSpline.d.ts +1 -1
- package/dist/esm/tools/annotation/splines/CubicSpline.d.ts +1 -1
- package/dist/esm/tools/annotation/splines/QuadraticSpline.d.ts +1 -1
- package/dist/esm/tools/annotation/splines/Spline.d.ts +1 -1
- package/dist/esm/tools/base/AnnotationDisplayTool.d.ts +3 -3
- package/dist/esm/tools/base/AnnotationDisplayTool.js +3 -9
- package/dist/esm/tools/base/AnnotationTool.d.ts +3 -14
- package/dist/esm/tools/base/BaseTool.d.ts +5 -5
- package/dist/esm/tools/base/BaseTool.js +1 -1
- package/dist/esm/tools/base/ContourBaseTool.d.ts +1 -1
- package/dist/esm/tools/base/ContourBaseTool.js +5 -5
- package/dist/esm/tools/base/ContourSegmentationBaseTool.js +28 -19
- package/dist/esm/tools/displayTools/Contour/contourConfig.d.ts +1 -1
- package/dist/esm/tools/displayTools/Contour/contourDisplay.d.ts +2 -2
- package/dist/esm/tools/displayTools/Contour/contourDisplay.js +9 -7
- package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.d.ts +2 -2
- package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.js +6 -6
- package/dist/esm/tools/displayTools/Contour/contourHandler/utils.d.ts +1 -1
- package/dist/esm/tools/displayTools/Contour/removeContourFromElement.js +2 -2
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.d.ts +1 -1
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.js +4 -3
- package/dist/esm/tools/displayTools/Labelmap/labelmapConfig.d.ts +1 -1
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.d.ts +3 -10
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js +24 -28
- package/dist/esm/tools/displayTools/Labelmap/validateLabelmap.d.ts +2 -2
- package/dist/esm/tools/displayTools/Surface/surfaceConfig.d.ts +1 -1
- package/dist/esm/tools/displayTools/Surface/surfaceDisplay.d.ts +2 -2
- package/dist/esm/tools/displayTools/Surface/surfaceDisplay.js +10 -7
- package/dist/esm/tools/distancePointToContour.d.ts +1 -1
- package/dist/esm/tools/index.d.ts +2 -1
- package/dist/esm/tools/index.js +2 -1
- package/dist/esm/tools/segmentation/BrushTool.js +11 -9
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.d.ts +20 -15
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.js +198 -67
- package/dist/esm/tools/segmentation/CircleScissorsTool.d.ts +3 -3
- package/dist/esm/tools/segmentation/CircleScissorsTool.js +10 -3
- package/dist/esm/tools/segmentation/PaintFillTool.d.ts +1 -1
- package/dist/esm/tools/segmentation/PaintFillTool.js +15 -14
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.d.ts +20 -10
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js +172 -55
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.d.ts +3 -3
- package/dist/esm/tools/segmentation/RectangleScissorsTool.d.ts +4 -3
- package/dist/esm/tools/segmentation/RectangleScissorsTool.js +8 -5
- package/dist/esm/tools/segmentation/SegmentSelectTool.d.ts +2 -2
- package/dist/esm/tools/segmentation/SegmentSelectTool.js +3 -3
- package/dist/esm/tools/segmentation/SphereScissorsTool.d.ts +3 -2
- package/dist/esm/tools/segmentation/SphereScissorsTool.js +12 -4
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.d.ts +4 -5
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.js +3 -1
- package/dist/esm/tools/segmentation/strategies/compositions/determineSegmentIndex.js +6 -3
- package/dist/esm/tools/segmentation/strategies/compositions/dynamicThreshold.js +1 -1
- package/dist/esm/tools/segmentation/strategies/compositions/islandRemoval.js +1 -1
- package/dist/esm/tools/segmentation/strategies/compositions/preview.js +6 -6
- package/dist/esm/tools/segmentation/strategies/compositions/regionFill.js +6 -3
- package/dist/esm/tools/segmentation/strategies/compositions/setValue.js +1 -1
- package/dist/esm/tools/segmentation/strategies/eraseRectangle.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/fillCircle.js +1 -1
- package/dist/esm/tools/segmentation/strategies/fillRectangle.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/fillRectangle.js +10 -7
- package/dist/esm/tools/segmentation/strategies/fillSphere.js +1 -1
- package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.js +7 -24
- package/dist/esm/tools/segmentation/strategies/utils/isWithinThreshold.d.ts +9 -2
- package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.d.ts +3 -3
- package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.js +0 -3
- package/dist/esm/types/AnnotationGroupSelector.d.ts +1 -1
- package/dist/esm/types/AnnotationRenderContext.d.ts +3 -2
- package/dist/esm/types/AnnotationStyle.d.ts +2 -2
- package/dist/esm/types/AnnotationTypes.d.ts +3 -3
- package/dist/esm/types/BoundsIJK.d.ts +1 -1
- package/dist/esm/types/CINETypes.d.ts +1 -0
- package/dist/esm/types/CalculatorTypes.d.ts +1 -1
- package/dist/esm/types/CardinalSplineProps.d.ts +1 -1
- package/dist/esm/types/ClosestPoint.d.ts +1 -1
- package/dist/esm/types/ContourAnnotation.d.ts +1 -1
- package/dist/esm/types/ContourSegmentationAnnotation.d.ts +2 -2
- package/dist/esm/types/ControlPointInfo.d.ts +1 -1
- package/dist/esm/types/EventTypes.d.ts +13 -12
- package/dist/esm/types/FloodFillTypes.d.ts +2 -2
- package/dist/esm/types/IAnnotationManager.d.ts +3 -3
- package/dist/esm/types/IDistance.d.ts +1 -1
- package/dist/esm/types/IPoints.d.ts +2 -2
- package/dist/esm/types/ISetToolModeOptions.d.ts +2 -2
- package/dist/esm/types/ISpline.d.ts +1 -1
- package/dist/esm/types/ISynchronizerEventHandler.d.ts +3 -3
- package/dist/esm/types/IToolClassReference.d.ts +3 -3
- package/dist/esm/types/IToolGroup.d.ts +8 -8
- package/dist/esm/types/ITouchPoints.d.ts +2 -2
- package/dist/esm/types/InteractionTypes.d.ts +1 -1
- package/dist/esm/types/InternalToolTypes.d.ts +4 -4
- package/dist/esm/types/InterpolationTypes.d.ts +3 -3
- package/dist/esm/types/JumpToSliceOptions.d.ts +1 -1
- package/dist/esm/types/LabelmapToolOperationData.d.ts +3 -2
- package/dist/esm/types/PlanarBoundingBox.d.ts +1 -1
- package/dist/esm/types/SVGDrawingHelper.d.ts +1 -1
- package/dist/esm/types/ScrollOptions.d.ts +1 -1
- package/dist/esm/types/SegmentationStateTypes.d.ts +7 -6
- package/dist/esm/types/SplineCurveSegment.d.ts +1 -1
- package/dist/esm/types/SplineLineSegment.d.ts +1 -1
- package/dist/esm/types/ToolAction.d.ts +1 -1
- package/dist/esm/types/ToolHandle.d.ts +1 -1
- package/dist/esm/types/ToolProps.d.ts +1 -1
- package/dist/esm/types/ToolSpecificAnnotationTypes.d.ts +34 -12
- package/dist/esm/types/index.d.ts +2 -2
- package/dist/esm/utilities/annotationFrameRange.d.ts +1 -1
- package/dist/esm/utilities/annotationHydration.d.ts +3 -2
- package/dist/esm/utilities/annotationHydration.js +1 -1
- package/dist/esm/utilities/cine/playClip.d.ts +6 -2
- package/dist/esm/utilities/cine/playClip.js +53 -6
- package/dist/esm/utilities/cine/state.d.ts +1 -1
- package/dist/esm/utilities/contourSegmentation/addContourSegmentationAnnotation.d.ts +1 -1
- package/dist/esm/utilities/contourSegmentation/addContourSegmentationAnnotation.js +1 -1
- package/dist/esm/utilities/contourSegmentation/areSameSegment.d.ts +1 -1
- package/dist/esm/utilities/contourSegmentation/isContourSegmentationAnnotation.d.ts +2 -2
- package/dist/esm/utilities/contourSegmentation/removeContourSegmentationAnnotation.d.ts +1 -1
- package/dist/esm/utilities/contourSegmentation/removeContourSegmentationAnnotation.js +2 -2
- package/dist/esm/utilities/contours/AnnotationToPointData.d.ts +1 -1
- package/dist/esm/utilities/contours/areCoplanarContours.d.ts +1 -1
- package/dist/esm/utilities/contours/findHandlePolylineIndex.d.ts +1 -1
- package/dist/esm/utilities/contours/generateContourSetsFromLabelmap.js +1 -1
- package/dist/esm/utilities/contours/getContourHolesDataWorld.js +1 -1
- package/dist/esm/utilities/contours/index.d.ts +1 -2
- package/dist/esm/utilities/contours/index.js +1 -2
- package/dist/esm/utilities/contours/interpolation/createPolylineToolData.d.ts +1 -1
- package/dist/esm/utilities/contours/interpolation/getInterpolationData.d.ts +1 -1
- package/dist/esm/utilities/contours/interpolation/interpolate.d.ts +1 -1
- package/dist/esm/utilities/contours/reverseIfAntiClockwise.d.ts +1 -1
- package/dist/esm/utilities/contours/updateContourPolyline.d.ts +1 -1
- package/dist/esm/utilities/contours/updateContourPolyline.js +1 -1
- package/dist/esm/utilities/dynamicVolume/generateImageFromTimeData.d.ts +3 -2
- package/dist/esm/utilities/dynamicVolume/generateImageFromTimeData.js +31 -23
- package/dist/esm/utilities/dynamicVolume/getDataInTime.d.ts +1 -1
- package/dist/esm/utilities/dynamicVolume/getDataInTime.js +14 -9
- package/dist/esm/utilities/getAnnotationNearPoint.d.ts +1 -1
- package/dist/esm/utilities/getCalibratedUnits.d.ts +0 -6
- package/dist/esm/utilities/getCalibratedUnits.js +13 -4
- package/dist/esm/utilities/getPixelValueUnits.d.ts +2 -1
- package/dist/esm/utilities/getPixelValueUnits.js +1 -0
- package/dist/esm/utilities/getSphereBoundsInfo.d.ts +1 -1
- package/dist/esm/utilities/getToolsWithModesForElement.d.ts +1 -1
- package/dist/esm/utilities/getToolsWithModesForElement.js +2 -2
- package/dist/esm/utilities/getVOIMultipliers.d.ts +1 -1
- package/dist/esm/utilities/index.d.ts +2 -5
- package/dist/esm/utilities/index.js +2 -5
- package/dist/esm/utilities/livewire/LiveWirePath.d.ts +1 -1
- package/dist/esm/utilities/livewire/LivewireScissors.d.ts +1 -1
- package/dist/esm/utilities/math/aabb/distanceToPoint.d.ts +1 -1
- package/dist/esm/utilities/math/aabb/distanceToPointSquared.d.ts +1 -1
- package/dist/esm/utilities/math/aabb/intersectAABB.d.ts +1 -1
- package/dist/esm/utilities/math/basic/BasicStatsCalculator.d.ts +2 -2
- package/dist/esm/utilities/math/basic/BasicStatsCalculator.js +1 -1
- package/dist/esm/utilities/math/basic/Calculator.d.ts +1 -1
- package/dist/esm/utilities/math/circle/getCanvasCircleCorners.d.ts +1 -1
- package/dist/esm/utilities/math/circle/getCanvasCircleRadius.d.ts +1 -1
- package/dist/esm/utilities/math/line/distanceToPointSquared.d.ts +1 -1
- package/dist/esm/utilities/math/line/distanceToPointSquaredInfo.js +3 -3
- package/dist/esm/utilities/math/midPoint.d.ts +1 -1
- package/dist/esm/utilities/math/point/mirror.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/combinePolyline.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/getAABB.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/getLinesIntersection.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/getNormal2.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/getNormal3.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/intersectPolyline.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/isClosed.js +2 -2
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +2 -2
- package/dist/esm/utilities/math/sphere/pointInSphere.d.ts +1 -1
- package/dist/esm/utilities/orientation/getOrientationStringLPS.d.ts +1 -1
- package/dist/esm/utilities/planar/filterAnnotationsForDisplay.d.ts +1 -1
- package/dist/esm/utilities/planar/filterAnnotationsWithinPlane.d.ts +3 -0
- package/dist/esm/utilities/planar/filterAnnotationsWithinPlane.js +26 -0
- package/dist/esm/utilities/planar/filterAnnotationsWithinSlice.d.ts +1 -1
- package/dist/esm/utilities/planar/index.d.ts +3 -1
- package/dist/esm/utilities/planar/index.js +3 -1
- package/dist/esm/utilities/planarFreehandROITool/interpolation/algorithms/bspline.d.ts +1 -1
- package/dist/esm/utilities/planarFreehandROITool/interpolation/interpolateSegmentPoints.d.ts +1 -1
- package/dist/esm/utilities/planarFreehandROITool/smoothAnnotation.d.ts +2 -2
- package/dist/esm/utilities/planarFreehandROITool/smoothAnnotation.js +3 -3
- package/dist/esm/utilities/planarFreehandROITool/smoothPoints.d.ts +11 -3
- package/dist/esm/utilities/polyData/utils.d.ts +1 -1
- package/dist/esm/utilities/scroll.d.ts +4 -3
- package/dist/esm/utilities/scroll.js +3 -10
- package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts +1 -1
- package/dist/esm/utilities/segmentation/brushSizeForToolGroup.js +1 -1
- package/dist/esm/utilities/segmentation/brushThresholdForToolGroup.js +1 -1
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.d.ts +2 -11
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js +1 -1
- package/dist/esm/utilities/segmentation/createMergedLabelmapForIndex.d.ts +1 -1
- package/dist/esm/utilities/segmentation/createMergedLabelmapForIndex.js +7 -7
- package/dist/esm/utilities/segmentation/floodFill.d.ts +1 -1
- package/dist/esm/utilities/segmentation/getBrushToolInstances.d.ts +1 -0
- package/dist/esm/utilities/segmentation/getBrushToolInstances.js +17 -0
- package/dist/esm/utilities/segmentation/getDefaultRepresentationConfig.d.ts +1 -1
- package/dist/esm/utilities/segmentation/getSegmentIndexAtLabelmapBorder.js +8 -5
- package/dist/esm/utilities/segmentation/getSegmentIndexAtWorldPoint.d.ts +1 -1
- package/dist/esm/utilities/segmentation/getSegmentIndexAtWorldPoint.js +7 -4
- package/dist/esm/utilities/segmentation/getUniqueSegmentIndices.d.ts +0 -2
- package/dist/esm/utilities/segmentation/getUniqueSegmentIndices.js +7 -27
- package/dist/esm/utilities/segmentation/index.d.ts +3 -3
- package/dist/esm/utilities/segmentation/index.js +3 -3
- package/dist/esm/utilities/segmentation/invalidateBrushCursor.js +1 -4
- package/dist/esm/utilities/segmentation/isValidRepresentationConfig.d.ts +1 -1
- package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.d.ts +1 -1
- package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.js +5 -3
- package/dist/esm/utilities/segmentation/segmentContourAction.d.ts +1 -1
- package/dist/esm/utilities/segmentation/segmentContourAction.js +9 -9
- package/dist/esm/utilities/segmentation/thresholdSegmentationByRange.d.ts +2 -2
- package/dist/esm/utilities/segmentation/thresholdSegmentationByRange.js +24 -17
- package/dist/esm/utilities/segmentation/thresholdVolumeByRange.d.ts +3 -3
- package/dist/esm/utilities/segmentation/thresholdVolumeByRange.js +21 -12
- package/dist/esm/utilities/segmentation/utilities.d.ts +16 -3
- package/dist/esm/utilities/segmentation/utilities.js +28 -23
- package/dist/esm/utilities/stackPrefetch/stackContextPrefetch.js +30 -25
- package/dist/esm/utilities/stackPrefetch/stackPrefetch.js +3 -8
- package/dist/esm/utilities/stackPrefetch/stackPrefetchUtils.js +2 -3
- package/dist/esm/utilities/stackPrefetch/state.d.ts +20 -1
- package/dist/esm/utilities/touch/index.d.ts +1 -1
- package/dist/esm/utilities/triggerAnnotationRender.d.ts +0 -20
- package/dist/esm/utilities/triggerAnnotationRender.js +1 -112
- package/dist/esm/utilities/viewport/isViewportPreScaled.d.ts +1 -1
- package/dist/esm/utilities/viewport/isViewportPreScaled.js +2 -5
- package/dist/esm/utilities/viewport/jumpToSlice.d.ts +1 -1
- package/dist/esm/utilities/viewport/jumpToSlice.js +4 -6
- package/dist/esm/utilities/viewportFilters/filterViewportsWithToolEnabled.js +2 -2
- package/dist/esm/utilities/voi/colorbar/ColorbarCanvas.d.ts +2 -2
- package/dist/esm/utilities/voi/colorbar/ViewportColorbar.d.ts +1 -1
- package/dist/esm/utilities/voi/colorbar/ViewportColorbar.js +1 -1
- package/dist/esm/utilities/voi/colorbar/types/ColorbarCanvasProps.d.ts +1 -1
- package/dist/esm/utilities/voi/colorbar/types/ColorbarCommonProps.d.ts +1 -1
- package/dist/esm/utilities/voi/colorbar/types/ColorbarProps.d.ts +3 -3
- package/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.d.ts +8 -0
- package/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.js +4 -10
- package/dist/esm/widgets/types/index.d.ts +2 -2
- package/dist/esm/workers/polySegConverters.js +65 -32
- package/dist/umd/78.index.js +1 -1
- package/dist/umd/78.index.js.map +1 -1
- package/dist/umd/985.index.js +1 -1
- package/dist/umd/985.index.js.map +1 -1
- package/dist/umd/index.js +2 -1
- package/dist/umd/index.js.LICENSE.txt +6 -0
- package/dist/umd/index.js.map +1 -1
- package/package.json +7 -8
- package/dist/esm/stateManagement/segmentation/addRepresentation.d.ts +0 -3
- package/dist/esm/stateManagement/segmentation/addRepresentations.d.ts +0 -3
- package/dist/esm/stateManagement/segmentation/addRepresentations.js +0 -9
- package/dist/esm/stateManagement/segmentation/convertStackToVolumeSegmentation.d.ts +0 -17
- package/dist/esm/stateManagement/segmentation/convertStackToVolumeSegmentation.js +0 -54
- package/dist/esm/stateManagement/segmentation/helpers/getRepresentationRenderingConfig.d.ts +0 -2
- package/dist/esm/stateManagement/segmentation/helpers/getRepresentationRenderingConfig.js +0 -11
- package/dist/esm/stateManagement/segmentation/removeRepresentationsFromViewport.d.ts +0 -2
- package/dist/esm/tools/AdvancedMagnifyViewport.d.ts +0 -76
- package/dist/esm/tools/AdvancedMagnifyViewport.js +0 -351
- package/dist/esm/tools/AdvancedMagnifyViewportManager.d.ts +0 -37
- package/dist/esm/tools/AdvancedMagnifyViewportManager.js +0 -161
- package/dist/esm/utilities/contours/interpolation/index.d.ts +0 -2
- package/dist/esm/utilities/contours/interpolation/index.js +0 -2
- package/dist/esm/utilities/pointInShapeCallback.d.ts +0 -18
- package/dist/esm/utilities/pointInShapeCallback.js +0 -82
- package/dist/esm/utilities/pointInSurroundingSphereCallback.d.ts +0 -4
- package/dist/esm/utilities/pointInSurroundingSphereCallback.js +0 -63
- package/dist/esm/utilities/segmentation/triggerSegmentationRender.d.ts +0 -3
- package/dist/esm/utilities/segmentation/triggerSegmentationRender.js +0 -6
- package/dist/esm/utilities/segmentation/triggerSegmentationRenderForViewports.d.ts +0 -3
- package/dist/esm/utilities/segmentation/triggerSegmentationRenderForViewports.js +0 -6
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { vec3 } from 'gl-matrix';
|
|
3
|
+
import type { PublicToolProps, ToolProps, EventTypes, SVGDrawingHelper, Annotation } from '../../types';
|
|
4
|
+
import type { RectangleROIStartEndThresholdAnnotation, ROICachedStats } from '../../types/ToolSpecificAnnotationTypes';
|
|
4
5
|
import RectangleROITool from '../annotation/RectangleROITool';
|
|
5
6
|
declare class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
6
7
|
static toolName: any;
|
|
7
|
-
_throttledCalculateCachedStats:
|
|
8
|
+
_throttledCalculateCachedStats: Function;
|
|
8
9
|
editData: {
|
|
9
|
-
annotation:
|
|
10
|
+
annotation: Annotation;
|
|
10
11
|
viewportIdsToRender: string[];
|
|
11
12
|
handleIndex?: number;
|
|
12
13
|
newAnnotation?: boolean;
|
|
@@ -30,18 +31,24 @@ declare class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
30
31
|
};
|
|
31
32
|
data: {
|
|
32
33
|
label: string;
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
startCoordinate: number;
|
|
35
|
+
endCoordinate: number;
|
|
35
36
|
cachedStats: {
|
|
36
37
|
pointsInVolume: any[];
|
|
37
38
|
projectionPoints: any[];
|
|
38
39
|
projectionPointsImageIds: any[];
|
|
40
|
+
statistics: ROICachedStats;
|
|
39
41
|
};
|
|
40
42
|
handles: {
|
|
41
43
|
textBox: {
|
|
42
44
|
hasMoved: boolean;
|
|
43
|
-
worldPosition:
|
|
44
|
-
worldBoundingBox:
|
|
45
|
+
worldPosition: Types.Point3;
|
|
46
|
+
worldBoundingBox: {
|
|
47
|
+
topLeft: Types.Point3;
|
|
48
|
+
topRight: Types.Point3;
|
|
49
|
+
bottomLeft: Types.Point3;
|
|
50
|
+
bottomRight: Types.Point3;
|
|
51
|
+
};
|
|
45
52
|
};
|
|
46
53
|
points: Types.Point3[];
|
|
47
54
|
activeHandleIndex: any;
|
|
@@ -51,9 +58,12 @@ declare class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
51
58
|
};
|
|
52
59
|
_endCallback: (evt: EventTypes.InteractionEventType) => void;
|
|
53
60
|
_computeProjectionPoints(annotation: RectangleROIStartEndThresholdAnnotation, imageVolume: Types.IImageVolume): void;
|
|
54
|
-
_computePointsInsideVolume(annotation: any, imageVolume: any, enabledElement: any): void;
|
|
61
|
+
_computePointsInsideVolume(annotation: any, targetId: any, imageVolume: any, enabledElement: any): void;
|
|
55
62
|
_calculateCachedStatsTool(annotation: any, enabledElement: any): any;
|
|
56
63
|
renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean;
|
|
57
|
-
|
|
64
|
+
_getStartCoordinate(worldPos: Types.Point3, viewPlaneNormal: Types.Point3): number | undefined;
|
|
65
|
+
_getEndCoordinate(worldPos: Types.Point3, spacingInNormal: number, viewPlaneNormal: Types.Point3): number | undefined;
|
|
66
|
+
_getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal: Types.Point3): number;
|
|
67
|
+
_getCoordinateForViewplaneNormal(pos: vec3 | number, viewPlaneNormal: Types.Point3): number | undefined;
|
|
58
68
|
}
|
|
59
69
|
export default RectangleROIStartEndThresholdTool;
|
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
import { getEnabledElement, cache, StackViewport,
|
|
1
|
+
import { getEnabledElement, cache, StackViewport, utilities as csUtils, } from '@cornerstonejs/core';
|
|
2
|
+
import { getCalibratedLengthUnitsAndScale } from '../../utilities/getCalibratedUnits';
|
|
2
3
|
import { vec3 } from 'gl-matrix';
|
|
3
4
|
import { addAnnotation, getAnnotations, removeAnnotation, } from '../../stateManagement';
|
|
4
5
|
import { isAnnotationLocked } from '../../stateManagement/annotation/annotationLocking';
|
|
5
|
-
import {
|
|
6
|
-
import { drawHandles as drawHandlesSvg, drawRect as drawRectSvg, } from '../../drawingSvg';
|
|
6
|
+
import { drawHandles as drawHandlesSvg, drawRect as drawRectSvg, drawLinkedTextBox as drawLinkedTextBoxSvg, } from '../../drawingSvg';
|
|
7
7
|
import { getViewportIdsWithToolToRender } from '../../utilities/viewportFilters';
|
|
8
8
|
import throttle from '../../utilities/throttle';
|
|
9
|
+
import { getTextBoxCoordsCanvas } from '../../utilities/drawing';
|
|
10
|
+
import getWorldWidthAndHeightFromCorners from '../../utilities/planar/getWorldWidthAndHeightFromCorners';
|
|
9
11
|
import { isAnnotationVisible } from '../../stateManagement/annotation/annotationVisibility';
|
|
10
12
|
import { hideElementCursor, resetElementCursor, } from '../../cursors/elementCursor';
|
|
11
13
|
import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
|
|
12
|
-
import { triggerAnnotationCompleted } from '../../stateManagement/annotation/helpers/state';
|
|
14
|
+
import { triggerAnnotationCompleted, triggerAnnotationModified, } from '../../stateManagement/annotation/helpers/state';
|
|
13
15
|
import RectangleROITool from '../annotation/RectangleROITool';
|
|
14
|
-
import {
|
|
16
|
+
import { isViewportPreScaled } from '../../utilities/viewport/isViewportPreScaled';
|
|
17
|
+
import { BasicStatsCalculator } from '../../utilities/math/basic';
|
|
18
|
+
import { filterAnnotationsWithinSamePlane } from '../../utilities/planar';
|
|
19
|
+
import { getPixelValueUnits } from '../../utilities/getPixelValueUnits';
|
|
15
20
|
const { transformWorldToIndex } = csUtils;
|
|
16
21
|
class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
17
22
|
constructor(toolProps = {}, defaultToolProps = {
|
|
18
23
|
configuration: {
|
|
24
|
+
storePointData: false,
|
|
19
25
|
numSlicesToPropagate: 10,
|
|
20
26
|
computePointsInsideVolume: false,
|
|
27
|
+
getTextLines: defaultGetTextLines,
|
|
28
|
+
statsCalculator: BasicStatsCalculator,
|
|
29
|
+
showTextBox: false,
|
|
21
30
|
},
|
|
22
31
|
}) {
|
|
23
32
|
super(toolProps, defaultToolProps);
|
|
@@ -40,12 +49,9 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
40
49
|
imageVolume = cache.getVolume(volumeId);
|
|
41
50
|
referencedImageId = csUtils.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
|
|
42
51
|
}
|
|
43
|
-
if (!referencedImageId) {
|
|
44
|
-
throw new Error('This tool does not work on non-acquisition planes');
|
|
45
|
-
}
|
|
46
|
-
const startIndex = viewport.getCurrentImageIdIndex();
|
|
47
52
|
const spacingInNormal = csUtils.getSpacingInNormalDirection(imageVolume, viewPlaneNormal);
|
|
48
|
-
const
|
|
53
|
+
const startCoord = this._getStartCoordinate(worldPos, viewPlaneNormal);
|
|
54
|
+
const endCoord = this._getEndCoordinate(worldPos, spacingInNormal, viewPlaneNormal);
|
|
49
55
|
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
50
56
|
const annotation = {
|
|
51
57
|
highlighted: true,
|
|
@@ -62,18 +68,24 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
62
68
|
},
|
|
63
69
|
data: {
|
|
64
70
|
label: '',
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
startCoordinate: startCoord,
|
|
72
|
+
endCoordinate: endCoord,
|
|
67
73
|
cachedStats: {
|
|
68
74
|
pointsInVolume: [],
|
|
69
75
|
projectionPoints: [],
|
|
70
76
|
projectionPointsImageIds: [referencedImageId],
|
|
77
|
+
statistics: [],
|
|
71
78
|
},
|
|
72
79
|
handles: {
|
|
73
80
|
textBox: {
|
|
74
81
|
hasMoved: false,
|
|
75
|
-
worldPosition:
|
|
76
|
-
worldBoundingBox:
|
|
82
|
+
worldPosition: [0, 0, 0],
|
|
83
|
+
worldBoundingBox: {
|
|
84
|
+
topLeft: [0, 0, 0],
|
|
85
|
+
topRight: [0, 0, 0],
|
|
86
|
+
bottomLeft: [0, 0, 0],
|
|
87
|
+
bottomRight: [0, 0, 0],
|
|
88
|
+
},
|
|
77
89
|
},
|
|
78
90
|
points: [
|
|
79
91
|
[...worldPos],
|
|
@@ -124,7 +136,7 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
124
136
|
const targetId = this.getTargetId(enabledElement.viewport);
|
|
125
137
|
const imageVolume = cache.getVolume(targetId.split(/volumeId:|\?/)[1]);
|
|
126
138
|
if (this.configuration.calculatePointsInsideVolume) {
|
|
127
|
-
this._computePointsInsideVolume(annotation, imageVolume, enabledElement);
|
|
139
|
+
this._computePointsInsideVolume(annotation, targetId, imageVolume, enabledElement);
|
|
128
140
|
}
|
|
129
141
|
triggerAnnotationRenderForViewportIds(viewportIdsToRender);
|
|
130
142
|
if (newAnnotation) {
|
|
@@ -134,11 +146,11 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
134
146
|
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
135
147
|
let renderStatus = false;
|
|
136
148
|
const { viewport } = enabledElement;
|
|
137
|
-
|
|
149
|
+
let annotations = getAnnotations(this.getToolName(), viewport.element);
|
|
138
150
|
if (!annotations?.length) {
|
|
139
151
|
return renderStatus;
|
|
140
152
|
}
|
|
141
|
-
|
|
153
|
+
annotations = filterAnnotationsWithinSamePlane(annotations, viewport.getCamera());
|
|
142
154
|
const styleSpecifier = {
|
|
143
155
|
toolGroupId: this.toolGroupId,
|
|
144
156
|
toolName: this.getToolName(),
|
|
@@ -147,22 +159,37 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
147
159
|
for (let i = 0; i < annotations.length; i++) {
|
|
148
160
|
const annotation = annotations[i];
|
|
149
161
|
const { annotationUID, data } = annotation;
|
|
150
|
-
const {
|
|
162
|
+
const { startCoordinate, endCoordinate } = data;
|
|
151
163
|
const { points, activeHandleIndex } = data.handles;
|
|
152
164
|
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
|
|
153
165
|
styleSpecifier.annotationUID = annotationUID;
|
|
154
166
|
const lineWidth = this.getStyle('lineWidth', styleSpecifier, annotation);
|
|
155
167
|
const lineDash = this.getStyle('lineDash', styleSpecifier, annotation);
|
|
156
168
|
const color = this.getStyle('color', styleSpecifier, annotation);
|
|
157
|
-
|
|
158
|
-
|
|
169
|
+
const focalPoint = viewport.getCamera().focalPoint;
|
|
170
|
+
const viewplaneNormal = viewport.getCamera().viewPlaneNormal;
|
|
171
|
+
let startCoord = startCoordinate;
|
|
172
|
+
let endCoord = endCoordinate;
|
|
173
|
+
if (Array.isArray(startCoordinate)) {
|
|
174
|
+
startCoord = this._getCoordinateForViewplaneNormal(startCoord, viewplaneNormal);
|
|
175
|
+
}
|
|
176
|
+
if (Array.isArray(endCoordinate)) {
|
|
177
|
+
endCoord = this._getCoordinateForViewplaneNormal(endCoord, viewplaneNormal);
|
|
178
|
+
}
|
|
179
|
+
const roundedStartCoord = csUtils.roundToPrecision(startCoord);
|
|
180
|
+
const roundedEndCoord = csUtils.roundToPrecision(endCoord);
|
|
181
|
+
const coord = this._getCoordinateForViewplaneNormal(focalPoint, viewplaneNormal);
|
|
182
|
+
const roundedCoord = csUtils.roundToPrecision(coord);
|
|
183
|
+
if (roundedCoord < Math.min(roundedStartCoord, roundedEndCoord) ||
|
|
184
|
+
roundedCoord > Math.max(roundedStartCoord, roundedEndCoord)) {
|
|
159
185
|
continue;
|
|
160
186
|
}
|
|
161
187
|
if (annotation.invalidated) {
|
|
162
188
|
this._throttledCalculateCachedStats(annotation, enabledElement);
|
|
163
189
|
}
|
|
164
190
|
let firstOrLastSlice = false;
|
|
165
|
-
if (
|
|
191
|
+
if (roundedCoord === roundedStartCoord ||
|
|
192
|
+
roundedCoord === roundedEndCoord) {
|
|
166
193
|
firstOrLastSlice = true;
|
|
167
194
|
}
|
|
168
195
|
if (!viewport.getRenderingEngine()) {
|
|
@@ -196,6 +223,42 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
196
223
|
lineWidth,
|
|
197
224
|
});
|
|
198
225
|
renderStatus = true;
|
|
226
|
+
if (this.configuration.showTextBox &&
|
|
227
|
+
this.configuration.calculatePointsInsideVolume) {
|
|
228
|
+
const options = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
|
|
229
|
+
if (!options.visibility) {
|
|
230
|
+
data.handles.textBox = {
|
|
231
|
+
hasMoved: false,
|
|
232
|
+
worldPosition: [0, 0, 0],
|
|
233
|
+
worldBoundingBox: {
|
|
234
|
+
topLeft: [0, 0, 0],
|
|
235
|
+
topRight: [0, 0, 0],
|
|
236
|
+
bottomLeft: [0, 0, 0],
|
|
237
|
+
bottomRight: [0, 0, 0],
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
const textLines = this.configuration.getTextLines(data);
|
|
243
|
+
if (!textLines || textLines.length === 0) {
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
if (!data.handles.textBox.hasMoved) {
|
|
247
|
+
const canvasTextBoxCoords = getTextBoxCoordsCanvas(canvasCoordinates);
|
|
248
|
+
data.handles.textBox.worldPosition =
|
|
249
|
+
viewport.canvasToWorld(canvasTextBoxCoords);
|
|
250
|
+
}
|
|
251
|
+
const textBoxPosition = viewport.worldToCanvas(data.handles.textBox.worldPosition);
|
|
252
|
+
const textBoxUID = '1';
|
|
253
|
+
const boundingBox = drawLinkedTextBoxSvg(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, canvasCoordinates, {}, options);
|
|
254
|
+
const { x: left, y: top, width, height } = boundingBox;
|
|
255
|
+
data.handles.textBox.worldBoundingBox = {
|
|
256
|
+
topLeft: viewport.canvasToWorld([left, top]),
|
|
257
|
+
topRight: viewport.canvasToWorld([left + width, top]),
|
|
258
|
+
bottomLeft: viewport.canvasToWorld([left, top + height]),
|
|
259
|
+
bottomRight: viewport.canvasToWorld([left + width, top + height]),
|
|
260
|
+
};
|
|
261
|
+
}
|
|
199
262
|
}
|
|
200
263
|
return renderStatus;
|
|
201
264
|
};
|
|
@@ -205,17 +268,26 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
205
268
|
const { data, metadata } = annotation;
|
|
206
269
|
const { viewPlaneNormal, spacingInNormal } = metadata;
|
|
207
270
|
const { imageData } = imageVolume;
|
|
208
|
-
const {
|
|
271
|
+
const { startCoordinate, endCoordinate } = data;
|
|
209
272
|
const { points } = data.handles;
|
|
210
273
|
const startIJK = transformWorldToIndex(imageData, points[0]);
|
|
211
|
-
|
|
212
|
-
throw new Error('Start slice does not match');
|
|
213
|
-
}
|
|
214
|
-
const endIJK = vec3.fromValues(startIJK[0], startIJK[1], endSlice);
|
|
274
|
+
const endIJK = transformWorldToIndex(imageData, points[0]);
|
|
215
275
|
const startWorld = vec3.create();
|
|
216
276
|
imageData.indexToWorldVec3(startIJK, startWorld);
|
|
217
277
|
const endWorld = vec3.create();
|
|
218
278
|
imageData.indexToWorldVec3(endIJK, endWorld);
|
|
279
|
+
if (this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) == 2) {
|
|
280
|
+
startWorld[2] = startCoordinate;
|
|
281
|
+
endWorld[2] = endCoordinate;
|
|
282
|
+
}
|
|
283
|
+
else if (this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) == 0) {
|
|
284
|
+
startWorld[0] = startCoordinate;
|
|
285
|
+
endWorld[0] = endCoordinate;
|
|
286
|
+
}
|
|
287
|
+
else if (this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) == 1) {
|
|
288
|
+
startWorld[1] = startCoordinate;
|
|
289
|
+
endWorld[1] = endCoordinate;
|
|
290
|
+
}
|
|
219
291
|
const distance = vec3.distance(startWorld, endWorld);
|
|
220
292
|
const newProjectionPoints = [];
|
|
221
293
|
for (let dist = 0; dist < distance; dist += spacingInNormal) {
|
|
@@ -226,34 +298,45 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
226
298
|
}));
|
|
227
299
|
}
|
|
228
300
|
data.cachedStats.projectionPoints = newProjectionPoints;
|
|
229
|
-
const projectionPointsImageIds = [];
|
|
230
|
-
for (const RectanglePoints of newProjectionPoints) {
|
|
231
|
-
const imageId = csUtils.getClosestImageId(imageVolume, RectanglePoints[0], viewPlaneNormal);
|
|
232
|
-
projectionPointsImageIds.push(imageId);
|
|
233
|
-
}
|
|
234
|
-
data.cachedStats.projectionPointsImageIds = projectionPointsImageIds;
|
|
235
301
|
}
|
|
236
|
-
_computePointsInsideVolume(annotation, imageVolume, enabledElement) {
|
|
237
|
-
const { data } = annotation;
|
|
302
|
+
_computePointsInsideVolume(annotation, targetId, imageVolume, enabledElement) {
|
|
303
|
+
const { data, metadata } = annotation;
|
|
304
|
+
const { viewPlaneNormal, viewUp } = metadata;
|
|
305
|
+
const { viewport, renderingEngine } = enabledElement;
|
|
238
306
|
const projectionPoints = data.cachedStats.projectionPoints;
|
|
239
307
|
const pointsInsideVolume = [[]];
|
|
308
|
+
const image = this.getTargetIdImage(targetId, renderingEngine);
|
|
309
|
+
const worldPos1 = data.handles.points[0];
|
|
310
|
+
const worldPos2 = data.handles.points[3];
|
|
311
|
+
const { worldWidth, worldHeight } = getWorldWidthAndHeightFromCorners(viewPlaneNormal, viewUp, worldPos1, worldPos2);
|
|
312
|
+
const measureInfo = getCalibratedLengthUnitsAndScale(image, data.habdles);
|
|
313
|
+
const area = Math.abs(worldWidth * worldHeight) /
|
|
314
|
+
(measureInfo.scale * measureInfo.scale);
|
|
315
|
+
const modalityUnitOptions = {
|
|
316
|
+
isPreScaled: isViewportPreScaled(viewport, targetId),
|
|
317
|
+
isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
|
|
318
|
+
};
|
|
319
|
+
const pixelValueUnits = getPixelValueUnits(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
|
|
240
320
|
for (let i = 0; i < projectionPoints.length; i++) {
|
|
241
321
|
if (!imageVolume) {
|
|
242
322
|
continue;
|
|
243
323
|
}
|
|
244
324
|
const projectionPoint = projectionPoints[i][0];
|
|
245
|
-
const
|
|
246
|
-
const worldPos2 = data.handles.points[3];
|
|
247
|
-
const { dimensions, imageData } = imageVolume;
|
|
325
|
+
const { dimensions, imageData, voxelManager } = imageVolume;
|
|
248
326
|
const worldPos1Index = transformWorldToIndex(imageData, worldPos1);
|
|
249
327
|
const worldProjectionPointIndex = transformWorldToIndex(imageData, projectionPoint);
|
|
328
|
+
const indexOfProjection = this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal);
|
|
250
329
|
worldPos1Index[0] = Math.floor(worldPos1Index[0]);
|
|
251
330
|
worldPos1Index[1] = Math.floor(worldPos1Index[1]);
|
|
252
|
-
worldPos1Index[2] = Math.floor(
|
|
331
|
+
worldPos1Index[2] = Math.floor(worldPos1Index[2]);
|
|
332
|
+
worldPos1Index[indexOfProjection] =
|
|
333
|
+
worldProjectionPointIndex[indexOfProjection];
|
|
253
334
|
const worldPos2Index = transformWorldToIndex(imageData, worldPos2);
|
|
254
335
|
worldPos2Index[0] = Math.floor(worldPos2Index[0]);
|
|
255
336
|
worldPos2Index[1] = Math.floor(worldPos2Index[1]);
|
|
256
|
-
worldPos2Index[2] = Math.floor(
|
|
337
|
+
worldPos2Index[2] = Math.floor(worldPos2Index[2]);
|
|
338
|
+
worldPos2Index[indexOfProjection] =
|
|
339
|
+
worldProjectionPointIndex[indexOfProjection];
|
|
257
340
|
if (this._isInsideVolume(worldPos1Index, worldPos2Index, dimensions)) {
|
|
258
341
|
this.isHandleOutsideImage = false;
|
|
259
342
|
const iMin = Math.min(worldPos1Index[0], worldPos2Index[0]);
|
|
@@ -267,11 +350,26 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
267
350
|
[jMin, jMax],
|
|
268
351
|
[kMin, kMax],
|
|
269
352
|
];
|
|
270
|
-
const pointsInShape =
|
|
353
|
+
const pointsInShape = voxelManager.forEach(this.configuration.statsCalculator.statsCallback, {
|
|
354
|
+
boundsIJK,
|
|
355
|
+
imageData,
|
|
356
|
+
returnPoints: this.configuration.storePointData,
|
|
357
|
+
});
|
|
271
358
|
pointsInsideVolume.push(pointsInShape);
|
|
272
359
|
}
|
|
273
360
|
}
|
|
361
|
+
const stats = this.configuration.statsCalculator.getStatistics();
|
|
274
362
|
data.cachedStats.pointsInVolume = pointsInsideVolume;
|
|
363
|
+
data.cachedStats.statistics = {
|
|
364
|
+
Modality: metadata.Modality,
|
|
365
|
+
area,
|
|
366
|
+
mean: stats.mean?.value,
|
|
367
|
+
stdDev: stats.stdDev?.value,
|
|
368
|
+
max: stats.max?.value,
|
|
369
|
+
statsArray: stats.array,
|
|
370
|
+
areaUnits: measureInfo.areaUnits,
|
|
371
|
+
pixelValueUnits,
|
|
372
|
+
};
|
|
275
373
|
}
|
|
276
374
|
_calculateCachedStatsTool(annotation, enabledElement) {
|
|
277
375
|
const data = annotation.data;
|
|
@@ -284,25 +382,44 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
284
382
|
triggerAnnotationModified(annotation, viewport.element);
|
|
285
383
|
return cachedStats;
|
|
286
384
|
}
|
|
287
|
-
|
|
385
|
+
_getStartCoordinate(worldPos, viewPlaneNormal) {
|
|
386
|
+
const startPos = worldPos;
|
|
387
|
+
const startCoord = this._getCoordinateForViewplaneNormal(startPos, viewPlaneNormal);
|
|
388
|
+
return startCoord;
|
|
389
|
+
}
|
|
390
|
+
_getEndCoordinate(worldPos, spacingInNormal, viewPlaneNormal) {
|
|
288
391
|
const numSlicesToPropagate = this.configuration.numSlicesToPropagate;
|
|
289
392
|
const endPos = vec3.create();
|
|
290
393
|
vec3.scaleAndAdd(endPos, worldPos, viewPlaneNormal, numSlicesToPropagate * spacingInNormal);
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
394
|
+
const endCoord = this._getCoordinateForViewplaneNormal(endPos, viewPlaneNormal);
|
|
395
|
+
return endCoord;
|
|
396
|
+
}
|
|
397
|
+
_getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) {
|
|
398
|
+
const viewplaneNormalAbs = [
|
|
399
|
+
Math.abs(viewPlaneNormal[0]),
|
|
400
|
+
Math.abs(viewPlaneNormal[1]),
|
|
401
|
+
Math.abs(viewPlaneNormal[2]),
|
|
402
|
+
];
|
|
403
|
+
const indexOfDirection = viewplaneNormalAbs.indexOf(Math.max(...viewplaneNormalAbs));
|
|
404
|
+
return indexOfDirection;
|
|
405
|
+
}
|
|
406
|
+
_getCoordinateForViewplaneNormal(pos, viewPlaneNormal) {
|
|
407
|
+
const indexOfDirection = this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal);
|
|
408
|
+
return pos[indexOfDirection];
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function defaultGetTextLines(data) {
|
|
412
|
+
const cachedVolumeStats = data.cachedStats.statistics;
|
|
413
|
+
const { area, mean, max, stdDev, areaUnits, pixelValueUnits } = cachedVolumeStats;
|
|
414
|
+
if (mean === undefined) {
|
|
415
|
+
return;
|
|
305
416
|
}
|
|
417
|
+
const textLines = [];
|
|
418
|
+
textLines.push(`Area: ${csUtils.roundNumber(area)} ${areaUnits}`);
|
|
419
|
+
textLines.push(`Mean: ${csUtils.roundNumber(mean)} ${pixelValueUnits}`);
|
|
420
|
+
textLines.push(`Max: ${csUtils.roundNumber(max)} ${pixelValueUnits}`);
|
|
421
|
+
textLines.push(`Std Dev: ${csUtils.roundNumber(stdDev)} ${pixelValueUnits}`);
|
|
422
|
+
return textLines;
|
|
306
423
|
}
|
|
307
424
|
RectangleROIStartEndThresholdTool.toolName = 'RectangleROIStartEndThreshold';
|
|
308
425
|
export default RectangleROIStartEndThresholdTool;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
import { PublicToolProps, ToolProps, EventTypes, SVGDrawingHelper } from '../../types';
|
|
2
|
+
import type { PublicToolProps, ToolProps, EventTypes, SVGDrawingHelper, Annotation } from '../../types';
|
|
3
3
|
import RectangleROITool from '../annotation/RectangleROITool';
|
|
4
4
|
declare class RectangleROIThresholdTool extends RectangleROITool {
|
|
5
5
|
static toolName: any;
|
|
6
|
-
_throttledCalculateCachedStats:
|
|
6
|
+
_throttledCalculateCachedStats: Function;
|
|
7
7
|
editData: {
|
|
8
|
-
annotation:
|
|
8
|
+
annotation: Annotation;
|
|
9
9
|
viewportIdsToRender: string[];
|
|
10
10
|
handleIndex?: number;
|
|
11
11
|
newAnnotation?: boolean;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
2
|
import { BaseTool } from '../base';
|
|
3
|
-
import { PublicToolProps, ToolProps, EventTypes, SVGDrawingHelper } from '../../types';
|
|
3
|
+
import type { PublicToolProps, ToolProps, EventTypes, SVGDrawingHelper, Annotation } from '../../types';
|
|
4
4
|
declare class RectangleScissorsTool extends BaseTool {
|
|
5
5
|
static toolName: any;
|
|
6
|
-
_throttledCalculateCachedStats:
|
|
6
|
+
_throttledCalculateCachedStats: Function;
|
|
7
7
|
editData: {
|
|
8
8
|
volumeId: string;
|
|
9
9
|
referencedVolumeId: string;
|
|
10
10
|
imageId: string;
|
|
11
|
-
annotation:
|
|
11
|
+
annotation: Annotation;
|
|
12
12
|
segmentationId: string;
|
|
13
13
|
segmentIndex: number;
|
|
14
14
|
segmentsLocked: number[];
|
|
15
|
+
segmentationRepresentationUID: string;
|
|
15
16
|
segmentColor: [number, number, number, number];
|
|
16
17
|
viewportIdsToRender: string[];
|
|
17
18
|
handleIndex?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cache, getEnabledElement } from '@cornerstonejs/core';
|
|
1
|
+
import { cache, getEnabledElement, StackViewport } from '@cornerstonejs/core';
|
|
2
2
|
import { BaseTool } from '../base';
|
|
3
3
|
import { fillInsideRectangle } from './strategies/fillRectangle';
|
|
4
4
|
import { eraseInsideRectangle } from './strategies/eraseRectangle';
|
|
@@ -8,7 +8,7 @@ import { drawRect as drawRectSvg } from '../../drawingSvg';
|
|
|
8
8
|
import { resetElementCursor, hideElementCursor, } from '../../cursors/elementCursor';
|
|
9
9
|
import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
|
|
10
10
|
import { config as segmentationConfig, segmentLocking, segmentIndex as segmentIndexController, activeSegmentation, } from '../../stateManagement/segmentation';
|
|
11
|
-
import { getSegmentation
|
|
11
|
+
import { getSegmentation } from '../../stateManagement/segmentation/segmentationState';
|
|
12
12
|
import { isVolumeSegmentation } from './strategies/utils/stackVolumeCheck';
|
|
13
13
|
class RectangleScissorsTool extends BaseTool {
|
|
14
14
|
constructor(toolProps = {}, defaultToolProps = {
|
|
@@ -35,13 +35,13 @@ class RectangleScissorsTool extends BaseTool {
|
|
|
35
35
|
this.isDrawing = true;
|
|
36
36
|
const camera = viewport.getCamera();
|
|
37
37
|
const { viewPlaneNormal, viewUp } = camera;
|
|
38
|
-
const activeSegmentationRepresentation = activeSegmentation.
|
|
38
|
+
const activeSegmentationRepresentation = activeSegmentation.getActiveSegmentationRepresentation(viewport.id);
|
|
39
39
|
if (!activeSegmentationRepresentation) {
|
|
40
40
|
throw new Error('No active segmentation detected, create one before using scissors tool');
|
|
41
41
|
}
|
|
42
|
-
const { segmentationRepresentationUID, segmentationId
|
|
42
|
+
const { segmentationRepresentationUID, segmentationId } = activeSegmentationRepresentation;
|
|
43
43
|
const segmentIndex = segmentIndexController.getActiveSegmentIndex(segmentationId);
|
|
44
|
-
const segmentsLocked = segmentLocking.
|
|
44
|
+
const segmentsLocked = segmentLocking.getLockedSegmentIndices(segmentationId);
|
|
45
45
|
const segmentColor = segmentationConfig.color.getSegmentIndexColor(segmentationRepresentationUID, segmentIndex);
|
|
46
46
|
const { representationData } = getSegmentation(segmentationId);
|
|
47
47
|
const labelmapData = representationData[SegmentationRepresentations.Labelmap];
|
|
@@ -81,6 +81,9 @@ class RectangleScissorsTool extends BaseTool {
|
|
|
81
81
|
newAnnotation: true,
|
|
82
82
|
hasMoved: false,
|
|
83
83
|
segmentationRepresentationUID,
|
|
84
|
+
volumeId: null,
|
|
85
|
+
referencedVolumeId: null,
|
|
86
|
+
imageId: null,
|
|
84
87
|
};
|
|
85
88
|
if (isVolumeSegmentation(labelmapData, viewport)) {
|
|
86
89
|
const { volumeId } = labelmapData;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
2
|
import { BaseTool } from '../base';
|
|
3
|
-
import { PublicToolProps, ToolProps, EventTypes } from '../../types';
|
|
4
|
-
import { SegmentationRepresentation } from '../../types/SegmentationStateTypes';
|
|
3
|
+
import type { PublicToolProps, ToolProps, EventTypes } from '../../types';
|
|
4
|
+
import type { SegmentationRepresentation } from '../../types/SegmentationStateTypes';
|
|
5
5
|
declare class SegmentSelectTool extends BaseTool {
|
|
6
6
|
static toolName: any;
|
|
7
7
|
private hoverTimer;
|
|
@@ -2,11 +2,11 @@ import { getEnabledElement } from '@cornerstonejs/core';
|
|
|
2
2
|
import { BaseTool } from '../base';
|
|
3
3
|
import { triggerSegmentationModified } from '../../stateManagement/segmentation/triggerSegmentationEvents';
|
|
4
4
|
import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
|
|
5
|
-
import {
|
|
5
|
+
import { getActiveSegmentationRepresentation } from '../../stateManagement/segmentation/activeSegmentation';
|
|
6
6
|
import RepresentationTypes from '../../enums/SegmentationRepresentations';
|
|
7
7
|
import { setActiveSegmentIndex } from '../../stateManagement/segmentation/segmentIndex';
|
|
8
8
|
import { getHoveredContourSegmentationAnnotation, getSegmentIndexAtLabelmapBorder, getSegmentIndexAtWorldPoint, } from '../../utilities/segmentation';
|
|
9
|
-
import { state } from '../../store';
|
|
9
|
+
import { state } from '../../store/state';
|
|
10
10
|
import SegmentationRepresentations from '../../enums/SegmentationRepresentations';
|
|
11
11
|
class SegmentSelectTool extends BaseTool {
|
|
12
12
|
static { this.SelectMode = {
|
|
@@ -54,7 +54,7 @@ class SegmentSelectTool extends BaseTool {
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
const { viewport } = enabledElement;
|
|
57
|
-
const activeSegmentationReps =
|
|
57
|
+
const activeSegmentationReps = getActiveSegmentationRepresentation(viewport.id);
|
|
58
58
|
if (!activeSegmentationReps) {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
2
|
import { BaseTool } from '../base';
|
|
3
|
-
import { PublicToolProps, ToolProps, EventTypes, SVGDrawingHelper } from '../../types';
|
|
3
|
+
import type { PublicToolProps, ToolProps, EventTypes, SVGDrawingHelper, Annotation } from '../../types';
|
|
4
4
|
declare class SphereScissorsTool extends BaseTool {
|
|
5
5
|
static toolName: any;
|
|
6
6
|
editData: {
|
|
7
|
-
annotation:
|
|
7
|
+
annotation: Annotation;
|
|
8
8
|
segmentIndex: number;
|
|
9
9
|
segmentsLocked: number[];
|
|
10
10
|
segmentationRepresentationUID: string;
|
|
11
|
+
segmentationId: string;
|
|
11
12
|
volumeId: string;
|
|
12
13
|
referencedVolumeId: string;
|
|
13
14
|
imageId: string;
|
|
@@ -7,7 +7,7 @@ import { drawCircle as drawCircleSvg } from '../../drawingSvg';
|
|
|
7
7
|
import { resetElementCursor, hideElementCursor, } from '../../cursors/elementCursor';
|
|
8
8
|
import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
|
|
9
9
|
import { config as segmentationConfig, segmentLocking, segmentIndex as segmentIndexController, activeSegmentation, } from '../../stateManagement/segmentation';
|
|
10
|
-
import { getSegmentation
|
|
10
|
+
import { getSegmentation } from '../../stateManagement/segmentation/segmentationState';
|
|
11
11
|
import { isVolumeSegmentation } from './strategies/utils/stackVolumeCheck';
|
|
12
12
|
class SphereScissorsTool extends BaseTool {
|
|
13
13
|
constructor(toolProps = {}, defaultToolProps = {
|
|
@@ -35,13 +35,13 @@ class SphereScissorsTool extends BaseTool {
|
|
|
35
35
|
this.isDrawing = true;
|
|
36
36
|
const camera = viewport.getCamera();
|
|
37
37
|
const { viewPlaneNormal, viewUp } = camera;
|
|
38
|
-
const activeSegmentationRepresentation = activeSegmentation.
|
|
38
|
+
const activeSegmentationRepresentation = activeSegmentation.getActiveSegmentationRepresentation(viewport.id);
|
|
39
39
|
if (!activeSegmentationRepresentation) {
|
|
40
40
|
throw new Error('No active segmentation detected, create one before using scissors tool');
|
|
41
41
|
}
|
|
42
42
|
const { segmentationRepresentationUID, segmentationId } = activeSegmentationRepresentation;
|
|
43
43
|
const segmentIndex = segmentIndexController.getActiveSegmentIndex(segmentationId);
|
|
44
|
-
const segmentsLocked = segmentLocking.
|
|
44
|
+
const segmentsLocked = segmentLocking.getLockedSegmentIndices(segmentationId);
|
|
45
45
|
const segmentColor = segmentationConfig.color.getSegmentIndexColor(segmentationRepresentationUID, segmentIndex);
|
|
46
46
|
this.isDrawing = true;
|
|
47
47
|
const annotation = {
|
|
@@ -56,7 +56,12 @@ class SphereScissorsTool extends BaseTool {
|
|
|
56
56
|
data: {
|
|
57
57
|
invalidated: true,
|
|
58
58
|
handles: {
|
|
59
|
-
points: [
|
|
59
|
+
points: [
|
|
60
|
+
[...worldPos],
|
|
61
|
+
[...worldPos],
|
|
62
|
+
[...worldPos],
|
|
63
|
+
[...worldPos],
|
|
64
|
+
],
|
|
60
65
|
activeHandleIndex: null,
|
|
61
66
|
},
|
|
62
67
|
cachedStats: {},
|
|
@@ -78,6 +83,9 @@ class SphereScissorsTool extends BaseTool {
|
|
|
78
83
|
movingTextBox: false,
|
|
79
84
|
newAnnotation: true,
|
|
80
85
|
hasMoved: false,
|
|
86
|
+
volumeId: null,
|
|
87
|
+
referencedVolumeId: null,
|
|
88
|
+
imageId: null,
|
|
81
89
|
};
|
|
82
90
|
const { representationData } = getSegmentation(segmentationId);
|
|
83
91
|
const labelmapData = representationData[SegmentationRepresentations.Labelmap];
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
import { utilities as csUtils } from '@cornerstonejs/core';
|
|
3
2
|
import { StrategyCallbacks } from '../../../enums';
|
|
4
3
|
import type { LabelmapToolOperationDataAny } from '../../../types/LabelmapToolOperationData';
|
|
5
|
-
import vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
|
|
4
|
+
import type vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
|
|
6
5
|
export type InitializedOperationData = LabelmapToolOperationDataAny & {
|
|
7
6
|
operationName?: string;
|
|
8
7
|
enabledElement: Types.IEnabledElement;
|
|
9
8
|
centerIJK?: Types.Point3;
|
|
10
9
|
centerWorld: Types.Point3;
|
|
11
10
|
viewport: Types.IViewport;
|
|
12
|
-
imageVoxelManager:
|
|
13
|
-
segmentationVoxelManager:
|
|
11
|
+
imageVoxelManager: Types.IVoxelManager<number> | Types.IVoxelManager<Types.RGB>;
|
|
12
|
+
segmentationVoxelManager: Types.IVoxelManager<number>;
|
|
14
13
|
segmentationImageData: vtkImageData;
|
|
15
|
-
previewVoxelManager:
|
|
14
|
+
previewVoxelManager: Types.IVoxelManager<number>;
|
|
16
15
|
previewSegmentIndex?: number;
|
|
17
16
|
brushStrategy: BrushStrategy;
|
|
18
17
|
configuration?: Record<string, any>;
|