@cornerstonejs/tools 3.0.2 → 3.0.4
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/LICENSE +2 -2
- package/README.md +4 -183
- package/dist/esm/config.d.ts +30 -0
- package/dist/esm/config.js +23 -0
- package/dist/esm/constants/COLOR_LUT.d.ts +3 -0
- package/dist/esm/constants/COLOR_LUT.js +258 -0
- package/dist/esm/constants/index.d.ts +2 -0
- package/dist/esm/constants/index.js +2 -0
- package/dist/esm/cursors/ImageMouseCursor.d.ts +9 -0
- package/dist/esm/cursors/ImageMouseCursor.js +22 -0
- package/dist/esm/cursors/MouseCursor.d.ts +12 -0
- package/dist/esm/cursors/MouseCursor.js +88 -0
- package/dist/esm/cursors/SVGCursorDescriptor.d.ts +9 -0
- package/dist/esm/cursors/SVGCursorDescriptor.js +442 -0
- package/dist/esm/cursors/SVGMouseCursor.d.ts +6 -0
- package/dist/esm/cursors/SVGMouseCursor.js +74 -0
- package/dist/esm/cursors/elementCursor.d.ts +6 -0
- package/dist/esm/cursors/elementCursor.js +36 -0
- package/dist/esm/cursors/index.d.ts +8 -0
- package/dist/esm/cursors/index.js +8 -0
- package/dist/esm/cursors/setCursorForElement.d.ts +2 -0
- package/dist/esm/cursors/setCursorForElement.js +15 -0
- package/dist/esm/drawingSvg/_getHash.d.ts +2 -0
- package/dist/esm/drawingSvg/_getHash.js +4 -0
- package/dist/esm/drawingSvg/clearByToolType.d.ts +2 -0
- package/dist/esm/drawingSvg/clearByToolType.js +13 -0
- package/dist/esm/drawingSvg/draw.d.ts +3 -0
- package/dist/esm/drawingSvg/draw.js +7 -0
- package/dist/esm/drawingSvg/drawArrow.d.ts +3 -0
- package/dist/esm/drawingSvg/drawArrow.js +79 -0
- package/dist/esm/drawingSvg/drawCircle.d.ts +4 -0
- package/dist/esm/drawingSvg/drawCircle.js +42 -0
- package/dist/esm/drawingSvg/drawEllipse.d.ts +4 -0
- package/dist/esm/drawingSvg/drawEllipse.js +10 -0
- package/dist/esm/drawingSvg/drawEllipseByCoordinates.d.ts +4 -0
- package/dist/esm/drawingSvg/drawEllipseByCoordinates.js +46 -0
- package/dist/esm/drawingSvg/drawHandle.d.ts +4 -0
- package/dist/esm/drawingSvg/drawHandle.js +60 -0
- package/dist/esm/drawingSvg/drawHandles.d.ts +4 -0
- package/dist/esm/drawingSvg/drawHandles.js +7 -0
- package/dist/esm/drawingSvg/drawHeight.d.ts +3 -0
- package/dist/esm/drawingSvg/drawHeight.js +45 -0
- package/dist/esm/drawingSvg/drawLine.d.ts +3 -0
- package/dist/esm/drawingSvg/drawLine.js +39 -0
- package/dist/esm/drawingSvg/drawLink.d.ts +4 -0
- package/dist/esm/drawingSvg/drawLink.js +26 -0
- package/dist/esm/drawingSvg/drawLinkedTextBox.d.ts +4 -0
- package/dist/esm/drawingSvg/drawLinkedTextBox.js +15 -0
- package/dist/esm/drawingSvg/drawPath.d.ts +11 -0
- package/dist/esm/drawingSvg/drawPath.js +48 -0
- package/dist/esm/drawingSvg/drawPolyline.d.ts +13 -0
- package/dist/esm/drawingSvg/drawPolyline.js +40 -0
- package/dist/esm/drawingSvg/drawRect.d.ts +3 -0
- package/dist/esm/drawingSvg/drawRect.js +9 -0
- package/dist/esm/drawingSvg/drawRectByCoordinates.d.ts +3 -0
- package/dist/esm/drawingSvg/drawRectByCoordinates.js +52 -0
- package/dist/esm/drawingSvg/drawRedactionRect.d.ts +3 -0
- package/dist/esm/drawingSvg/drawRedactionRect.js +37 -0
- package/dist/esm/drawingSvg/drawTextBox.d.ts +4 -0
- package/dist/esm/drawingSvg/drawTextBox.js +123 -0
- package/dist/esm/drawingSvg/getSvgDrawingHelper.d.ts +3 -0
- package/dist/esm/drawingSvg/getSvgDrawingHelper.js +65 -0
- package/dist/esm/drawingSvg/index.d.ts +19 -0
- package/dist/esm/drawingSvg/index.js +19 -0
- package/dist/esm/drawingSvg/setAttributesIfNecessary.d.ts +2 -0
- package/dist/esm/drawingSvg/setAttributesIfNecessary.js +13 -0
- package/dist/esm/drawingSvg/setNewAttributesIfValid.d.ts +2 -0
- package/dist/esm/drawingSvg/setNewAttributesIfValid.js +9 -0
- package/dist/esm/enums/AnnotationStyleStates.d.ts +8 -0
- package/dist/esm/enums/AnnotationStyleStates.js +9 -0
- package/dist/esm/enums/ChangeTypes.d.ts +11 -0
- package/dist/esm/enums/ChangeTypes.js +12 -0
- package/dist/esm/enums/Events.d.ts +42 -0
- package/dist/esm/enums/Events.js +43 -0
- package/dist/esm/enums/SegmentationRepresentations.d.ts +6 -0
- package/dist/esm/enums/SegmentationRepresentations.js +7 -0
- package/dist/esm/enums/StrategyCallbacks.d.ts +19 -0
- package/dist/esm/enums/StrategyCallbacks.js +20 -0
- package/dist/esm/enums/ToolBindings.d.ts +26 -0
- package/dist/esm/enums/ToolBindings.js +28 -0
- package/dist/esm/enums/ToolModes.d.ts +7 -0
- package/dist/esm/enums/ToolModes.js +8 -0
- package/dist/esm/enums/Touch.d.ts +7 -0
- package/dist/esm/enums/Touch.js +8 -0
- package/dist/esm/enums/WorkerTypes.d.ts +10 -0
- package/dist/esm/enums/WorkerTypes.js +11 -0
- package/dist/esm/enums/index.d.ts +11 -0
- package/dist/esm/enums/index.js +10 -0
- package/dist/esm/eventDispatchers/annotationInterpolationEventDispatcher.d.ts +5 -0
- package/dist/esm/eventDispatchers/annotationInterpolationEventDispatcher.js +17 -0
- package/dist/esm/eventDispatchers/annotationModifiedEventDispatcher.d.ts +5 -0
- package/dist/esm/eventDispatchers/annotationModifiedEventDispatcher.js +18 -0
- package/dist/esm/eventDispatchers/cameraModifiedEventDispatcher.d.ts +5 -0
- package/dist/esm/eventDispatchers/cameraModifiedEventDispatcher.js +26 -0
- package/dist/esm/eventDispatchers/cameraResetEventDispatcher.d.ts +5 -0
- package/dist/esm/eventDispatchers/cameraResetEventDispatcher.js +26 -0
- package/dist/esm/eventDispatchers/imageRenderedEventDispatcher.d.ts +5 -0
- package/dist/esm/eventDispatchers/imageRenderedEventDispatcher.js +15 -0
- package/dist/esm/eventDispatchers/imageSpacingCalibratedEventDispatcher.d.ts +5 -0
- package/dist/esm/eventDispatchers/imageSpacingCalibratedEventDispatcher.js +26 -0
- package/dist/esm/eventDispatchers/index.d.ts +9 -0
- package/dist/esm/eventDispatchers/index.js +9 -0
- package/dist/esm/eventDispatchers/keyboardEventHandlers/index.d.ts +3 -0
- package/dist/esm/eventDispatchers/keyboardEventHandlers/index.js +3 -0
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyDown.d.ts +2 -0
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyDown.js +25 -0
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyUp.d.ts +2 -0
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyUp.js +16 -0
- package/dist/esm/eventDispatchers/keyboardToolEventDispatcher.d.ts +5 -0
- package/dist/esm/eventDispatchers/keyboardToolEventDispatcher.js +15 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/index.d.ts +9 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/index.js +9 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseClick.d.ts +2 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseClick.js +3 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDoubleClick.d.ts +2 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDoubleClick.js +3 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDown.d.ts +2 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDown.js +90 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownActivate.d.ts +2 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownActivate.js +19 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownAnnotationAction.d.ts +2 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownAnnotationAction.js +34 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDrag.d.ts +2 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDrag.js +13 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseMove.d.ts +2 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseMove.js +37 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseUp.d.ts +2 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseUp.js +3 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseWheel.d.ts +3 -0
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseWheel.js +16 -0
- package/dist/esm/eventDispatchers/mouseToolEventDispatcher.d.ts +5 -0
- package/dist/esm/eventDispatchers/mouseToolEventDispatcher.js +27 -0
- package/dist/esm/eventDispatchers/shared/customCallbackHandler.d.ts +1 -0
- package/dist/esm/eventDispatchers/shared/customCallbackHandler.js +30 -0
- package/dist/esm/eventDispatchers/shared/getActiveToolForKeyboardEvent.d.ts +2 -0
- package/dist/esm/eventDispatchers/shared/getActiveToolForKeyboardEvent.js +29 -0
- package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.d.ts +2 -0
- package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.js +28 -0
- package/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.d.ts +2 -0
- package/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.js +29 -0
- package/dist/esm/eventDispatchers/shared/getMouseModifier.d.ts +3 -0
- package/dist/esm/eventDispatchers/shared/getMouseModifier.js +32 -0
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForKeyboardEvents.d.ts +3 -0
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForKeyboardEvents.js +28 -0
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForMouseEvent.d.ts +4 -0
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForMouseEvent.js +32 -0
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForMouseEvent.d.ts +5 -0
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForMouseEvent.js +23 -0
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForTouchEvent.d.ts +5 -0
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForTouchEvent.js +23 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/index.d.ts +7 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/index.js +7 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchDrag.d.ts +2 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchDrag.js +13 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchEnd.d.ts +2 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchEnd.js +3 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchPress.d.ts +2 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchPress.js +3 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStart.d.ts +2 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStart.js +79 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStartActivate.d.ts +2 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStartActivate.js +19 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchTap.d.ts +2 -0
- package/dist/esm/eventDispatchers/touchEventHandlers/touchTap.js +3 -0
- package/dist/esm/eventDispatchers/touchToolEventDispatcher.d.ts +5 -0
- package/dist/esm/eventDispatchers/touchToolEventDispatcher.js +22 -0
- package/dist/esm/eventListeners/annotations/annotationCompletedListener.d.ts +2 -0
- package/dist/esm/eventListeners/annotations/annotationCompletedListener.js +8 -0
- package/dist/esm/eventListeners/annotations/annotationModifiedListener.d.ts +2 -0
- package/dist/esm/eventListeners/annotations/annotationModifiedListener.js +6 -0
- package/dist/esm/eventListeners/annotations/annotationRemovedListener.d.ts +2 -0
- package/dist/esm/eventListeners/annotations/annotationRemovedListener.js +8 -0
- package/dist/esm/eventListeners/annotations/annotationSelectionListener.d.ts +2 -0
- package/dist/esm/eventListeners/annotations/annotationSelectionListener.js +15 -0
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +5 -0
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +233 -0
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationRemoved.d.ts +2 -0
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationRemoved.js +5 -0
- package/dist/esm/eventListeners/annotations/contourSegmentation/index.d.ts +2 -0
- package/dist/esm/eventListeners/annotations/contourSegmentation/index.js +2 -0
- package/dist/esm/eventListeners/annotations/index.d.ts +5 -0
- package/dist/esm/eventListeners/annotations/index.js +5 -0
- package/dist/esm/eventListeners/index.d.ts +7 -0
- package/dist/esm/eventListeners/index.js +7 -0
- package/dist/esm/eventListeners/keyboard/index.d.ts +9 -0
- package/dist/esm/eventListeners/keyboard/index.js +13 -0
- package/dist/esm/eventListeners/keyboard/keyDownListener.d.ts +4 -0
- package/dist/esm/eventListeners/keyboard/keyDownListener.js +64 -0
- package/dist/esm/eventListeners/mouse/getMouseEventPoints.d.ts +2 -0
- package/dist/esm/eventListeners/mouse/getMouseEventPoints.js +31 -0
- package/dist/esm/eventListeners/mouse/index.d.ts +7 -0
- package/dist/esm/eventListeners/mouse/index.js +24 -0
- package/dist/esm/eventListeners/mouse/mouseDoubleClickListener.d.ts +2 -0
- package/dist/esm/eventListeners/mouse/mouseDoubleClickListener.js +32 -0
- package/dist/esm/eventListeners/mouse/mouseDownListener.d.ts +4 -0
- package/dist/esm/eventListeners/mouse/mouseDownListener.js +266 -0
- package/dist/esm/eventListeners/mouse/mouseMoveListener.d.ts +2 -0
- package/dist/esm/eventListeners/mouse/mouseMoveListener.js +28 -0
- package/dist/esm/eventListeners/segmentation/imageChangeEventListener.d.ts +5 -0
- package/dist/esm/eventListeners/segmentation/imageChangeEventListener.js +128 -0
- package/dist/esm/eventListeners/segmentation/index.d.ts +4 -0
- package/dist/esm/eventListeners/segmentation/index.js +4 -0
- package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.d.ts +3 -0
- package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js +83 -0
- package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.d.ts +3 -0
- package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.js +12 -0
- package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.d.ts +3 -0
- package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.js +6 -0
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedListener.d.ts +3 -0
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedListener.js +6 -0
- package/dist/esm/eventListeners/touch/getTouchEventPoints.d.ts +2 -0
- package/dist/esm/eventListeners/touch/getTouchEventPoints.js +38 -0
- package/dist/esm/eventListeners/touch/index.d.ts +7 -0
- package/dist/esm/eventListeners/touch/index.js +17 -0
- package/dist/esm/eventListeners/touch/preventGhostClick.d.ts +7 -0
- package/dist/esm/eventListeners/touch/preventGhostClick.js +47 -0
- package/dist/esm/eventListeners/touch/touchStartListener.d.ts +2 -0
- package/dist/esm/eventListeners/touch/touchStartListener.js +282 -0
- package/dist/esm/eventListeners/wheel/index.d.ts +7 -0
- package/dist/esm/eventListeners/wheel/index.js +12 -0
- package/dist/esm/eventListeners/wheel/normalizeWheel.d.ts +6 -0
- package/dist/esm/eventListeners/wheel/normalizeWheel.js +48 -0
- package/dist/esm/eventListeners/wheel/wheelListener.d.ts +2 -0
- package/dist/esm/eventListeners/wheel/wheelListener.js +34 -0
- package/dist/esm/index.d.ts +17 -0
- package/dist/esm/index.js +17 -0
- package/dist/esm/init.d.ts +4 -0
- package/dist/esm/init.js +70 -0
- package/dist/esm/stateManagement/annotation/AnnotationGroup.d.ts +18 -0
- package/dist/esm/stateManagement/annotation/AnnotationGroup.js +69 -0
- 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 +27 -0
- package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js +210 -0
- package/dist/esm/stateManagement/annotation/annotationLocking.d.ts +7 -0
- package/dist/esm/stateManagement/annotation/annotationLocking.js +73 -0
- package/dist/esm/stateManagement/annotation/annotationSelection.d.ts +7 -0
- package/dist/esm/stateManagement/annotation/annotationSelection.js +85 -0
- package/dist/esm/stateManagement/annotation/annotationState.d.ts +18 -0
- package/dist/esm/stateManagement/annotation/annotationState.js +118 -0
- package/dist/esm/stateManagement/annotation/annotationVisibility.d.ts +5 -0
- package/dist/esm/stateManagement/annotation/annotationVisibility.js +65 -0
- package/dist/esm/stateManagement/annotation/config/ToolStyle.d.ts +18 -0
- package/dist/esm/stateManagement/annotation/config/ToolStyle.js +135 -0
- package/dist/esm/stateManagement/annotation/config/getFont.d.ts +4 -0
- package/dist/esm/stateManagement/annotation/config/getFont.js +7 -0
- package/dist/esm/stateManagement/annotation/config/getState.d.ts +4 -0
- package/dist/esm/stateManagement/annotation/config/getState.js +21 -0
- package/dist/esm/stateManagement/annotation/config/helpers.d.ts +4 -0
- package/dist/esm/stateManagement/annotation/config/helpers.js +21 -0
- package/dist/esm/stateManagement/annotation/config/index.d.ts +4 -0
- package/dist/esm/stateManagement/annotation/config/index.js +4 -0
- package/dist/esm/stateManagement/annotation/helpers/state.d.ts +10 -0
- package/dist/esm/stateManagement/annotation/helpers/state.js +76 -0
- package/dist/esm/stateManagement/annotation/index.d.ts +34 -0
- package/dist/esm/stateManagement/annotation/index.js +15 -0
- package/dist/esm/stateManagement/annotation/resetAnnotationManager.d.ts +1 -0
- package/dist/esm/stateManagement/annotation/resetAnnotationManager.js +21 -0
- package/dist/esm/stateManagement/annotation/utilities/defineProperties.d.ts +4 -0
- package/dist/esm/stateManagement/annotation/utilities/defineProperties.js +22 -0
- package/dist/esm/stateManagement/index.d.ts +18 -0
- package/dist/esm/stateManagement/index.js +6 -0
- package/dist/esm/stateManagement/segmentation/SegmentationRenderingEngine.d.ts +20 -0
- package/dist/esm/stateManagement/segmentation/SegmentationRenderingEngine.js +153 -0
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.d.ts +91 -0
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js +470 -0
- package/dist/esm/stateManagement/segmentation/SegmentationStyle.d.ts +39 -0
- package/dist/esm/stateManagement/segmentation/SegmentationStyle.js +223 -0
- package/dist/esm/stateManagement/segmentation/activeSegmentation.d.ts +4 -0
- package/dist/esm/stateManagement/segmentation/activeSegmentation.js +9 -0
- package/dist/esm/stateManagement/segmentation/addColorLUT.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/addColorLUT.js +25 -0
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentationsToViewport.d.ts +15 -0
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentationsToViewport.js +49 -0
- package/dist/esm/stateManagement/segmentation/addSegmentations.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/addSegmentations.js +14 -0
- package/dist/esm/stateManagement/segmentation/config/index.d.ts +4 -0
- package/dist/esm/stateManagement/segmentation/config/index.js +4 -0
- package/dist/esm/stateManagement/segmentation/config/segmentationColor.d.ts +6 -0
- package/dist/esm/stateManagement/segmentation/config/segmentationColor.js +50 -0
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.d.ts +22 -0
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.js +49 -0
- package/dist/esm/stateManagement/segmentation/config/styleHelpers.d.ts +25 -0
- package/dist/esm/stateManagement/segmentation/config/styleHelpers.js +37 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationAdded.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationAdded.js +8 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationDataModified.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationDataModified.js +12 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationModified.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationModified.js +8 -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 +2 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationRepresentationModified.js +10 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationRepresentationRemoved.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/events/triggerSegmentationRepresentationRemoved.js +10 -0
- package/dist/esm/stateManagement/segmentation/getActiveSegmentIndex.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/getActiveSegmentIndex.js +9 -0
- package/dist/esm/stateManagement/segmentation/getActiveSegmentation.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getActiveSegmentation.js +5 -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/getGlobalStyle.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/getGlobalStyle.js +4 -0
- package/dist/esm/stateManagement/segmentation/getLabelmapImageIds.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/getLabelmapImageIds.js +7 -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/getSegmentation.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/getSegmentation.js +5 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentation.d.ts +14 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentation.js +17 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationVisibility.d.ts +5 -0
- package/dist/esm/stateManagement/segmentation/getSegmentationRepresentationVisibility.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/getStackSegmentationImageIdsForViewport.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/getStackSegmentationImageIdsForViewport.js +5 -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/getViewportSegmentations.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/getViewportSegmentations.js +15 -0
- package/dist/esm/stateManagement/segmentation/helpers/clearSegmentValue.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/helpers/clearSegmentValue.js +30 -0
- package/dist/esm/stateManagement/segmentation/helpers/computeStackLabelmapFromVolume.d.ts +13 -0
- package/dist/esm/stateManagement/segmentation/helpers/computeStackLabelmapFromVolume.js +22 -0
- package/dist/esm/stateManagement/segmentation/helpers/computeVolumeLabelmapFromStack.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/helpers/computeVolumeLabelmapFromStack.js +4 -0
- package/dist/esm/stateManagement/segmentation/helpers/convertStackToVolumeLabelmap.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/helpers/convertStackToVolumeLabelmap.js +7 -0
- package/dist/esm/stateManagement/segmentation/helpers/getSegmentationActor.d.ts +6 -0
- package/dist/esm/stateManagement/segmentation/helpers/getSegmentationActor.js +34 -0
- package/dist/esm/stateManagement/segmentation/helpers/index.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/helpers/index.js +3 -0
- package/dist/esm/stateManagement/segmentation/helpers/internalGetHiddenSegmentIndices.d.ts +5 -0
- package/dist/esm/stateManagement/segmentation/helpers/internalGetHiddenSegmentIndices.js +14 -0
- package/dist/esm/stateManagement/segmentation/helpers/normalizeSegmentationInput.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/helpers/normalizeSegmentationInput.js +71 -0
- 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 +3 -0
- package/dist/esm/stateManagement/segmentation/helpers/validateSegmentationInput.js +20 -0
- package/dist/esm/stateManagement/segmentation/index.d.ts +28 -0
- package/dist/esm/stateManagement/segmentation/index.js +28 -0
- package/dist/esm/stateManagement/segmentation/internalAddRepresentationData.d.ts +12 -0
- package/dist/esm/stateManagement/segmentation/internalAddRepresentationData.js +32 -0
- package/dist/esm/stateManagement/segmentation/internalAddSegmentationRepresentation.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/internalAddSegmentationRepresentation.js +38 -0
- package/dist/esm/stateManagement/segmentation/removeColorLUT.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/removeColorLUT.js +5 -0
- package/dist/esm/stateManagement/segmentation/removeSegment.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/removeSegment.js +50 -0
- package/dist/esm/stateManagement/segmentation/removeSegmentation.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/removeSegmentation.js +24 -0
- package/dist/esm/stateManagement/segmentation/removeSegmentationRepresentations.d.ts +20 -0
- package/dist/esm/stateManagement/segmentation/removeSegmentationRepresentations.js +73 -0
- package/dist/esm/stateManagement/segmentation/segmentIndex.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/segmentIndex.js +48 -0
- package/dist/esm/stateManagement/segmentation/segmentLocking.d.ts +4 -0
- package/dist/esm/stateManagement/segmentation/segmentLocking.js +29 -0
- package/dist/esm/stateManagement/segmentation/segmentationState.d.ts +17 -0
- package/dist/esm/stateManagement/segmentation/segmentationState.js +20 -0
- package/dist/esm/stateManagement/segmentation/setActiveSegmentation.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/setActiveSegmentation.js +5 -0
- package/dist/esm/stateManagement/segmentation/setGlobalStyle.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/setGlobalStyle.js +8 -0
- package/dist/esm/stateManagement/segmentation/setSegmentationRepresentationVisibility.d.ts +5 -0
- package/dist/esm/stateManagement/segmentation/setSegmentationRepresentationVisibility.js +5 -0
- package/dist/esm/stateManagement/segmentation/triggerSegmentationEvents.d.ts +6 -0
- package/dist/esm/stateManagement/segmentation/triggerSegmentationEvents.js +6 -0
- package/dist/esm/stateManagement/segmentation/updateLabelmapSegmentationImageReferences.d.ts +1 -0
- package/dist/esm/stateManagement/segmentation/updateLabelmapSegmentationImageReferences.js +5 -0
- package/dist/esm/stateManagement/segmentation/updateSegmentations.d.ts +5 -0
- package/dist/esm/stateManagement/segmentation/updateSegmentations.js +11 -0
- package/dist/esm/store/SynchronizerManager/Synchronizer.d.ts +48 -0
- package/dist/esm/store/SynchronizerManager/Synchronizer.js +221 -0
- package/dist/esm/store/SynchronizerManager/createSynchronizer.d.ts +4 -0
- package/dist/esm/store/SynchronizerManager/createSynchronizer.js +12 -0
- package/dist/esm/store/SynchronizerManager/destroy.d.ts +2 -0
- package/dist/esm/store/SynchronizerManager/destroy.js +8 -0
- package/dist/esm/store/SynchronizerManager/destroySynchronizer.d.ts +2 -0
- package/dist/esm/store/SynchronizerManager/destroySynchronizer.js +10 -0
- package/dist/esm/store/SynchronizerManager/getAllSynchronizers.d.ts +3 -0
- package/dist/esm/store/SynchronizerManager/getAllSynchronizers.js +5 -0
- package/dist/esm/store/SynchronizerManager/getSynchronizer.d.ts +3 -0
- package/dist/esm/store/SynchronizerManager/getSynchronizer.js +5 -0
- package/dist/esm/store/SynchronizerManager/getSynchronizersForViewport.d.ts +3 -0
- package/dist/esm/store/SynchronizerManager/getSynchronizersForViewport.js +18 -0
- package/dist/esm/store/SynchronizerManager/index.d.ts +7 -0
- package/dist/esm/store/SynchronizerManager/index.js +7 -0
- package/dist/esm/store/ToolGroupManager/ToolGroup.d.ts +48 -0
- package/dist/esm/store/ToolGroupManager/ToolGroup.js +460 -0
- package/dist/esm/store/ToolGroupManager/createToolGroup.d.ts +3 -0
- package/dist/esm/store/ToolGroupManager/createToolGroup.js +13 -0
- package/dist/esm/store/ToolGroupManager/destroy.d.ts +2 -0
- package/dist/esm/store/ToolGroupManager/destroy.js +10 -0
- package/dist/esm/store/ToolGroupManager/destroyToolGroup.d.ts +2 -0
- package/dist/esm/store/ToolGroupManager/destroyToolGroup.js +8 -0
- package/dist/esm/store/ToolGroupManager/getAllToolGroups.d.ts +3 -0
- package/dist/esm/store/ToolGroupManager/getAllToolGroups.js +5 -0
- package/dist/esm/store/ToolGroupManager/getToolGroup.d.ts +3 -0
- package/dist/esm/store/ToolGroupManager/getToolGroup.js +5 -0
- package/dist/esm/store/ToolGroupManager/getToolGroupForViewport.d.ts +3 -0
- package/dist/esm/store/ToolGroupManager/getToolGroupForViewport.js +18 -0
- package/dist/esm/store/ToolGroupManager/getToolGroupsWithToolName.d.ts +3 -0
- package/dist/esm/store/ToolGroupManager/getToolGroupsWithToolName.js +21 -0
- package/dist/esm/store/ToolGroupManager/index.d.ts +8 -0
- package/dist/esm/store/ToolGroupManager/index.js +8 -0
- package/dist/esm/store/addEnabledElement.d.ts +2 -0
- package/dist/esm/store/addEnabledElement.js +68 -0
- package/dist/esm/store/addTool.d.ts +5 -0
- package/dist/esm/store/addTool.js +31 -0
- package/dist/esm/store/cancelActiveManipulations.d.ts +1 -0
- package/dist/esm/store/cancelActiveManipulations.js +16 -0
- package/dist/esm/store/filterMoveableAnnotationTools.d.ts +3 -0
- package/dist/esm/store/filterMoveableAnnotationTools.js +20 -0
- package/dist/esm/store/filterToolsWithAnnotationsForElement.d.ts +3 -0
- package/dist/esm/store/filterToolsWithAnnotationsForElement.js +22 -0
- package/dist/esm/store/filterToolsWithMoveableHandles.d.ts +3 -0
- package/dist/esm/store/filterToolsWithMoveableHandles.js +21 -0
- package/dist/esm/store/index.d.ts +10 -0
- package/dist/esm/store/index.js +10 -0
- package/dist/esm/store/removeEnabledElement.d.ts +3 -0
- package/dist/esm/store/removeEnabledElement.js +85 -0
- package/dist/esm/store/state.d.ts +18 -0
- package/dist/esm/store/state.js +34 -0
- package/dist/esm/store/svgNodeCache.d.ts +3 -0
- package/dist/esm/store/svgNodeCache.js +5 -0
- package/dist/esm/synchronizers/callbacks/areViewportsCoplanar.d.ts +2 -0
- package/dist/esm/synchronizers/callbacks/areViewportsCoplanar.js +7 -0
- package/dist/esm/synchronizers/callbacks/cameraSyncCallback.d.ts +3 -0
- package/dist/esm/synchronizers/callbacks/cameraSyncCallback.js +11 -0
- package/dist/esm/synchronizers/callbacks/imageSliceSyncCallback.d.ts +3 -0
- package/dist/esm/synchronizers/callbacks/imageSliceSyncCallback.js +67 -0
- package/dist/esm/synchronizers/callbacks/presentationViewSyncCallback.d.ts +2 -0
- package/dist/esm/synchronizers/callbacks/presentationViewSyncCallback.js +12 -0
- package/dist/esm/synchronizers/callbacks/slabThicknessSyncCallback.d.ts +2 -0
- package/dist/esm/synchronizers/callbacks/slabThicknessSyncCallback.js +15 -0
- package/dist/esm/synchronizers/callbacks/voiSyncCallback.d.ts +5 -0
- package/dist/esm/synchronizers/callbacks/voiSyncCallback.js +35 -0
- package/dist/esm/synchronizers/callbacks/zoomPanSyncCallback.d.ts +3 -0
- package/dist/esm/synchronizers/callbacks/zoomPanSyncCallback.js +19 -0
- package/dist/esm/synchronizers/index.d.ts +8 -0
- package/dist/esm/synchronizers/index.js +8 -0
- package/dist/esm/synchronizers/synchronizers/createCameraPositionSynchronizer.d.ts +2 -0
- package/dist/esm/synchronizers/synchronizers/createCameraPositionSynchronizer.js +8 -0
- package/dist/esm/synchronizers/synchronizers/createImageSliceSynchronizer.d.ts +2 -0
- package/dist/esm/synchronizers/synchronizers/createImageSliceSynchronizer.js +14 -0
- package/dist/esm/synchronizers/synchronizers/createPresentationViewSynchronizer.d.ts +3 -0
- package/dist/esm/synchronizers/synchronizers/createPresentationViewSynchronizer.js +8 -0
- package/dist/esm/synchronizers/synchronizers/createSlabThicknessSynchronizer.d.ts +2 -0
- package/dist/esm/synchronizers/synchronizers/createSlabThicknessSynchronizer.js +8 -0
- package/dist/esm/synchronizers/synchronizers/createVOISynchronizer.d.ts +7 -0
- package/dist/esm/synchronizers/synchronizers/createVOISynchronizer.js +15 -0
- package/dist/esm/synchronizers/synchronizers/createZoomPanSynchronizer.d.ts +2 -0
- package/dist/esm/synchronizers/synchronizers/createZoomPanSynchronizer.js +8 -0
- package/dist/esm/synchronizers/synchronizers/index.d.ts +7 -0
- package/dist/esm/synchronizers/synchronizers/index.js +7 -0
- package/dist/esm/tools/AdvancedMagnifyTool.d.ts +130 -0
- package/dist/esm/tools/AdvancedMagnifyTool.js +927 -0
- package/dist/esm/tools/AnnotationEraserTool.d.ts +10 -0
- package/dist/esm/tools/AnnotationEraserTool.js +56 -0
- package/dist/esm/tools/CrosshairsTool.d.ts +71 -0
- package/dist/esm/tools/CrosshairsTool.js +1449 -0
- package/dist/esm/tools/MIPJumpToClickTool.d.ts +8 -0
- package/dist/esm/tools/MIPJumpToClickTool.js +56 -0
- package/dist/esm/tools/MagnifyTool.d.ts +25 -0
- package/dist/esm/tools/MagnifyTool.js +180 -0
- package/dist/esm/tools/OrientationMarkerTool.d.ts +78 -0
- package/dist/esm/tools/OrientationMarkerTool.js +284 -0
- package/dist/esm/tools/OverlayGridTool.d.ts +29 -0
- package/dist/esm/tools/OverlayGridTool.js +164 -0
- package/dist/esm/tools/PanTool.d.ts +10 -0
- package/dist/esm/tools/PanTool.js +44 -0
- package/dist/esm/tools/PlanarRotateTool.d.ts +12 -0
- package/dist/esm/tools/PlanarRotateTool.js +64 -0
- package/dist/esm/tools/ReferenceCursors.d.ts +24 -0
- package/dist/esm/tools/ReferenceCursors.js +308 -0
- package/dist/esm/tools/ReferenceLinesTool.d.ts +27 -0
- package/dist/esm/tools/ReferenceLinesTool.js +232 -0
- package/dist/esm/tools/ScaleOverlayTool.d.ts +38 -0
- package/dist/esm/tools/ScaleOverlayTool.js +397 -0
- package/dist/esm/tools/SculptorTool/CircleSculptCursor.d.ts +20 -0
- package/dist/esm/tools/SculptorTool/CircleSculptCursor.js +107 -0
- package/dist/esm/tools/SculptorTool.d.ts +41 -0
- package/dist/esm/tools/SculptorTool.js +289 -0
- package/dist/esm/tools/SegmentationIntersectionTool.d.ts +18 -0
- package/dist/esm/tools/SegmentationIntersectionTool.js +177 -0
- package/dist/esm/tools/StackScrollTool.d.ts +15 -0
- package/dist/esm/tools/StackScrollTool.js +78 -0
- package/dist/esm/tools/TrackballRotateTool.d.ts +19 -0
- package/dist/esm/tools/TrackballRotateTool.js +179 -0
- package/dist/esm/tools/VolumeRotateTool.d.ts +10 -0
- package/dist/esm/tools/VolumeRotateTool.js +52 -0
- package/dist/esm/tools/WindowLevelRegionTool.d.ts +26 -0
- package/dist/esm/tools/WindowLevelRegionTool.js +220 -0
- package/dist/esm/tools/WindowLevelTool.d.ts +37 -0
- package/dist/esm/tools/WindowLevelTool.js +201 -0
- package/dist/esm/tools/ZoomTool.d.ts +19 -0
- package/dist/esm/tools/ZoomTool.js +180 -0
- package/dist/esm/tools/annotation/AngleTool.d.ts +37 -0
- package/dist/esm/tools/annotation/AngleTool.js +486 -0
- package/dist/esm/tools/annotation/ArrowAnnotateTool.d.ts +39 -0
- package/dist/esm/tools/annotation/ArrowAnnotateTool.js +467 -0
- package/dist/esm/tools/annotation/BidirectionalTool.d.ts +40 -0
- package/dist/esm/tools/annotation/BidirectionalTool.js +728 -0
- package/dist/esm/tools/annotation/CircleROITool.d.ts +39 -0
- package/dist/esm/tools/annotation/CircleROITool.js +638 -0
- package/dist/esm/tools/annotation/CobbAngleTool.d.ts +61 -0
- package/dist/esm/tools/annotation/CobbAngleTool.js +688 -0
- package/dist/esm/tools/annotation/DragProbeTool.d.ts +23 -0
- package/dist/esm/tools/annotation/DragProbeTool.js +130 -0
- package/dist/esm/tools/annotation/ETDRSGridTool.d.ts +41 -0
- package/dist/esm/tools/annotation/ETDRSGridTool.js +354 -0
- package/dist/esm/tools/annotation/EllipticalROITool.d.ts +45 -0
- package/dist/esm/tools/annotation/EllipticalROITool.js +710 -0
- 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 +34 -0
- package/dist/esm/tools/annotation/KeyImageTool.js +269 -0
- package/dist/esm/tools/annotation/LabelTool.d.ts +35 -0
- package/dist/esm/tools/annotation/LabelTool.js +323 -0
- package/dist/esm/tools/annotation/LengthTool.d.ts +38 -0
- package/dist/esm/tools/annotation/LengthTool.js +468 -0
- package/dist/esm/tools/annotation/LivewireContourSegmentationTool.d.ts +10 -0
- package/dist/esm/tools/annotation/LivewireContourSegmentationTool.js +89 -0
- package/dist/esm/tools/annotation/LivewireContourTool.d.ts +67 -0
- package/dist/esm/tools/annotation/LivewireContourTool.js +657 -0
- package/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.d.ts +9 -0
- package/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.js +29 -0
- package/dist/esm/tools/annotation/PlanarFreehandROITool.d.ts +59 -0
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js +530 -0
- package/dist/esm/tools/annotation/ProbeTool.d.ts +35 -0
- package/dist/esm/tools/annotation/ProbeTool.js +363 -0
- package/dist/esm/tools/annotation/RectangleROITool.d.ts +43 -0
- package/dist/esm/tools/annotation/RectangleROITool.js +566 -0
- package/dist/esm/tools/annotation/RegionSegmentPlusTool.d.ts +16 -0
- package/dist/esm/tools/annotation/RegionSegmentPlusTool.js +55 -0
- package/dist/esm/tools/annotation/RegionSegmentTool.d.ts +21 -0
- package/dist/esm/tools/annotation/RegionSegmentTool.js +102 -0
- package/dist/esm/tools/annotation/SplineContourSegmentationTool.d.ts +8 -0
- package/dist/esm/tools/annotation/SplineContourSegmentationTool.js +17 -0
- package/dist/esm/tools/annotation/SplineROITool.d.ts +73 -0
- package/dist/esm/tools/annotation/SplineROITool.js +788 -0
- package/dist/esm/tools/annotation/UltrasoundDirectionalTool.d.ts +34 -0
- package/dist/esm/tools/annotation/UltrasoundDirectionalTool.js +461 -0
- package/dist/esm/tools/annotation/VideoRedactionTool.d.ts +46 -0
- package/dist/esm/tools/annotation/VideoRedactionTool.js +442 -0
- package/dist/esm/tools/annotation/WholeBodySegmentTool.d.ts +29 -0
- package/dist/esm/tools/annotation/WholeBodySegmentTool.js +223 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +260 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +289 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/editLoopCommon.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/editLoopCommon.js +146 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/findOpenUShapedContourVectorToPeak.d.ts +4 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/findOpenUShapedContourVectorToPeak.js +39 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +329 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js +48 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js +216 -0
- package/dist/esm/tools/annotation/splines/BSpline.d.ts +5 -0
- package/dist/esm/tools/annotation/splines/BSpline.js +9 -0
- package/dist/esm/tools/annotation/splines/CardinalSpline.d.ts +12 -0
- package/dist/esm/tools/annotation/splines/CardinalSpline.js +32 -0
- package/dist/esm/tools/annotation/splines/CatmullRomSpline.d.ts +5 -0
- package/dist/esm/tools/annotation/splines/CatmullRomSpline.js +7 -0
- package/dist/esm/tools/annotation/splines/CubicSpline.d.ts +13 -0
- package/dist/esm/tools/annotation/splines/CubicSpline.js +164 -0
- package/dist/esm/tools/annotation/splines/LinearSpline.d.ts +5 -0
- package/dist/esm/tools/annotation/splines/LinearSpline.js +7 -0
- package/dist/esm/tools/annotation/splines/QuadraticBezier.d.ts +6 -0
- package/dist/esm/tools/annotation/splines/QuadraticBezier.js +15 -0
- package/dist/esm/tools/annotation/splines/QuadraticSpline.d.ts +9 -0
- package/dist/esm/tools/annotation/splines/QuadraticSpline.js +13 -0
- package/dist/esm/tools/annotation/splines/Spline.d.ts +51 -0
- package/dist/esm/tools/annotation/splines/Spline.js +395 -0
- package/dist/esm/tools/annotation/splines/index.d.ts +9 -0
- package/dist/esm/tools/annotation/splines/index.js +9 -0
- package/dist/esm/tools/base/AnnotationDisplayTool.d.ts +14 -0
- package/dist/esm/tools/base/AnnotationDisplayTool.js +98 -0
- package/dist/esm/tools/base/AnnotationTool.d.ts +71 -0
- package/dist/esm/tools/base/AnnotationTool.js +271 -0
- package/dist/esm/tools/base/BaseTool.d.ts +38 -0
- package/dist/esm/tools/base/BaseTool.js +128 -0
- package/dist/esm/tools/base/ContourBaseTool.d.ts +25 -0
- package/dist/esm/tools/base/ContourBaseTool.js +121 -0
- package/dist/esm/tools/base/ContourSegmentationBaseTool.d.ts +19 -0
- package/dist/esm/tools/base/ContourSegmentationBaseTool.js +133 -0
- package/dist/esm/tools/base/GrowCutBaseTool.d.ts +64 -0
- package/dist/esm/tools/base/GrowCutBaseTool.js +209 -0
- package/dist/esm/tools/base/index.d.ts +4 -0
- package/dist/esm/tools/base/index.js +4 -0
- package/dist/esm/tools/displayTools/Contour/contourConfig.d.ts +3 -0
- package/dist/esm/tools/displayTools/Contour/contourConfig.js +20 -0
- package/dist/esm/tools/displayTools/Contour/contourDisplay.d.ts +9 -0
- package/dist/esm/tools/displayTools/Contour/contourDisplay.js +51 -0
- package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.d.ts +5 -0
- package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.js +77 -0
- package/dist/esm/tools/displayTools/Contour/contourHandler/utils.d.ts +4 -0
- package/dist/esm/tools/displayTools/Contour/contourHandler/utils.js +41 -0
- package/dist/esm/tools/displayTools/Contour/index.d.ts +2 -0
- package/dist/esm/tools/displayTools/Contour/index.js +2 -0
- package/dist/esm/tools/displayTools/Contour/removeContourFromElement.d.ts +2 -0
- package/dist/esm/tools/displayTools/Contour/removeContourFromElement.js +12 -0
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.d.ts +7 -0
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.js +93 -0
- package/dist/esm/tools/displayTools/Labelmap/addVolumesAsIndependentComponents.d.ts +10 -0
- package/dist/esm/tools/displayTools/Labelmap/addVolumesAsIndependentComponents.js +123 -0
- package/dist/esm/tools/displayTools/Labelmap/index.d.ts +4 -0
- package/dist/esm/tools/displayTools/Labelmap/index.js +4 -0
- package/dist/esm/tools/displayTools/Labelmap/labelmapConfig.d.ts +3 -0
- package/dist/esm/tools/displayTools/Labelmap/labelmapConfig.js +17 -0
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.d.ts +11 -0
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js +267 -0
- package/dist/esm/tools/displayTools/Labelmap/removeLabelmapFromElement.d.ts +2 -0
- package/dist/esm/tools/displayTools/Labelmap/removeLabelmapFromElement.js +8 -0
- package/dist/esm/tools/displayTools/Surface/addOrUpdateSurfaceToElement.d.ts +3 -0
- package/dist/esm/tools/displayTools/Surface/addOrUpdateSurfaceToElement.js +67 -0
- package/dist/esm/tools/displayTools/Surface/index.d.ts +2 -0
- package/dist/esm/tools/displayTools/Surface/index.js +2 -0
- package/dist/esm/tools/displayTools/Surface/removeSurfaceFromElement.d.ts +2 -0
- package/dist/esm/tools/displayTools/Surface/removeSurfaceFromElement.js +10 -0
- package/dist/esm/tools/displayTools/Surface/surfaceConfig.d.ts +3 -0
- package/dist/esm/tools/displayTools/Surface/surfaceConfig.js +8 -0
- package/dist/esm/tools/displayTools/Surface/surfaceDisplay.d.ts +10 -0
- package/dist/esm/tools/displayTools/Surface/surfaceDisplay.js +76 -0
- package/dist/esm/tools/distancePointToContour.d.ts +3 -0
- package/dist/esm/tools/distancePointToContour.js +18 -0
- package/dist/esm/tools/index.d.ts +57 -0
- package/dist/esm/tools/index.js +57 -0
- package/dist/esm/tools/segmentation/BrushTool.d.ts +27 -0
- package/dist/esm/tools/segmentation/BrushTool.js +355 -0
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.d.ts +68 -0
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.js +478 -0
- package/dist/esm/tools/segmentation/CircleScissorsTool.d.ts +34 -0
- package/dist/esm/tools/segmentation/CircleScissorsTool.js +233 -0
- package/dist/esm/tools/segmentation/LabelmapBaseTool.d.ts +99 -0
- package/dist/esm/tools/segmentation/LabelmapBaseTool.js +289 -0
- package/dist/esm/tools/segmentation/PaintFillTool.d.ts +13 -0
- package/dist/esm/tools/segmentation/PaintFillTool.js +231 -0
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.d.ts +69 -0
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js +437 -0
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.d.ts +45 -0
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.js +145 -0
- package/dist/esm/tools/segmentation/RectangleScissorsTool.d.ts +32 -0
- package/dist/esm/tools/segmentation/RectangleScissorsTool.js +227 -0
- package/dist/esm/tools/segmentation/SegmentSelectTool.d.ts +20 -0
- package/dist/esm/tools/segmentation/SegmentSelectTool.js +99 -0
- package/dist/esm/tools/segmentation/SphereScissorsTool.d.ts +33 -0
- package/dist/esm/tools/segmentation/SphereScissorsTool.js +227 -0
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.d.ts +125 -0
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.js +156 -0
- package/dist/esm/tools/segmentation/strategies/compositions/determineSegmentIndex.d.ts +6 -0
- package/dist/esm/tools/segmentation/strategies/compositions/determineSegmentIndex.js +59 -0
- package/dist/esm/tools/segmentation/strategies/compositions/dynamicThreshold.d.ts +7 -0
- package/dist/esm/tools/segmentation/strategies/compositions/dynamicThreshold.js +83 -0
- package/dist/esm/tools/segmentation/strategies/compositions/ensureImageVolume.d.ts +4 -0
- package/dist/esm/tools/segmentation/strategies/compositions/ensureImageVolume.js +35 -0
- package/dist/esm/tools/segmentation/strategies/compositions/ensureSegmentationVolume.d.ts +4 -0
- package/dist/esm/tools/segmentation/strategies/compositions/ensureSegmentationVolume.js +20 -0
- package/dist/esm/tools/segmentation/strategies/compositions/erase.d.ts +5 -0
- package/dist/esm/tools/segmentation/strategies/compositions/erase.js +6 -0
- package/dist/esm/tools/segmentation/strategies/compositions/index.d.ts +47 -0
- package/dist/esm/tools/segmentation/strategies/compositions/index.js +24 -0
- package/dist/esm/tools/segmentation/strategies/compositions/islandRemovalComposition.d.ts +5 -0
- package/dist/esm/tools/segmentation/strategies/compositions/islandRemovalComposition.js +28 -0
- package/dist/esm/tools/segmentation/strategies/compositions/labelmapStatistics.d.ts +7 -0
- package/dist/esm/tools/segmentation/strategies/compositions/labelmapStatistics.js +12 -0
- package/dist/esm/tools/segmentation/strategies/compositions/preview.d.ts +8 -0
- package/dist/esm/tools/segmentation/strategies/compositions/preview.js +92 -0
- package/dist/esm/tools/segmentation/strategies/compositions/regionFill.d.ts +5 -0
- package/dist/esm/tools/segmentation/strategies/compositions/regionFill.js +23 -0
- package/dist/esm/tools/segmentation/strategies/compositions/setValue.d.ts +8 -0
- package/dist/esm/tools/segmentation/strategies/compositions/setValue.js +29 -0
- package/dist/esm/tools/segmentation/strategies/compositions/threshold.d.ts +5 -0
- package/dist/esm/tools/segmentation/strategies/compositions/threshold.js +21 -0
- package/dist/esm/tools/segmentation/strategies/eraseCircle.d.ts +2 -0
- package/dist/esm/tools/segmentation/strategies/eraseCircle.js +6 -0
- package/dist/esm/tools/segmentation/strategies/eraseRectangle.d.ts +8 -0
- package/dist/esm/tools/segmentation/strategies/eraseRectangle.js +13 -0
- package/dist/esm/tools/segmentation/strategies/eraseSphere.d.ts +2 -0
- package/dist/esm/tools/segmentation/strategies/eraseSphere.js +6 -0
- package/dist/esm/tools/segmentation/strategies/fillCircle.d.ts +14 -0
- package/dist/esm/tools/segmentation/strategies/fillCircle.js +71 -0
- package/dist/esm/tools/segmentation/strategies/fillRectangle.d.ts +6 -0
- package/dist/esm/tools/segmentation/strategies/fillRectangle.js +71 -0
- package/dist/esm/tools/segmentation/strategies/fillSphere.d.ts +7 -0
- package/dist/esm/tools/segmentation/strategies/fillSphere.js +40 -0
- package/dist/esm/tools/segmentation/strategies/index.d.ts +3 -0
- package/dist/esm/tools/segmentation/strategies/index.js +3 -0
- package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.d.ts +15 -0
- package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.js +112 -0
- package/dist/esm/tools/segmentation/strategies/utils/isWithinThreshold.d.ts +5 -0
- package/dist/esm/tools/segmentation/strategies/utils/isWithinThreshold.js +8 -0
- package/dist/esm/types/AnnotationGroupSelector.d.ts +2 -0
- package/dist/esm/types/AnnotationGroupSelector.js +0 -0
- package/dist/esm/types/AnnotationRenderContext.d.ts +12 -0
- package/dist/esm/types/AnnotationRenderContext.js +0 -0
- package/dist/esm/types/AnnotationStyle.d.ts +30 -0
- package/dist/esm/types/AnnotationStyle.js +0 -0
- package/dist/esm/types/AnnotationTypes.d.ts +45 -0
- package/dist/esm/types/AnnotationTypes.js +0 -0
- package/dist/esm/types/BoundsIJK.d.ts +3 -0
- package/dist/esm/types/BoundsIJK.js +0 -0
- package/dist/esm/types/CINETypes.d.ts +30 -0
- package/dist/esm/types/CINETypes.js +0 -0
- package/dist/esm/types/CalculatorTypes.d.ts +42 -0
- package/dist/esm/types/CalculatorTypes.js +0 -0
- package/dist/esm/types/CardinalSplineProps.d.ts +5 -0
- package/dist/esm/types/CardinalSplineProps.js +0 -0
- package/dist/esm/types/ClosestControlPoint.d.ts +4 -0
- package/dist/esm/types/ClosestControlPoint.js +0 -0
- package/dist/esm/types/ClosestPoint.d.ts +5 -0
- package/dist/esm/types/ClosestPoint.js +0 -0
- package/dist/esm/types/ClosestSplinePoint.d.ts +4 -0
- package/dist/esm/types/ClosestSplinePoint.js +0 -0
- package/dist/esm/types/ContourAnnotation.d.ts +20 -0
- package/dist/esm/types/ContourAnnotation.js +6 -0
- package/dist/esm/types/ContourSegmentationAnnotation.d.ts +24 -0
- package/dist/esm/types/ContourSegmentationAnnotation.js +0 -0
- package/dist/esm/types/ContourTypes.d.ts +27 -0
- package/dist/esm/types/ContourTypes.js +0 -0
- package/dist/esm/types/ControlPointInfo.d.ts +5 -0
- package/dist/esm/types/ControlPointInfo.js +0 -0
- package/dist/esm/types/CursorTypes.d.ts +18 -0
- package/dist/esm/types/CursorTypes.js +0 -0
- package/dist/esm/types/EventTypes.d.ts +234 -0
- package/dist/esm/types/EventTypes.js +0 -0
- package/dist/esm/types/FloodFillTypes.d.ts +16 -0
- package/dist/esm/types/FloodFillTypes.js +0 -0
- package/dist/esm/types/IAnnotationManager.d.ts +14 -0
- package/dist/esm/types/IAnnotationManager.js +0 -0
- package/dist/esm/types/IBaseTool.d.ts +2 -0
- package/dist/esm/types/IBaseTool.js +0 -0
- package/dist/esm/types/IDistance.d.ts +7 -0
- package/dist/esm/types/IDistance.js +0 -0
- package/dist/esm/types/IPoints.d.ts +8 -0
- package/dist/esm/types/IPoints.js +0 -0
- package/dist/esm/types/ISculptToolShape.d.ts +12 -0
- package/dist/esm/types/ISculptToolShape.js +0 -0
- package/dist/esm/types/ISetToolModeOptions.d.ts +16 -0
- package/dist/esm/types/ISetToolModeOptions.js +0 -0
- package/dist/esm/types/ISpline.d.ts +30 -0
- package/dist/esm/types/ISpline.js +0 -0
- package/dist/esm/types/ISynchronizerEventHandler.d.ts +5 -0
- package/dist/esm/types/ISynchronizerEventHandler.js +0 -0
- package/dist/esm/types/IToolClassReference.d.ts +3 -0
- package/dist/esm/types/IToolClassReference.js +0 -0
- package/dist/esm/types/IToolGroup.d.ts +3 -0
- package/dist/esm/types/IToolGroup.js +0 -0
- package/dist/esm/types/ITouchPoints.d.ts +11 -0
- package/dist/esm/types/ITouchPoints.js +0 -0
- package/dist/esm/types/InteractionTypes.d.ts +2 -0
- package/dist/esm/types/InteractionTypes.js +0 -0
- package/dist/esm/types/InternalToolTypes.d.ts +15 -0
- package/dist/esm/types/InternalToolTypes.js +0 -0
- package/dist/esm/types/InterpolationTypes.d.ts +20 -0
- package/dist/esm/types/InterpolationTypes.js +0 -0
- package/dist/esm/types/LabelmapToolOperationData.d.ts +26 -0
- package/dist/esm/types/LabelmapToolOperationData.js +0 -0
- package/dist/esm/types/LabelmapTypes.d.ts +29 -0
- package/dist/esm/types/LabelmapTypes.js +0 -0
- package/dist/esm/types/PlanarBoundingBox.d.ts +7 -0
- package/dist/esm/types/PlanarBoundingBox.js +0 -0
- package/dist/esm/types/SVGDrawingHelper.d.ts +9 -0
- package/dist/esm/types/SVGDrawingHelper.js +0 -0
- package/dist/esm/types/SegmentationStateTypes.d.ts +96 -0
- package/dist/esm/types/SegmentationStateTypes.js +0 -0
- package/dist/esm/types/SplineCurveSegment.d.ts +14 -0
- package/dist/esm/types/SplineCurveSegment.js +0 -0
- package/dist/esm/types/SplineLineSegment.d.ts +10 -0
- package/dist/esm/types/SplineLineSegment.js +0 -0
- package/dist/esm/types/SplineProps.d.ts +5 -0
- package/dist/esm/types/SplineProps.js +0 -0
- package/dist/esm/types/SurfaceTypes.d.ts +5 -0
- package/dist/esm/types/SurfaceTypes.js +0 -0
- package/dist/esm/types/ToolAction.d.ts +8 -0
- package/dist/esm/types/ToolAction.js +0 -0
- package/dist/esm/types/ToolHandle.d.ts +15 -0
- package/dist/esm/types/ToolHandle.js +0 -0
- package/dist/esm/types/ToolProps.d.ts +13 -0
- package/dist/esm/types/ToolProps.js +0 -0
- package/dist/esm/types/ToolSpecificAnnotationTypes.d.ts +477 -0
- package/dist/esm/types/ToolSpecificAnnotationTypes.js +0 -0
- package/dist/esm/types/index.d.ts +49 -0
- package/dist/esm/types/index.js +0 -0
- package/dist/esm/utilities/AnnotationMultiSlice.d.ts +11 -0
- package/dist/esm/utilities/AnnotationMultiSlice.js +68 -0
- package/dist/esm/utilities/BucketQueue.d.ts +20 -0
- package/dist/esm/utilities/BucketQueue.js +78 -0
- package/dist/esm/utilities/annotationHydration.d.ts +9 -0
- package/dist/esm/utilities/annotationHydration.js +82 -0
- package/dist/esm/utilities/boundingBox/extend2DBoundingBoxInViewAxis.d.ts +3 -0
- package/dist/esm/utilities/boundingBox/extend2DBoundingBoxInViewAxis.js +10 -0
- package/dist/esm/utilities/boundingBox/getBoundingBoxAroundShape.d.ts +5 -0
- package/dist/esm/utilities/boundingBox/getBoundingBoxAroundShape.js +55 -0
- package/dist/esm/utilities/boundingBox/index.d.ts +3 -0
- package/dist/esm/utilities/boundingBox/index.js +3 -0
- package/dist/esm/utilities/calibrateImageSpacing.d.ts +2 -0
- package/dist/esm/utilities/calibrateImageSpacing.js +18 -0
- package/dist/esm/utilities/cine/events.d.ts +5 -0
- package/dist/esm/utilities/cine/events.js +6 -0
- package/dist/esm/utilities/cine/index.d.ts +4 -0
- package/dist/esm/utilities/cine/index.js +4 -0
- package/dist/esm/utilities/cine/playClip.d.ts +8 -0
- package/dist/esm/utilities/cine/playClip.js +352 -0
- package/dist/esm/utilities/cine/state.d.ts +5 -0
- package/dist/esm/utilities/cine/state.js +16 -0
- package/dist/esm/utilities/contourSegmentation/addContourSegmentationAnnotation.d.ts +2 -0
- package/dist/esm/utilities/contourSegmentation/addContourSegmentationAnnotation.js +24 -0
- package/dist/esm/utilities/contourSegmentation/areSameSegment.d.ts +2 -0
- package/dist/esm/utilities/contourSegmentation/areSameSegment.js +6 -0
- package/dist/esm/utilities/contourSegmentation/index.d.ts +4 -0
- package/dist/esm/utilities/contourSegmentation/index.js +4 -0
- package/dist/esm/utilities/contourSegmentation/isContourSegmentationAnnotation.d.ts +3 -0
- package/dist/esm/utilities/contourSegmentation/isContourSegmentationAnnotation.js +3 -0
- package/dist/esm/utilities/contourSegmentation/removeContourSegmentationAnnotation.d.ts +2 -0
- package/dist/esm/utilities/contourSegmentation/removeContourSegmentationAnnotation.js +17 -0
- package/dist/esm/utilities/contours/AnnotationToPointData.d.ts +11 -0
- package/dist/esm/utilities/contours/AnnotationToPointData.js +38 -0
- package/dist/esm/utilities/contours/RectangleROIStartEndThreshold.d.ts +6 -0
- package/dist/esm/utilities/contours/RectangleROIStartEndThreshold.js +40 -0
- package/dist/esm/utilities/contours/areCoplanarContours.d.ts +2 -0
- package/dist/esm/utilities/contours/areCoplanarContours.js +15 -0
- package/dist/esm/utilities/contours/calculatePerimeter.d.ts +2 -0
- package/dist/esm/utilities/contours/calculatePerimeter.js +16 -0
- package/dist/esm/utilities/contours/contourFinder.d.ts +7 -0
- package/dist/esm/utilities/contours/contourFinder.js +62 -0
- package/dist/esm/utilities/contours/detectContourHoles.d.ts +5 -0
- package/dist/esm/utilities/contours/detectContourHoles.js +73 -0
- package/dist/esm/utilities/contours/findHandlePolylineIndex.d.ts +2 -0
- package/dist/esm/utilities/contours/findHandlePolylineIndex.js +31 -0
- package/dist/esm/utilities/contours/generateContourSetsFromLabelmap.d.ts +4 -0
- package/dist/esm/utilities/contours/generateContourSetsFromLabelmap.js +110 -0
- package/dist/esm/utilities/contours/getContourHolesDataCanvas.d.ts +3 -0
- package/dist/esm/utilities/contours/getContourHolesDataCanvas.js +14 -0
- package/dist/esm/utilities/contours/getContourHolesDataWorld.d.ts +3 -0
- package/dist/esm/utilities/contours/getContourHolesDataWorld.js +5 -0
- package/dist/esm/utilities/contours/getDeduplicatedVTKPolyDataPoints.d.ts +11 -0
- package/dist/esm/utilities/contours/getDeduplicatedVTKPolyDataPoints.js +45 -0
- package/dist/esm/utilities/contours/index.d.ts +13 -0
- package/dist/esm/utilities/contours/index.js +13 -0
- package/dist/esm/utilities/contours/interpolation/acceptAutogeneratedInterpolations.d.ts +3 -0
- package/dist/esm/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js +4 -0
- package/dist/esm/utilities/contours/interpolation/createPolylineToolData.d.ts +2 -0
- package/dist/esm/utilities/contours/interpolation/createPolylineToolData.js +38 -0
- package/dist/esm/utilities/contours/interpolation/findAnnotationForInterpolation.d.ts +7 -0
- package/dist/esm/utilities/contours/interpolation/findAnnotationForInterpolation.js +106 -0
- package/dist/esm/utilities/contours/interpolation/getInterpolationData.d.ts +7 -0
- package/dist/esm/utilities/contours/interpolation/getInterpolationData.js +47 -0
- package/dist/esm/utilities/contours/interpolation/getInterpolationDataCollection.d.ts +4 -0
- package/dist/esm/utilities/contours/interpolation/getInterpolationDataCollection.js +14 -0
- package/dist/esm/utilities/contours/interpolation/interpolate.d.ts +11 -0
- package/dist/esm/utilities/contours/interpolation/interpolate.js +339 -0
- package/dist/esm/utilities/contours/interpolation/selectHandles.d.ts +4 -0
- package/dist/esm/utilities/contours/interpolation/selectHandles.js +162 -0
- package/dist/esm/utilities/contours/interpolation/updateChildInterpolationUID.d.ts +2 -0
- package/dist/esm/utilities/contours/interpolation/updateChildInterpolationUID.js +12 -0
- package/dist/esm/utilities/contours/reverseIfAntiClockwise.d.ts +2 -0
- package/dist/esm/utilities/contours/reverseIfAntiClockwise.js +11 -0
- package/dist/esm/utilities/contours/updateContourPolyline.d.ts +17 -0
- package/dist/esm/utilities/contours/updateContourPolyline.js +52 -0
- package/dist/esm/utilities/debounce.d.ts +6 -0
- package/dist/esm/utilities/debounce.js +113 -0
- package/dist/esm/utilities/drawing/getTextBoxCoordsCanvas.d.ts +2 -0
- package/dist/esm/utilities/drawing/getTextBoxCoordsCanvas.js +24 -0
- package/dist/esm/utilities/drawing/index.d.ts +2 -0
- package/dist/esm/utilities/drawing/index.js +2 -0
- package/dist/esm/utilities/dynamicVolume/generateImageFromTimeData.d.ts +12 -0
- package/dist/esm/utilities/dynamicVolume/generateImageFromTimeData.js +98 -0
- package/dist/esm/utilities/dynamicVolume/getDataInTime.d.ts +8 -0
- package/dist/esm/utilities/dynamicVolume/getDataInTime.js +111 -0
- package/dist/esm/utilities/dynamicVolume/index.d.ts +4 -0
- package/dist/esm/utilities/dynamicVolume/index.js +4 -0
- package/dist/esm/utilities/geometricSurfaceUtils.d.ts +8 -0
- package/dist/esm/utilities/geometricSurfaceUtils.js +103 -0
- package/dist/esm/utilities/getAnnotationNearPoint.d.ts +5 -0
- package/dist/esm/utilities/getAnnotationNearPoint.js +46 -0
- package/dist/esm/utilities/getCalibratedUnits.d.ts +16 -0
- package/dist/esm/utilities/getCalibratedUnits.js +155 -0
- package/dist/esm/utilities/getPixelValueUnits.d.ts +8 -0
- package/dist/esm/utilities/getPixelValueUnits.js +31 -0
- package/dist/esm/utilities/getSphereBoundsInfo.d.ts +14 -0
- package/dist/esm/utilities/getSphereBoundsInfo.js +64 -0
- package/dist/esm/utilities/getToolsWithModesForElement.d.ts +4 -0
- package/dist/esm/utilities/getToolsWithModesForElement.js +24 -0
- package/dist/esm/utilities/getVOIMultipliers.d.ts +5 -0
- package/dist/esm/utilities/getVOIMultipliers.js +18 -0
- package/dist/esm/utilities/getViewportForAnnotation.d.ts +3 -0
- package/dist/esm/utilities/getViewportForAnnotation.js +5 -0
- package/dist/esm/utilities/getViewportsForAnnotation.d.ts +3 -0
- package/dist/esm/utilities/getViewportsForAnnotation.js +16 -0
- package/dist/esm/utilities/index.d.ts +40 -0
- package/dist/esm/utilities/index.js +40 -0
- package/dist/esm/utilities/isObject.d.ts +2 -0
- package/dist/esm/utilities/isObject.js +5 -0
- package/dist/esm/utilities/livewire/LiveWirePath.d.ts +19 -0
- package/dist/esm/utilities/livewire/LiveWirePath.js +71 -0
- package/dist/esm/utilities/livewire/LivewireScissors.d.ts +38 -0
- package/dist/esm/utilities/livewire/LivewireScissors.js +305 -0
- package/dist/esm/utilities/math/aabb/distanceToPoint.d.ts +2 -0
- package/dist/esm/utilities/math/aabb/distanceToPoint.js +4 -0
- package/dist/esm/utilities/math/aabb/distanceToPointSquared.d.ts +2 -0
- package/dist/esm/utilities/math/aabb/distanceToPointSquared.js +20 -0
- package/dist/esm/utilities/math/aabb/index.d.ts +3 -0
- package/dist/esm/utilities/math/aabb/index.js +3 -0
- package/dist/esm/utilities/math/aabb/intersectAABB.d.ts +2 -0
- package/dist/esm/utilities/math/aabb/intersectAABB.js +6 -0
- package/dist/esm/utilities/math/angle/angleBetweenLines.d.ts +6 -0
- package/dist/esm/utilities/math/angle/angleBetweenLines.js +30 -0
- package/dist/esm/utilities/math/angle/index.d.ts +2 -0
- package/dist/esm/utilities/math/angle/index.js +2 -0
- package/dist/esm/utilities/math/basic/BasicStatsCalculator.d.ts +26 -0
- package/dist/esm/utilities/math/basic/BasicStatsCalculator.js +119 -0
- package/dist/esm/utilities/math/basic/Calculator.d.ts +8 -0
- package/dist/esm/utilities/math/basic/Calculator.js +3 -0
- package/dist/esm/utilities/math/basic/index.d.ts +3 -0
- package/dist/esm/utilities/math/basic/index.js +3 -0
- package/dist/esm/utilities/math/circle/_types.d.ts +5 -0
- package/dist/esm/utilities/math/circle/_types.js +0 -0
- package/dist/esm/utilities/math/circle/getCanvasCircleCorners.d.ts +3 -0
- package/dist/esm/utilities/math/circle/getCanvasCircleCorners.js +8 -0
- package/dist/esm/utilities/math/circle/getCanvasCircleRadius.d.ts +2 -0
- package/dist/esm/utilities/math/circle/getCanvasCircleRadius.js +5 -0
- package/dist/esm/utilities/math/circle/index.d.ts +3 -0
- package/dist/esm/utilities/math/circle/index.js +3 -0
- package/dist/esm/utilities/math/ellipse/getCanvasEllipseCorners.d.ts +8 -0
- package/dist/esm/utilities/math/ellipse/getCanvasEllipseCorners.js +6 -0
- package/dist/esm/utilities/math/ellipse/index.d.ts +3 -0
- package/dist/esm/utilities/math/ellipse/index.js +3 -0
- package/dist/esm/utilities/math/ellipse/pointInEllipse.d.ts +11 -0
- package/dist/esm/utilities/math/ellipse/pointInEllipse.js +36 -0
- package/dist/esm/utilities/math/ellipse/pointInEllipsoidWithConstraint.d.ts +9 -0
- package/dist/esm/utilities/math/ellipse/pointInEllipsoidWithConstraint.js +2 -0
- package/dist/esm/utilities/math/index.d.ts +11 -0
- package/dist/esm/utilities/math/index.js +11 -0
- package/dist/esm/utilities/math/line/distanceToPoint.d.ts +2 -0
- package/dist/esm/utilities/math/line/distanceToPoint.js +7 -0
- package/dist/esm/utilities/math/line/distanceToPointSquared.d.ts +2 -0
- package/dist/esm/utilities/math/line/distanceToPointSquared.js +4 -0
- package/dist/esm/utilities/math/line/distanceToPointSquaredInfo.d.ts +5 -0
- package/dist/esm/utilities/math/line/distanceToPointSquaredInfo.js +29 -0
- package/dist/esm/utilities/math/line/index.d.ts +6 -0
- package/dist/esm/utilities/math/line/index.js +6 -0
- package/dist/esm/utilities/math/line/intersectLine.d.ts +2 -0
- package/dist/esm/utilities/math/line/intersectLine.js +41 -0
- package/dist/esm/utilities/math/line/isPointOnLineSegment.d.ts +2 -0
- package/dist/esm/utilities/math/line/isPointOnLineSegment.js +18 -0
- package/dist/esm/utilities/math/midPoint.d.ts +5 -0
- package/dist/esm/utilities/math/midPoint.js +15 -0
- package/dist/esm/utilities/math/point/distanceToPoint.d.ts +4 -0
- package/dist/esm/utilities/math/point/distanceToPoint.js +4 -0
- package/dist/esm/utilities/math/point/distanceToPointSquared.d.ts +4 -0
- package/dist/esm/utilities/math/point/distanceToPointSquared.js +11 -0
- package/dist/esm/utilities/math/point/index.d.ts +3 -0
- package/dist/esm/utilities/math/point/index.js +3 -0
- package/dist/esm/utilities/math/point/mirror.d.ts +2 -0
- package/dist/esm/utilities/math/point/mirror.js +7 -0
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.d.ts +4 -0
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.js +38 -0
- package/dist/esm/utilities/math/polyline/areLineSegmentsIntersecting.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/areLineSegmentsIntersecting.js +55 -0
- package/dist/esm/utilities/math/polyline/combinePolyline.d.ts +4 -0
- package/dist/esm/utilities/math/polyline/combinePolyline.js +186 -0
- package/dist/esm/utilities/math/polyline/containsPoint.d.ts +5 -0
- package/dist/esm/utilities/math/polyline/containsPoint.js +39 -0
- package/dist/esm/utilities/math/polyline/containsPoints.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/containsPoints.js +9 -0
- package/dist/esm/utilities/math/polyline/decimate.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/decimate.js +46 -0
- package/dist/esm/utilities/math/polyline/getAABB.d.ts +4 -0
- package/dist/esm/utilities/math/polyline/getAABB.js +40 -0
- package/dist/esm/utilities/math/polyline/getArea.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/getArea.js +10 -0
- package/dist/esm/utilities/math/polyline/getClosestLineSegmentIntersection.d.ts +5 -0
- package/dist/esm/utilities/math/polyline/getClosestLineSegmentIntersection.js +44 -0
- package/dist/esm/utilities/math/polyline/getFirstLineSegmentIntersectionIndexes.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/getFirstLineSegmentIntersectionIndexes.js +21 -0
- package/dist/esm/utilities/math/polyline/getLineSegmentIntersectionsCoordinates.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/getLineSegmentIntersectionsCoordinates.js +13 -0
- package/dist/esm/utilities/math/polyline/getLineSegmentIntersectionsIndexes.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/getLineSegmentIntersectionsIndexes.js +15 -0
- package/dist/esm/utilities/math/polyline/getLinesIntersection.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/getLinesIntersection.js +51 -0
- package/dist/esm/utilities/math/polyline/getNormal2.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/getNormal2.js +5 -0
- package/dist/esm/utilities/math/polyline/getNormal3.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/getNormal3.js +25 -0
- package/dist/esm/utilities/math/polyline/getSignedArea.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/getSignedArea.js +19 -0
- package/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.d.ts +7 -0
- package/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js +72 -0
- package/dist/esm/utilities/math/polyline/getWindingDirection.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/getWindingDirection.js +5 -0
- package/dist/esm/utilities/math/polyline/index.d.ts +23 -0
- package/dist/esm/utilities/math/polyline/index.js +23 -0
- package/dist/esm/utilities/math/polyline/intersectPolyline.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/intersectPolyline.js +13 -0
- package/dist/esm/utilities/math/polyline/isClosed.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/isClosed.js +12 -0
- package/dist/esm/utilities/math/polyline/isPointInsidePolyline3D.d.ts +4 -0
- package/dist/esm/utilities/math/polyline/isPointInsidePolyline3D.js +25 -0
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +25 -0
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.js +0 -0
- package/dist/esm/utilities/math/polyline/pointCanProjectOnLine.d.ts +3 -0
- package/dist/esm/utilities/math/polyline/pointCanProjectOnLine.js +32 -0
- package/dist/esm/utilities/math/polyline/pointsAreWithinCloseContourProximity.d.ts +3 -0
- package/dist/esm/utilities/math/polyline/pointsAreWithinCloseContourProximity.js +5 -0
- package/dist/esm/utilities/math/polyline/projectTo2D.d.ts +5 -0
- package/dist/esm/utilities/math/polyline/projectTo2D.js +25 -0
- package/dist/esm/utilities/math/rectangle/distanceToPoint.d.ts +2 -0
- package/dist/esm/utilities/math/rectangle/distanceToPoint.js +34 -0
- package/dist/esm/utilities/math/rectangle/index.d.ts +2 -0
- package/dist/esm/utilities/math/rectangle/index.js +2 -0
- package/dist/esm/utilities/math/sphere/index.d.ts +2 -0
- package/dist/esm/utilities/math/sphere/index.js +2 -0
- package/dist/esm/utilities/math/sphere/pointInSphere.d.ts +9 -0
- package/dist/esm/utilities/math/sphere/pointInSphere.js +8 -0
- package/dist/esm/utilities/math/vec2/findClosestPoint.d.ts +2 -0
- package/dist/esm/utilities/math/vec2/findClosestPoint.js +17 -0
- package/dist/esm/utilities/math/vec2/index.d.ts +3 -0
- package/dist/esm/utilities/math/vec2/index.js +3 -0
- package/dist/esm/utilities/math/vec2/liangBarksyClip.d.ts +1 -0
- package/dist/esm/utilities/math/vec2/liangBarksyClip.js +68 -0
- package/dist/esm/utilities/math/vec3/interpolateVec3.d.ts +2 -0
- package/dist/esm/utilities/math/vec3/interpolateVec3.js +8 -0
- package/dist/esm/utilities/normalizeViewportPlane.d.ts +19 -0
- package/dist/esm/utilities/normalizeViewportPlane.js +35 -0
- package/dist/esm/utilities/orientation/getOrientationStringLPS.d.ts +2 -0
- package/dist/esm/utilities/orientation/getOrientationStringLPS.js +41 -0
- package/dist/esm/utilities/orientation/index.d.ts +3 -0
- package/dist/esm/utilities/orientation/index.js +3 -0
- package/dist/esm/utilities/orientation/invertOrientationStringLPS.d.ts +1 -0
- package/dist/esm/utilities/orientation/invertOrientationStringLPS.js +10 -0
- package/dist/esm/utilities/planar/filterAnnotationsForDisplay.d.ts +3 -0
- package/dist/esm/utilities/planar/filterAnnotationsForDisplay.js +26 -0
- 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 +3 -0
- package/dist/esm/utilities/planar/filterAnnotationsWithinSlice.js +46 -0
- package/dist/esm/utilities/planar/getPointInLineOfSightWithCriteria.d.ts +6 -0
- package/dist/esm/utilities/planar/getPointInLineOfSightWithCriteria.js +49 -0
- package/dist/esm/utilities/planar/getWorldWidthAndHeightFromCorners.d.ts +5 -0
- package/dist/esm/utilities/planar/getWorldWidthAndHeightFromCorners.js +18 -0
- package/dist/esm/utilities/planar/getWorldWidthAndHeightFromTwoPoints.d.ts +5 -0
- package/dist/esm/utilities/planar/getWorldWidthAndHeightFromTwoPoints.js +18 -0
- package/dist/esm/utilities/planar/index.d.ts +19 -0
- package/dist/esm/utilities/planar/index.js +18 -0
- package/dist/esm/utilities/planar/isPlaneIntersectingAABB.d.ts +1 -0
- package/dist/esm/utilities/planar/isPlaneIntersectingAABB.js +27 -0
- package/dist/esm/utilities/planarFreehandROITool/index.d.ts +6 -0
- package/dist/esm/utilities/planarFreehandROITool/index.js +5 -0
- package/dist/esm/utilities/planarFreehandROITool/interpolation/algorithms/bspline.d.ts +2 -0
- package/dist/esm/utilities/planarFreehandROITool/interpolation/algorithms/bspline.js +22 -0
- package/dist/esm/utilities/planarFreehandROITool/interpolation/interpolateSegmentPoints.d.ts +2 -0
- package/dist/esm/utilities/planarFreehandROITool/interpolation/interpolateSegmentPoints.js +41 -0
- package/dist/esm/utilities/planarFreehandROITool/smoothAnnotation.d.ts +6 -0
- package/dist/esm/utilities/planarFreehandROITool/smoothAnnotation.js +56 -0
- package/dist/esm/utilities/planarFreehandROITool/smoothPoints.d.ts +11 -0
- package/dist/esm/utilities/planarFreehandROITool/smoothPoints.js +91 -0
- package/dist/esm/utilities/pointInSurroundingSphereCallback.d.ts +8 -0
- package/dist/esm/utilities/pointInSurroundingSphereCallback.js +71 -0
- package/dist/esm/utilities/pointToString.d.ts +1 -0
- package/dist/esm/utilities/pointToString.js +8 -0
- package/dist/esm/utilities/polyData/utils.d.ts +5 -0
- package/dist/esm/utilities/polyData/utils.js +53 -0
- package/dist/esm/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.d.ts +5 -0
- package/dist/esm/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.js +44 -0
- package/dist/esm/utilities/rectangleROITool/index.d.ts +3 -0
- package/dist/esm/utilities/rectangleROITool/index.js +3 -0
- package/dist/esm/utilities/rectangleROITool/isAxisAlignedRectangle.d.ts +2 -0
- package/dist/esm/utilities/rectangleROITool/isAxisAlignedRectangle.js +22 -0
- package/dist/esm/utilities/registerComputeWorker.d.ts +1 -0
- package/dist/esm/utilities/registerComputeWorker.js +23 -0
- package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts +11 -0
- package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.js +177 -0
- package/dist/esm/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.d.ts +2 -0
- package/dist/esm/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.js +66 -0
- package/dist/esm/utilities/segmentation/VolumetricCalculator.d.ts +15 -0
- package/dist/esm/utilities/segmentation/VolumetricCalculator.js +48 -0
- package/dist/esm/utilities/segmentation/brushSizeForToolGroup.d.ts +2 -0
- package/dist/esm/utilities/segmentation/brushSizeForToolGroup.js +40 -0
- package/dist/esm/utilities/segmentation/brushThresholdForToolGroup.d.ts +7 -0
- package/dist/esm/utilities/segmentation/brushThresholdForToolGroup.js +45 -0
- package/dist/esm/utilities/segmentation/computeAndAddRepresentation.d.ts +3 -0
- package/dist/esm/utilities/segmentation/computeAndAddRepresentation.js +45 -0
- package/dist/esm/utilities/segmentation/contourAndFindLargestBidirectional.d.ts +1 -0
- package/dist/esm/utilities/segmentation/contourAndFindLargestBidirectional.js +23 -0
- package/dist/esm/utilities/segmentation/createBidirectionalToolData.d.ts +14 -0
- package/dist/esm/utilities/segmentation/createBidirectionalToolData.js +35 -0
- package/dist/esm/utilities/segmentation/createLabelmapMemo.d.ts +44 -0
- package/dist/esm/utilities/segmentation/createLabelmapMemo.js +68 -0
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.d.ts +9 -0
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js +28 -0
- package/dist/esm/utilities/segmentation/createMergedLabelmapForIndex.d.ts +3 -0
- package/dist/esm/utilities/segmentation/createMergedLabelmapForIndex.js +34 -0
- package/dist/esm/utilities/segmentation/findLargestBidirectional.d.ts +1 -0
- package/dist/esm/utilities/segmentation/findLargestBidirectional.js +95 -0
- package/dist/esm/utilities/segmentation/floodFill.d.ts +4 -0
- package/dist/esm/utilities/segmentation/floodFill.js +120 -0
- package/dist/esm/utilities/segmentation/getBrushToolInstances.d.ts +1 -0
- package/dist/esm/utilities/segmentation/getBrushToolInstances.js +17 -0
- package/dist/esm/utilities/segmentation/getHoveredContourSegmentationAnnotation.d.ts +1 -0
- package/dist/esm/utilities/segmentation/getHoveredContourSegmentationAnnotation.js +13 -0
- package/dist/esm/utilities/segmentation/getOrCreateSegmentationVolume.d.ts +2 -0
- package/dist/esm/utilities/segmentation/getOrCreateSegmentationVolume.js +21 -0
- package/dist/esm/utilities/segmentation/getSVGStyleForSegment.d.ts +17 -0
- package/dist/esm/utilities/segmentation/getSVGStyleForSegment.js +68 -0
- package/dist/esm/utilities/segmentation/getSegmentIndexAtLabelmapBorder.d.ts +7 -0
- package/dist/esm/utilities/segmentation/getSegmentIndexAtLabelmapBorder.js +76 -0
- package/dist/esm/utilities/segmentation/getSegmentIndexAtWorldPoint.d.ts +11 -0
- package/dist/esm/utilities/segmentation/getSegmentIndexAtWorldPoint.js +74 -0
- package/dist/esm/utilities/segmentation/getStatistics.d.ts +5 -0
- package/dist/esm/utilities/segmentation/getStatistics.js +210 -0
- package/dist/esm/utilities/segmentation/getUniqueSegmentIndices.d.ts +2 -0
- package/dist/esm/utilities/segmentation/getUniqueSegmentIndices.js +80 -0
- package/dist/esm/utilities/segmentation/growCut/growCutShader.d.ts +2 -0
- package/dist/esm/utilities/segmentation/growCut/growCutShader.js +106 -0
- package/dist/esm/utilities/segmentation/growCut/index.d.ts +7 -0
- package/dist/esm/utilities/segmentation/growCut/index.js +4 -0
- package/dist/esm/utilities/segmentation/growCut/runGrowCut.d.ts +16 -0
- package/dist/esm/utilities/segmentation/growCut/runGrowCut.js +269 -0
- package/dist/esm/utilities/segmentation/growCut/runGrowCutForBoundingBox.d.ts +15 -0
- package/dist/esm/utilities/segmentation/growCut/runGrowCutForBoundingBox.js +110 -0
- package/dist/esm/utilities/segmentation/growCut/runGrowCutForSphere.d.ts +9 -0
- package/dist/esm/utilities/segmentation/growCut/runGrowCutForSphere.js +164 -0
- package/dist/esm/utilities/segmentation/growCut/runOneClickGrowCut.d.ts +9 -0
- package/dist/esm/utilities/segmentation/growCut/runOneClickGrowCut.js +176 -0
- package/dist/esm/utilities/segmentation/index.d.ts +28 -0
- package/dist/esm/utilities/segmentation/index.js +28 -0
- package/dist/esm/utilities/segmentation/invalidateBrushCursor.d.ts +1 -0
- package/dist/esm/utilities/segmentation/invalidateBrushCursor.js +20 -0
- package/dist/esm/utilities/segmentation/isLineInSegment.d.ts +9 -0
- package/dist/esm/utilities/segmentation/isLineInSegment.js +49 -0
- package/dist/esm/utilities/segmentation/islandRemoval.d.ts +28 -0
- package/dist/esm/utilities/segmentation/islandRemoval.js +181 -0
- package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.d.ts +20 -0
- package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.js +35 -0
- package/dist/esm/utilities/segmentation/segmentContourAction.d.ts +17 -0
- package/dist/esm/utilities/segmentation/segmentContourAction.js +95 -0
- package/dist/esm/utilities/segmentation/thresholdSegmentationByRange.d.ts +4 -0
- package/dist/esm/utilities/segmentation/thresholdSegmentationByRange.js +58 -0
- package/dist/esm/utilities/segmentation/thresholdVolumeByRange.d.ts +11 -0
- package/dist/esm/utilities/segmentation/thresholdVolumeByRange.js +79 -0
- package/dist/esm/utilities/segmentation/utilities.d.ts +25 -0
- package/dist/esm/utilities/segmentation/utilities.js +86 -0
- package/dist/esm/utilities/segmentation/validateLabelmap.d.ts +4 -0
- package/dist/esm/utilities/segmentation/validateLabelmap.js +32 -0
- package/dist/esm/utilities/stackPrefetch/index.d.ts +3 -0
- package/dist/esm/utilities/stackPrefetch/index.js +3 -0
- package/dist/esm/utilities/stackPrefetch/stackContextPrefetch.d.ts +16 -0
- package/dist/esm/utilities/stackPrefetch/stackContextPrefetch.js +221 -0
- package/dist/esm/utilities/stackPrefetch/stackPrefetch.d.ts +14 -0
- package/dist/esm/utilities/stackPrefetch/stackPrefetch.js +150 -0
- package/dist/esm/utilities/stackPrefetch/stackPrefetchUtils.d.ts +14 -0
- package/dist/esm/utilities/stackPrefetch/stackPrefetchUtils.js +76 -0
- package/dist/esm/utilities/stackPrefetch/state.d.ts +22 -0
- package/dist/esm/utilities/stackPrefetch/state.js +13 -0
- package/dist/esm/utilities/throttle.d.ts +5 -0
- package/dist/esm/utilities/throttle.js +19 -0
- package/dist/esm/utilities/touch/index.d.ts +10 -0
- package/dist/esm/utilities/touch/index.js +152 -0
- package/dist/esm/utilities/triggerAnnotationRender.d.ts +2 -0
- package/dist/esm/utilities/triggerAnnotationRender.js +5 -0
- package/dist/esm/utilities/triggerAnnotationRenderForToolGroupIds.d.ts +2 -0
- package/dist/esm/utilities/triggerAnnotationRenderForToolGroupIds.js +24 -0
- package/dist/esm/utilities/triggerAnnotationRenderForViewportIds.d.ts +2 -0
- package/dist/esm/utilities/triggerAnnotationRenderForViewportIds.js +22 -0
- package/dist/esm/utilities/viewport/index.d.ts +2 -0
- package/dist/esm/utilities/viewport/index.js +2 -0
- package/dist/esm/utilities/viewport/isViewportPreScaled.d.ts +3 -0
- package/dist/esm/utilities/viewport/isViewportPreScaled.js +16 -0
- package/dist/esm/utilities/viewportFilters/filterViewportsWithFrameOfReferenceUID.d.ts +2 -0
- package/dist/esm/utilities/viewportFilters/filterViewportsWithFrameOfReferenceUID.js +11 -0
- package/dist/esm/utilities/viewportFilters/filterViewportsWithParallelNormals.d.ts +2 -0
- package/dist/esm/utilities/viewportFilters/filterViewportsWithParallelNormals.js +10 -0
- package/dist/esm/utilities/viewportFilters/filterViewportsWithSameOrientation.d.ts +2 -0
- package/dist/esm/utilities/viewportFilters/filterViewportsWithSameOrientation.js +9 -0
- package/dist/esm/utilities/viewportFilters/filterViewportsWithToolEnabled.d.ts +2 -0
- package/dist/esm/utilities/viewportFilters/filterViewportsWithToolEnabled.js +28 -0
- package/dist/esm/utilities/viewportFilters/getViewportIdsWithToolToRender.d.ts +1 -0
- package/dist/esm/utilities/viewportFilters/getViewportIdsWithToolToRender.js +17 -0
- package/dist/esm/utilities/viewportFilters/index.d.ts +5 -0
- package/dist/esm/utilities/viewportFilters/index.js +5 -0
- package/dist/esm/utilities/voi/colorbar/Colorbar.d.ts +44 -0
- package/dist/esm/utilities/voi/colorbar/Colorbar.js +242 -0
- package/dist/esm/utilities/voi/colorbar/ColorbarCanvas.d.ts +29 -0
- package/dist/esm/utilities/voi/colorbar/ColorbarCanvas.js +182 -0
- package/dist/esm/utilities/voi/colorbar/ColorbarTicks.d.ts +46 -0
- package/dist/esm/utilities/voi/colorbar/ColorbarTicks.js +280 -0
- package/dist/esm/utilities/voi/colorbar/ViewportColorbar.d.ts +25 -0
- package/dist/esm/utilities/voi/colorbar/ViewportColorbar.js +146 -0
- package/dist/esm/utilities/voi/colorbar/common/areColorbarRangesEqual.d.ts +3 -0
- package/dist/esm/utilities/voi/colorbar/common/areColorbarRangesEqual.js +4 -0
- package/dist/esm/utilities/voi/colorbar/common/areColorbarSizesEqual.d.ts +3 -0
- package/dist/esm/utilities/voi/colorbar/common/areColorbarSizesEqual.js +4 -0
- package/dist/esm/utilities/voi/colorbar/common/index.d.ts +4 -0
- package/dist/esm/utilities/voi/colorbar/common/index.js +4 -0
- package/dist/esm/utilities/voi/colorbar/common/isColorbarSizeValid.d.ts +3 -0
- package/dist/esm/utilities/voi/colorbar/common/isColorbarSizeValid.js +4 -0
- package/dist/esm/utilities/voi/colorbar/common/isRangeTextPositionValid.d.ts +3 -0
- package/dist/esm/utilities/voi/colorbar/common/isRangeTextPositionValid.js +9 -0
- package/dist/esm/utilities/voi/colorbar/common/isRangeValid.d.ts +3 -0
- package/dist/esm/utilities/voi/colorbar/common/isRangeValid.js +4 -0
- package/dist/esm/utilities/voi/colorbar/enums/ColorbarRangeTextPosition.d.ts +6 -0
- package/dist/esm/utilities/voi/colorbar/enums/ColorbarRangeTextPosition.js +7 -0
- package/dist/esm/utilities/voi/colorbar/enums/index.d.ts +1 -0
- package/dist/esm/utilities/voi/colorbar/enums/index.js +1 -0
- package/dist/esm/utilities/voi/colorbar/index.d.ts +6 -0
- package/dist/esm/utilities/voi/colorbar/index.js +4 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarCanvasProps.d.ts +12 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarCanvasProps.js +0 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarCommonProps.d.ts +11 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarCommonProps.js +0 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarImageRange.d.ts +4 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarImageRange.js +0 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarProps.d.ts +7 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarProps.js +0 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarSize.d.ts +4 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarSize.js +0 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarTicksProps.d.ts +7 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarTicksProps.js +0 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarTicksStyle.d.ts +8 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarTicksStyle.js +0 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarVOIRange.d.ts +2 -0
- package/dist/esm/utilities/voi/colorbar/types/ColorbarVOIRange.js +0 -0
- package/dist/esm/utilities/voi/colorbar/types/ViewportColorbarProps.d.ts +5 -0
- package/dist/esm/utilities/voi/colorbar/types/ViewportColorbarProps.js +0 -0
- package/dist/esm/utilities/voi/colorbar/types/index.d.ts +8 -0
- package/dist/esm/utilities/voi/colorbar/types/index.js +0 -0
- package/dist/esm/utilities/voi/index.d.ts +3 -0
- package/dist/esm/utilities/voi/index.js +3 -0
- package/dist/esm/utilities/voi/windowlevel/calculateMinMaxMean.d.ts +6 -0
- package/dist/esm/utilities/voi/windowlevel/calculateMinMaxMean.js +25 -0
- package/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.d.ts +11 -0
- package/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.js +42 -0
- package/dist/esm/utilities/voi/windowlevel/getLuminanceFromRegion.d.ts +2 -0
- package/dist/esm/utilities/voi/windowlevel/getLuminanceFromRegion.js +27 -0
- package/dist/esm/utilities/voi/windowlevel/index.d.ts +4 -0
- package/dist/esm/utilities/voi/windowlevel/index.js +4 -0
- package/dist/esm/widgets/Widget.d.ts +17 -0
- package/dist/esm/widgets/Widget.js +66 -0
- package/dist/esm/widgets/types/WidgetProps.d.ts +4 -0
- package/dist/esm/widgets/types/WidgetProps.js +0 -0
- package/dist/esm/widgets/types/WidgetSize.d.ts +4 -0
- package/dist/esm/widgets/types/WidgetSize.js +0 -0
- package/dist/esm/widgets/types/index.d.ts +2 -0
- package/dist/esm/widgets/types/index.js +0 -0
- package/dist/esm/workers/computeWorker.d.ts +1 -0
- package/dist/esm/workers/computeWorker.js +78 -0
- package/package.json +113 -100
- package/changelog.md +0 -304
- package/dist/cornerstoneTools.js +0 -27391
- package/dist/cornerstoneTools.js.map +0 -1
- package/dist/cornerstoneTools.min.js +0 -3
- package/dist/cornerstoneTools.min.js.map +0 -1
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { vec3 } from 'gl-matrix';
|
|
2
|
+
import { utilities as csUtils, cache, volumeLoader } from '@cornerstonejs/core';
|
|
3
|
+
import { run } from './runGrowCut';
|
|
4
|
+
const { transformWorldToIndex, transformIndexToWorld } = csUtils;
|
|
5
|
+
const POSITIVE_SEED_VALUE = 254;
|
|
6
|
+
const NEGATIVE_SEED_VALUE = 255;
|
|
7
|
+
const POSITIVE_SEED_VARIANCE = 0.1;
|
|
8
|
+
const NEGATIVE_SEED_VARIANCE = 0.8;
|
|
9
|
+
const SUBVOLUME_PADDING_PERCENTAGE = 0.2;
|
|
10
|
+
const SUBVOLUME_MIN_PADDING = 5;
|
|
11
|
+
function _createSubVolume(referencedVolume, positiveRegionData, options) {
|
|
12
|
+
const { dimensions } = referencedVolume;
|
|
13
|
+
const positiveRegionSize = vec3.sub(vec3.create(), positiveRegionData.boundingBox.bottomRight, positiveRegionData.boundingBox.topLeft);
|
|
14
|
+
let subVolumePaddingPercentage = options?.subVolumePaddingPercentage ?? SUBVOLUME_PADDING_PERCENTAGE;
|
|
15
|
+
let subVolumeMinPadding = options?.subVolumeMinPadding ?? SUBVOLUME_MIN_PADDING;
|
|
16
|
+
if (typeof subVolumePaddingPercentage === 'number') {
|
|
17
|
+
subVolumePaddingPercentage = [
|
|
18
|
+
subVolumePaddingPercentage,
|
|
19
|
+
subVolumePaddingPercentage,
|
|
20
|
+
subVolumePaddingPercentage,
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
if (typeof subVolumeMinPadding === 'number') {
|
|
24
|
+
subVolumeMinPadding = [
|
|
25
|
+
subVolumeMinPadding,
|
|
26
|
+
subVolumeMinPadding,
|
|
27
|
+
subVolumeMinPadding,
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
const padding = vec3.mul(vec3.create(), positiveRegionSize, subVolumePaddingPercentage);
|
|
31
|
+
vec3.round(padding, padding);
|
|
32
|
+
vec3.max(padding, padding, subVolumeMinPadding);
|
|
33
|
+
const subVolumeSize = vec3.scaleAndAdd(vec3.create(), positiveRegionSize, padding, 2);
|
|
34
|
+
const ijkTopLeft = vec3.sub(vec3.create(), positiveRegionData.boundingBox.topLeft, padding);
|
|
35
|
+
const ijkBottomRight = vec3.add(vec3.create(), ijkTopLeft, subVolumeSize);
|
|
36
|
+
vec3.max(ijkTopLeft, ijkTopLeft, [0, 0, 0]);
|
|
37
|
+
vec3.min(ijkTopLeft, ijkTopLeft, dimensions);
|
|
38
|
+
vec3.max(ijkBottomRight, ijkBottomRight, [0, 0, 0]);
|
|
39
|
+
vec3.min(ijkBottomRight, ijkBottomRight, dimensions);
|
|
40
|
+
const subVolumeBoundsIJK = {
|
|
41
|
+
minX: ijkTopLeft[0],
|
|
42
|
+
maxX: ijkBottomRight[0],
|
|
43
|
+
minY: ijkTopLeft[1],
|
|
44
|
+
maxY: ijkBottomRight[1],
|
|
45
|
+
minZ: ijkTopLeft[2],
|
|
46
|
+
maxZ: ijkBottomRight[2],
|
|
47
|
+
};
|
|
48
|
+
return csUtils.createSubVolume(referencedVolume.volumeId, subVolumeBoundsIJK, {
|
|
49
|
+
targetBuffer: {
|
|
50
|
+
type: 'Float32Array',
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function _getPositiveRegionData(referencedVolume, worldPosition, options) {
|
|
55
|
+
const [width, height, numSlices] = referencedVolume.dimensions;
|
|
56
|
+
const subVolPixelData = referencedVolume.voxelManager.getCompleteScalarDataArray();
|
|
57
|
+
const numPixelsPerSlice = width * height;
|
|
58
|
+
const ijkStartPosition = transformWorldToIndex(referencedVolume.imageData, worldPosition);
|
|
59
|
+
const referencePixelValue = subVolPixelData[ijkStartPosition[2] * numPixelsPerSlice +
|
|
60
|
+
ijkStartPosition[1] * width +
|
|
61
|
+
ijkStartPosition[0]];
|
|
62
|
+
const positiveSeedVariance = options.positiveSeedVariance ?? POSITIVE_SEED_VARIANCE;
|
|
63
|
+
const positiveSeedVarianceValue = Math.abs(referencePixelValue * positiveSeedVariance);
|
|
64
|
+
const minPositivePixelValue = referencePixelValue - positiveSeedVarianceValue;
|
|
65
|
+
const maxPositivePixelValue = referencePixelValue + positiveSeedVarianceValue;
|
|
66
|
+
const neighborsCoordDelta = [
|
|
67
|
+
[-1, 0, 0],
|
|
68
|
+
[1, 0, 0],
|
|
69
|
+
[0, -1, 0],
|
|
70
|
+
[0, 1, 0],
|
|
71
|
+
[0, 0, -1],
|
|
72
|
+
[0, 0, 1],
|
|
73
|
+
];
|
|
74
|
+
let minX = Infinity;
|
|
75
|
+
let minY = Infinity;
|
|
76
|
+
let minZ = Infinity;
|
|
77
|
+
let maxX = -Infinity;
|
|
78
|
+
let maxY = -Infinity;
|
|
79
|
+
let maxZ = -Infinity;
|
|
80
|
+
const startVoxelIndex = ijkStartPosition[2] * numPixelsPerSlice +
|
|
81
|
+
ijkStartPosition[1] * width +
|
|
82
|
+
ijkStartPosition[0];
|
|
83
|
+
const voxelIndexesSet = new Set([startVoxelIndex]);
|
|
84
|
+
const worldVoxelSet = new Set([worldPosition]);
|
|
85
|
+
const queue = [ijkStartPosition];
|
|
86
|
+
while (queue.length) {
|
|
87
|
+
const ijkVoxel = queue.shift();
|
|
88
|
+
const [x, y, z] = ijkVoxel;
|
|
89
|
+
minX = ijkVoxel[0] < minX ? ijkVoxel[0] : minX;
|
|
90
|
+
minY = ijkVoxel[1] < minY ? ijkVoxel[1] : minY;
|
|
91
|
+
minZ = ijkVoxel[2] < minZ ? ijkVoxel[2] : minZ;
|
|
92
|
+
maxX = ijkVoxel[0] > maxX ? ijkVoxel[0] : maxX;
|
|
93
|
+
maxY = ijkVoxel[1] > maxY ? ijkVoxel[1] : maxY;
|
|
94
|
+
maxZ = ijkVoxel[2] > maxZ ? ijkVoxel[2] : maxZ;
|
|
95
|
+
for (let i = 0, len = neighborsCoordDelta.length; i < len; i++) {
|
|
96
|
+
const neighborCoordDelta = neighborsCoordDelta[i];
|
|
97
|
+
const nx = x + neighborCoordDelta[0];
|
|
98
|
+
const ny = y + neighborCoordDelta[1];
|
|
99
|
+
const nz = z + neighborCoordDelta[2];
|
|
100
|
+
if (nx < 0 ||
|
|
101
|
+
nx >= width ||
|
|
102
|
+
ny < 0 ||
|
|
103
|
+
ny >= height ||
|
|
104
|
+
nz < 0 ||
|
|
105
|
+
nz >= numSlices) {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const neighborVoxelIndex = nz * numPixelsPerSlice + ny * width + nx;
|
|
109
|
+
const neighborPixelValue = subVolPixelData[neighborVoxelIndex];
|
|
110
|
+
if (voxelIndexesSet.has(neighborVoxelIndex) ||
|
|
111
|
+
neighborPixelValue < minPositivePixelValue ||
|
|
112
|
+
neighborPixelValue > maxPositivePixelValue) {
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
const ijkVoxel = [nx, ny, nz];
|
|
116
|
+
const worldVoxel = transformIndexToWorld(referencedVolume.imageData, ijkVoxel);
|
|
117
|
+
voxelIndexesSet.add(neighborVoxelIndex);
|
|
118
|
+
worldVoxelSet.add(worldVoxel);
|
|
119
|
+
queue.push(ijkVoxel);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
worldVoxels: Array.from(worldVoxelSet),
|
|
124
|
+
boundingBox: {
|
|
125
|
+
topLeft: [minX, minY, minZ],
|
|
126
|
+
bottomRight: [maxX, maxY, maxZ],
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function _setPositiveSeedValues(labelmap, positiveRegionData, options) {
|
|
131
|
+
const { dimensions } = labelmap;
|
|
132
|
+
const [width, height] = dimensions;
|
|
133
|
+
const numPixelsPerSlice = width * height;
|
|
134
|
+
const positiveSeedValue = options.positiveSeedValue ?? POSITIVE_SEED_VALUE;
|
|
135
|
+
const { worldVoxels } = positiveRegionData;
|
|
136
|
+
for (let i = 0, len = worldVoxels.length; i < len; i++) {
|
|
137
|
+
const worldVoxel = worldVoxels[i];
|
|
138
|
+
const ijkVoxel = transformWorldToIndex(labelmap.imageData, worldVoxel);
|
|
139
|
+
const voxelIndex = ijkVoxel[2] * numPixelsPerSlice + ijkVoxel[1] * width + ijkVoxel[0];
|
|
140
|
+
labelmap.voxelManager.setAtIndex(voxelIndex, positiveSeedValue);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function _setNegativeSeedValues(subVolume, labelmap, worldPosition, options) {
|
|
144
|
+
const [width, height] = subVolume.dimensions;
|
|
145
|
+
const subVolPixelData = subVolume.voxelManager.getCompleteScalarDataArray();
|
|
146
|
+
const labelmapData = labelmap.voxelManager.getCompleteScalarDataArray();
|
|
147
|
+
const ijkPosition = transformWorldToIndex(subVolume.imageData, worldPosition);
|
|
148
|
+
const referencePixelValue = subVolPixelData[ijkPosition[2] * width * height + ijkPosition[1] * width + ijkPosition[0]];
|
|
149
|
+
const negativeSeedVariance = options.negativeSeedVariance ?? NEGATIVE_SEED_VARIANCE;
|
|
150
|
+
const negativeSeedValue = options.negativeSeedValue ?? NEGATIVE_SEED_VALUE;
|
|
151
|
+
const negativeSeedVarianceValue = Math.abs(referencePixelValue * negativeSeedVariance);
|
|
152
|
+
const minNegativePixelValue = referencePixelValue - negativeSeedVarianceValue;
|
|
153
|
+
const maxNegativePixelValue = referencePixelValue + negativeSeedVarianceValue;
|
|
154
|
+
for (let i = 0, len = subVolPixelData.length; i < len; i++) {
|
|
155
|
+
const pixelValue = subVolPixelData[i];
|
|
156
|
+
if (!labelmapData[i] &&
|
|
157
|
+
(pixelValue < minNegativePixelValue || pixelValue > maxNegativePixelValue)) {
|
|
158
|
+
labelmap.voxelManager.setAtIndex(i, negativeSeedValue);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async function _createAndCacheSegmentation(subVolume, positiveRegionData, worldPosition, options) {
|
|
163
|
+
const labelmap = volumeLoader.createAndCacheDerivedLabelmapVolume(subVolume.volumeId);
|
|
164
|
+
_setPositiveSeedValues(labelmap, positiveRegionData, options);
|
|
165
|
+
_setNegativeSeedValues(subVolume, labelmap, worldPosition, options);
|
|
166
|
+
return labelmap;
|
|
167
|
+
}
|
|
168
|
+
async function runOneClickGrowCut(referencedVolumeId, worldPosition, viewport, options) {
|
|
169
|
+
const referencedVolume = cache.getVolume(referencedVolumeId);
|
|
170
|
+
const positiveRegionData = _getPositiveRegionData(referencedVolume, worldPosition, options);
|
|
171
|
+
const subVolume = _createSubVolume(referencedVolume, positiveRegionData, options);
|
|
172
|
+
const labelmap = await _createAndCacheSegmentation(subVolume, positiveRegionData, worldPosition, options);
|
|
173
|
+
await run(subVolume.volumeId, labelmap.volumeId);
|
|
174
|
+
return labelmap;
|
|
175
|
+
}
|
|
176
|
+
export { runOneClickGrowCut as default, runOneClickGrowCut };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import thresholdVolumeByRange from './thresholdVolumeByRange';
|
|
2
|
+
import rectangleROIThresholdVolumeByRange from './rectangleROIThresholdVolumeByRange';
|
|
3
|
+
import createMergedLabelmapForIndex from './createMergedLabelmapForIndex';
|
|
4
|
+
import createLabelmapVolumeForViewport from './createLabelmapVolumeForViewport';
|
|
5
|
+
import { triggerSegmentationRender, triggerSegmentationRenderBySegmentationId } from '../../stateManagement/segmentation/SegmentationRenderingEngine';
|
|
6
|
+
import floodFill from './floodFill';
|
|
7
|
+
import { getBrushSizeForToolGroup, setBrushSizeForToolGroup } from './brushSizeForToolGroup';
|
|
8
|
+
import { getBrushThresholdForToolGroup, setBrushThresholdForToolGroup } from './brushThresholdForToolGroup';
|
|
9
|
+
import VolumetricCalculator from './VolumetricCalculator';
|
|
10
|
+
import thresholdSegmentationByRange from './thresholdSegmentationByRange';
|
|
11
|
+
import contourAndFindLargestBidirectional from './contourAndFindLargestBidirectional';
|
|
12
|
+
import createBidirectionalToolData from './createBidirectionalToolData';
|
|
13
|
+
import segmentContourAction from './segmentContourAction';
|
|
14
|
+
import { invalidateBrushCursor } from './invalidateBrushCursor';
|
|
15
|
+
import { getUniqueSegmentIndices } from './getUniqueSegmentIndices';
|
|
16
|
+
import { getSegmentIndexAtWorldPoint } from './getSegmentIndexAtWorldPoint';
|
|
17
|
+
import { getSegmentIndexAtLabelmapBorder } from './getSegmentIndexAtLabelmapBorder';
|
|
18
|
+
import { getHoveredContourSegmentationAnnotation } from './getHoveredContourSegmentationAnnotation';
|
|
19
|
+
import { getBrushToolInstances } from './getBrushToolInstances';
|
|
20
|
+
import * as growCut from './growCut';
|
|
21
|
+
import * as LabelmapMemo from './createLabelmapMemo';
|
|
22
|
+
import IslandRemoval from './islandRemoval';
|
|
23
|
+
import getOrCreateSegmentationVolume from './getOrCreateSegmentationVolume';
|
|
24
|
+
import getStatistics from './getStatistics';
|
|
25
|
+
import * as validateLabelmap from './validateLabelmap';
|
|
26
|
+
import { computeStackLabelmapFromVolume } from '../../stateManagement/segmentation/helpers/computeStackLabelmapFromVolume';
|
|
27
|
+
import { computeVolumeLabelmapFromStack } from '../../stateManagement/segmentation/helpers/computeVolumeLabelmapFromStack';
|
|
28
|
+
export { thresholdVolumeByRange, createMergedLabelmapForIndex, createLabelmapVolumeForViewport, rectangleROIThresholdVolumeByRange, triggerSegmentationRender, triggerSegmentationRenderBySegmentationId, floodFill, getBrushSizeForToolGroup, setBrushSizeForToolGroup, getBrushThresholdForToolGroup, setBrushThresholdForToolGroup, VolumetricCalculator, thresholdSegmentationByRange, contourAndFindLargestBidirectional, createBidirectionalToolData, segmentContourAction, invalidateBrushCursor, getUniqueSegmentIndices, getSegmentIndexAtWorldPoint, getSegmentIndexAtLabelmapBorder, getHoveredContourSegmentationAnnotation, getBrushToolInstances, growCut, LabelmapMemo, IslandRemoval, getOrCreateSegmentationVolume, getStatistics, validateLabelmap, computeStackLabelmapFromVolume, computeVolumeLabelmapFromStack, };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import thresholdVolumeByRange from './thresholdVolumeByRange';
|
|
2
|
+
import rectangleROIThresholdVolumeByRange from './rectangleROIThresholdVolumeByRange';
|
|
3
|
+
import createMergedLabelmapForIndex from './createMergedLabelmapForIndex';
|
|
4
|
+
import createLabelmapVolumeForViewport from './createLabelmapVolumeForViewport';
|
|
5
|
+
import { triggerSegmentationRender, triggerSegmentationRenderBySegmentationId, } from '../../stateManagement/segmentation/SegmentationRenderingEngine';
|
|
6
|
+
import floodFill from './floodFill';
|
|
7
|
+
import { getBrushSizeForToolGroup, setBrushSizeForToolGroup, } from './brushSizeForToolGroup';
|
|
8
|
+
import { getBrushThresholdForToolGroup, setBrushThresholdForToolGroup, } from './brushThresholdForToolGroup';
|
|
9
|
+
import VolumetricCalculator from './VolumetricCalculator';
|
|
10
|
+
import thresholdSegmentationByRange from './thresholdSegmentationByRange';
|
|
11
|
+
import contourAndFindLargestBidirectional from './contourAndFindLargestBidirectional';
|
|
12
|
+
import createBidirectionalToolData from './createBidirectionalToolData';
|
|
13
|
+
import segmentContourAction from './segmentContourAction';
|
|
14
|
+
import { invalidateBrushCursor } from './invalidateBrushCursor';
|
|
15
|
+
import { getUniqueSegmentIndices } from './getUniqueSegmentIndices';
|
|
16
|
+
import { getSegmentIndexAtWorldPoint } from './getSegmentIndexAtWorldPoint';
|
|
17
|
+
import { getSegmentIndexAtLabelmapBorder } from './getSegmentIndexAtLabelmapBorder';
|
|
18
|
+
import { getHoveredContourSegmentationAnnotation } from './getHoveredContourSegmentationAnnotation';
|
|
19
|
+
import { getBrushToolInstances } from './getBrushToolInstances';
|
|
20
|
+
import * as growCut from './growCut';
|
|
21
|
+
import * as LabelmapMemo from './createLabelmapMemo';
|
|
22
|
+
import IslandRemoval from './islandRemoval';
|
|
23
|
+
import getOrCreateSegmentationVolume from './getOrCreateSegmentationVolume';
|
|
24
|
+
import getStatistics from './getStatistics';
|
|
25
|
+
import * as validateLabelmap from './validateLabelmap';
|
|
26
|
+
import { computeStackLabelmapFromVolume } from '../../stateManagement/segmentation/helpers/computeStackLabelmapFromVolume';
|
|
27
|
+
import { computeVolumeLabelmapFromStack } from '../../stateManagement/segmentation/helpers/computeVolumeLabelmapFromStack';
|
|
28
|
+
export { thresholdVolumeByRange, createMergedLabelmapForIndex, createLabelmapVolumeForViewport, rectangleROIThresholdVolumeByRange, triggerSegmentationRender, triggerSegmentationRenderBySegmentationId, floodFill, getBrushSizeForToolGroup, setBrushSizeForToolGroup, getBrushThresholdForToolGroup, setBrushThresholdForToolGroup, VolumetricCalculator, thresholdSegmentationByRange, contourAndFindLargestBidirectional, createBidirectionalToolData, segmentContourAction, invalidateBrushCursor, getUniqueSegmentIndices, getSegmentIndexAtWorldPoint, getSegmentIndexAtLabelmapBorder, getHoveredContourSegmentationAnnotation, getBrushToolInstances, growCut, LabelmapMemo, IslandRemoval, getOrCreateSegmentationVolume, getStatistics, validateLabelmap, computeStackLabelmapFromVolume, computeVolumeLabelmapFromStack, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function invalidateBrushCursor(toolGroupId: string): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getToolGroup } from '../../store/ToolGroupManager';
|
|
2
|
+
import triggerAnnotationRenderForViewportIds from '../triggerAnnotationRenderForViewportIds';
|
|
3
|
+
import { getBrushToolInstances } from './getBrushToolInstances';
|
|
4
|
+
export function invalidateBrushCursor(toolGroupId) {
|
|
5
|
+
const toolGroup = getToolGroup(toolGroupId);
|
|
6
|
+
if (toolGroup === undefined) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const brushBasedToolInstances = getBrushToolInstances(toolGroupId);
|
|
10
|
+
brushBasedToolInstances.forEach((tool) => {
|
|
11
|
+
tool.invalidateBrushCursor();
|
|
12
|
+
});
|
|
13
|
+
const viewportsInfo = toolGroup.getViewportsInfo();
|
|
14
|
+
const viewportsInfoArray = Object.keys(viewportsInfo).map((key) => viewportsInfo[key]);
|
|
15
|
+
if (!viewportsInfoArray.length) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const viewportIds = toolGroup.getViewportIds();
|
|
19
|
+
triggerAnnotationRenderForViewportIds(viewportIds);
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { vec3 } from 'gl-matrix';
|
|
3
|
+
export default function isLineInSegment(point1: Types.Point3, point2: Types.Point3, isInSegment: any): boolean;
|
|
4
|
+
declare function createIsInSegment(segVolumeId: string, segmentIndex: number, containedSegmentIndices?: Set<number>): {
|
|
5
|
+
testCenter: (point1: any, point2: any) => boolean;
|
|
6
|
+
toIJK: (point: any) => vec3;
|
|
7
|
+
testIJK: (ijk: any) => boolean;
|
|
8
|
+
};
|
|
9
|
+
export { createIsInSegment, isLineInSegment };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cache } from '@cornerstonejs/core';
|
|
2
|
+
import { vec3 } from 'gl-matrix';
|
|
3
|
+
export default function isLineInSegment(point1, point2, isInSegment) {
|
|
4
|
+
const ijk1 = isInSegment.toIJK(point1);
|
|
5
|
+
const ijk2 = isInSegment.toIJK(point2);
|
|
6
|
+
const testPoint = vec3.create();
|
|
7
|
+
const { testIJK } = isInSegment;
|
|
8
|
+
const delta = vec3.sub(vec3.create(), ijk1, ijk2);
|
|
9
|
+
const testSize = Math.round(Math.max(...delta.map(Math.abs)));
|
|
10
|
+
if (testSize < 2) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
const unitDelta = vec3.scale(vec3.create(), delta, 1 / testSize);
|
|
14
|
+
for (let i = 1; i < testSize; i++) {
|
|
15
|
+
vec3.scaleAndAdd(testPoint, ijk2, unitDelta, i);
|
|
16
|
+
if (!testIJK(testPoint)) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
function createIsInSegment(segVolumeId, segmentIndex, containedSegmentIndices) {
|
|
23
|
+
const vol = cache.getVolume(segVolumeId);
|
|
24
|
+
if (!vol) {
|
|
25
|
+
console.warn(`No volume found for ${segVolumeId}`);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const voxelManager = vol.voxelManager;
|
|
29
|
+
const width = vol.dimensions[0];
|
|
30
|
+
const pixelsPerSlice = width * vol.dimensions[1];
|
|
31
|
+
return {
|
|
32
|
+
testCenter: (point1, point2) => {
|
|
33
|
+
const point = vec3.add(vec3.create(), point1, point2).map((it) => it / 2);
|
|
34
|
+
const ijk = vol.imageData.worldToIndex(point).map(Math.round);
|
|
35
|
+
const [i, j, k] = ijk;
|
|
36
|
+
const index = i + j * width + k * pixelsPerSlice;
|
|
37
|
+
const value = voxelManager.getAtIndex(index);
|
|
38
|
+
return value === segmentIndex || containedSegmentIndices?.has(value);
|
|
39
|
+
},
|
|
40
|
+
toIJK: (point) => vol.imageData.worldToIndex(point),
|
|
41
|
+
testIJK: (ijk) => {
|
|
42
|
+
const [i, j, k] = ijk;
|
|
43
|
+
const index = Math.round(i) + Math.round(j) * width + Math.round(k) * pixelsPerSlice;
|
|
44
|
+
const value = voxelManager.getAtIndex(index);
|
|
45
|
+
return value === segmentIndex || containedSegmentIndices?.has(value);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export { createIsInSegment, isLineInSegment };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
export declare enum SegmentationEnum {
|
|
3
|
+
SEGMENT = -1,
|
|
4
|
+
ISLAND = -2,
|
|
5
|
+
INTERIOR = -3,
|
|
6
|
+
EXTERIOR = -4,
|
|
7
|
+
INTERIOR_SMALL = -5,
|
|
8
|
+
INTERIOR_TEST = -6
|
|
9
|
+
}
|
|
10
|
+
export default class IslandRemoval {
|
|
11
|
+
segmentSet: Types.RLEVoxelMap<SegmentationEnum>;
|
|
12
|
+
segmentIndex: number;
|
|
13
|
+
fillSegments: (index: number) => boolean;
|
|
14
|
+
previewVoxelManager: Types.VoxelManager<number>;
|
|
15
|
+
previewSegmentIndex: number;
|
|
16
|
+
selectedPoints: Types.Point3[];
|
|
17
|
+
private fillInternalEdge;
|
|
18
|
+
private maxInternalRemove;
|
|
19
|
+
constructor(options?: {
|
|
20
|
+
maxInternalRemove?: number;
|
|
21
|
+
fillInternalEdge?: boolean;
|
|
22
|
+
});
|
|
23
|
+
initialize(viewport: any, segmentationVoxels: any, options: any): boolean;
|
|
24
|
+
floodFillSegmentIsland(): number;
|
|
25
|
+
removeExternalIslands(): void;
|
|
26
|
+
removeInternalIslands(): number[];
|
|
27
|
+
static covers(rle: any, row: any): boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { utilities } from '@cornerstonejs/core';
|
|
2
|
+
import normalizeViewportPlane from '../normalizeViewportPlane';
|
|
3
|
+
const { RLEVoxelMap, VoxelManager } = utilities;
|
|
4
|
+
const MAX_IMAGE_SIZE = 65535;
|
|
5
|
+
export var SegmentationEnum;
|
|
6
|
+
(function (SegmentationEnum) {
|
|
7
|
+
SegmentationEnum[SegmentationEnum["SEGMENT"] = -1] = "SEGMENT";
|
|
8
|
+
SegmentationEnum[SegmentationEnum["ISLAND"] = -2] = "ISLAND";
|
|
9
|
+
SegmentationEnum[SegmentationEnum["INTERIOR"] = -3] = "INTERIOR";
|
|
10
|
+
SegmentationEnum[SegmentationEnum["EXTERIOR"] = -4] = "EXTERIOR";
|
|
11
|
+
SegmentationEnum[SegmentationEnum["INTERIOR_SMALL"] = -5] = "INTERIOR_SMALL";
|
|
12
|
+
SegmentationEnum[SegmentationEnum["INTERIOR_TEST"] = -6] = "INTERIOR_TEST";
|
|
13
|
+
})(SegmentationEnum || (SegmentationEnum = {}));
|
|
14
|
+
export default class IslandRemoval {
|
|
15
|
+
constructor(options) {
|
|
16
|
+
this.fillInternalEdge = false;
|
|
17
|
+
this.maxInternalRemove = 128;
|
|
18
|
+
this.maxInternalRemove =
|
|
19
|
+
options?.maxInternalRemove ?? this.maxInternalRemove;
|
|
20
|
+
this.fillInternalEdge = options?.fillInternalEdge ?? this.fillInternalEdge;
|
|
21
|
+
}
|
|
22
|
+
initialize(viewport, segmentationVoxels, options) {
|
|
23
|
+
const hasSource = !!segmentationVoxels.sourceVoxelManager;
|
|
24
|
+
const segmentationVoxelManager = hasSource
|
|
25
|
+
? segmentationVoxels.sourceVoxelManager
|
|
26
|
+
: segmentationVoxels;
|
|
27
|
+
const previewVoxelManager = hasSource
|
|
28
|
+
? segmentationVoxels
|
|
29
|
+
: VoxelManager.createRLEHistoryVoxelManager(segmentationVoxelManager);
|
|
30
|
+
const { segmentIndex = 1, previewSegmentIndex = 1 } = options;
|
|
31
|
+
const clickedPoints = options.points || previewVoxelManager.getPoints();
|
|
32
|
+
if (!clickedPoints?.length) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const boundsIJK = previewVoxelManager
|
|
36
|
+
.getBoundsIJK()
|
|
37
|
+
.map((bound, i) => [
|
|
38
|
+
Math.min(bound[0], ...clickedPoints.map((point) => point[i])),
|
|
39
|
+
Math.max(bound[1], ...clickedPoints.map((point) => point[i])),
|
|
40
|
+
]);
|
|
41
|
+
if (boundsIJK.find((it) => it[0] < 0 || it[1] > MAX_IMAGE_SIZE)) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const { toIJK, fromIJK, boundsIJKPrime, error } = normalizeViewportPlane(viewport, boundsIJK);
|
|
45
|
+
if (error) {
|
|
46
|
+
console.warn('Not performing island removal for planes not orthogonal to acquisition plane', error);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const [width, height, depth] = fromIJK(segmentationVoxelManager.dimensions);
|
|
50
|
+
const segmentSet = new RLEVoxelMap(width, height, depth);
|
|
51
|
+
const getter = (i, j, k) => {
|
|
52
|
+
const index = segmentationVoxelManager.toIndex(toIJK([i, j, k]));
|
|
53
|
+
const oldVal = segmentationVoxelManager.getAtIndex(index);
|
|
54
|
+
if (oldVal === previewSegmentIndex || oldVal === segmentIndex) {
|
|
55
|
+
return SegmentationEnum.SEGMENT;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
segmentSet.fillFrom(getter, boundsIJKPrime);
|
|
59
|
+
segmentSet.normalizer = { toIJK, fromIJK, boundsIJKPrime };
|
|
60
|
+
this.segmentSet = segmentSet;
|
|
61
|
+
this.previewVoxelManager = previewVoxelManager;
|
|
62
|
+
this.segmentIndex = segmentIndex;
|
|
63
|
+
this.previewSegmentIndex = previewSegmentIndex ?? segmentIndex;
|
|
64
|
+
this.selectedPoints = clickedPoints;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
floodFillSegmentIsland() {
|
|
68
|
+
const { selectedPoints: clickedPoints, segmentSet } = this;
|
|
69
|
+
let floodedCount = 0;
|
|
70
|
+
const { fromIJK } = segmentSet.normalizer;
|
|
71
|
+
clickedPoints.forEach((clickedPoint) => {
|
|
72
|
+
const ijkPrime = fromIJK(clickedPoint);
|
|
73
|
+
const index = segmentSet.toIndex(ijkPrime);
|
|
74
|
+
const [iPrime, jPrime, kPrime] = ijkPrime;
|
|
75
|
+
if (segmentSet.get(index) === SegmentationEnum.SEGMENT) {
|
|
76
|
+
floodedCount += segmentSet.floodFill(iPrime, jPrime, kPrime, SegmentationEnum.ISLAND);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
return floodedCount;
|
|
80
|
+
}
|
|
81
|
+
removeExternalIslands() {
|
|
82
|
+
const { previewVoxelManager, segmentSet } = this;
|
|
83
|
+
const { toIJK } = segmentSet.normalizer;
|
|
84
|
+
const callback = (index, rle) => {
|
|
85
|
+
const [, jPrime, kPrime] = segmentSet.toIJK(index);
|
|
86
|
+
if (rle.value !== SegmentationEnum.ISLAND) {
|
|
87
|
+
for (let iPrime = rle.start; iPrime < rle.end; iPrime++) {
|
|
88
|
+
const clearPoint = toIJK([iPrime, jPrime, kPrime]);
|
|
89
|
+
const v = previewVoxelManager.getAtIJKPoint(clearPoint);
|
|
90
|
+
previewVoxelManager.setAtIJKPoint(clearPoint, v === undefined ? 0 : null);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
segmentSet.forEach(callback, { rowModified: true });
|
|
95
|
+
}
|
|
96
|
+
removeInternalIslands() {
|
|
97
|
+
const { segmentSet, previewVoxelManager, previewSegmentIndex } = this;
|
|
98
|
+
const { height, normalizer, width } = segmentSet;
|
|
99
|
+
const { toIJK } = normalizer;
|
|
100
|
+
segmentSet.forEachRow((baseIndex, row) => {
|
|
101
|
+
let lastRle;
|
|
102
|
+
for (const rle of [...row]) {
|
|
103
|
+
if (rle.value !== SegmentationEnum.ISLAND) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (!lastRle) {
|
|
107
|
+
if (this.fillInternalEdge && rle.start > 0) {
|
|
108
|
+
for (let iPrime = 0; iPrime < rle.start; iPrime++) {
|
|
109
|
+
segmentSet.set(baseIndex + iPrime, SegmentationEnum.INTERIOR);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
lastRle = rle;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
for (let iPrime = lastRle.end; iPrime < rle.start; iPrime++) {
|
|
116
|
+
segmentSet.set(baseIndex + iPrime, SegmentationEnum.INTERIOR);
|
|
117
|
+
}
|
|
118
|
+
lastRle = rle;
|
|
119
|
+
}
|
|
120
|
+
if (this.fillInternalEdge && lastRle?.end < width) {
|
|
121
|
+
for (let iPrime = lastRle.end; iPrime < width; iPrime++) {
|
|
122
|
+
segmentSet.set(baseIndex + iPrime, SegmentationEnum.INTERIOR);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
segmentSet.forEach((baseIndex, rle) => {
|
|
127
|
+
if (rle.value !== SegmentationEnum.INTERIOR) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const [, jPrime, kPrime] = segmentSet.toIJK(baseIndex);
|
|
131
|
+
const rowPrev = jPrime > 0 ? segmentSet.getRun(jPrime - 1, kPrime) : null;
|
|
132
|
+
const rowNext = jPrime + 1 < height ? segmentSet.getRun(jPrime + 1, kPrime) : null;
|
|
133
|
+
const isLast = jPrime === height - 1;
|
|
134
|
+
const isFirst = jPrime === 0;
|
|
135
|
+
const prevCovers = IslandRemoval.covers(rle, rowPrev) ||
|
|
136
|
+
(isFirst && this.fillInternalEdge);
|
|
137
|
+
const nextCovers = IslandRemoval.covers(rle, rowNext) || (isLast && this.fillInternalEdge);
|
|
138
|
+
if (rle.end - rle.start > 2 && (!prevCovers || !nextCovers)) {
|
|
139
|
+
segmentSet.floodFill(rle.start, jPrime, kPrime, SegmentationEnum.EXTERIOR, { singlePlane: true });
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
segmentSet.forEach((baseIndex, rle) => {
|
|
143
|
+
if (rle.value !== SegmentationEnum.INTERIOR) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const [, jPrime, kPrime] = segmentSet.toIJK(baseIndex);
|
|
147
|
+
const size = segmentSet.floodFill(rle.start, jPrime, kPrime, SegmentationEnum.INTERIOR_TEST);
|
|
148
|
+
const isBig = size > this.maxInternalRemove;
|
|
149
|
+
const newType = isBig
|
|
150
|
+
? SegmentationEnum.EXTERIOR
|
|
151
|
+
: SegmentationEnum.INTERIOR_SMALL;
|
|
152
|
+
segmentSet.floodFill(rle.start, jPrime, kPrime, newType);
|
|
153
|
+
});
|
|
154
|
+
segmentSet.forEach((baseIndex, rle) => {
|
|
155
|
+
if (rle.value !== SegmentationEnum.INTERIOR_SMALL) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
for (let iPrime = rle.start; iPrime < rle.end; iPrime++) {
|
|
159
|
+
const clearPoint = toIJK(segmentSet.toIJK(baseIndex + iPrime));
|
|
160
|
+
previewVoxelManager.setAtIJKPoint(clearPoint, previewSegmentIndex);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
return previewVoxelManager.getArrayOfModifiedSlices();
|
|
164
|
+
}
|
|
165
|
+
static covers(rle, row) {
|
|
166
|
+
if (!row) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
let { start } = rle;
|
|
170
|
+
const { end } = rle;
|
|
171
|
+
for (const rowRle of row) {
|
|
172
|
+
if (start >= rowRle.start && start < rowRle.end) {
|
|
173
|
+
start = rowRle.end;
|
|
174
|
+
if (start >= end) {
|
|
175
|
+
return true;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import type { ThresholdInformation } from './utilities';
|
|
3
|
+
export type ThresholdOptions = {
|
|
4
|
+
numSlicesToProject?: number;
|
|
5
|
+
overwrite: boolean;
|
|
6
|
+
overlapType?: number;
|
|
7
|
+
segmentIndex?: number;
|
|
8
|
+
};
|
|
9
|
+
export type AnnotationForThresholding = {
|
|
10
|
+
data: {
|
|
11
|
+
handles: {
|
|
12
|
+
points: Types.Point3[];
|
|
13
|
+
};
|
|
14
|
+
cachedStats?: {
|
|
15
|
+
projectionPoints?: Types.Point3[][];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
declare function rectangleROIThresholdVolumeByRange(annotationUIDs: string[], segmentationVolume: Types.IImageVolume, thresholdVolumeInformation: ThresholdInformation[], options: ThresholdOptions): Types.IImageVolume;
|
|
20
|
+
export default rectangleROIThresholdVolumeByRange;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { state } from '../../stateManagement/annotation';
|
|
2
|
+
import RectangleROIStartEndThresholdTool from '../../tools/segmentation/RectangleROIStartEndThresholdTool';
|
|
3
|
+
import RectangleROIThresholdTool from '../../tools/segmentation/RectangleROIThresholdTool';
|
|
4
|
+
import thresholdVolumeByRange from './thresholdVolumeByRange';
|
|
5
|
+
import getBoundsIJKFromRectangleAnnotations from '../rectangleROITool/getBoundsIJKFromRectangleAnnotations';
|
|
6
|
+
function rectangleROIThresholdVolumeByRange(annotationUIDs, segmentationVolume, thresholdVolumeInformation, options) {
|
|
7
|
+
const annotations = annotationUIDs.map((annotationUID) => {
|
|
8
|
+
return state.getAnnotation(annotationUID);
|
|
9
|
+
});
|
|
10
|
+
_validateAnnotations(annotations);
|
|
11
|
+
let boundsIJK;
|
|
12
|
+
for (let i = 0; i < thresholdVolumeInformation.length; i++) {
|
|
13
|
+
const volumeSize = thresholdVolumeInformation[i].volume.voxelManager.getScalarDataLength();
|
|
14
|
+
if (volumeSize === segmentationVolume.voxelManager.getScalarDataLength() ||
|
|
15
|
+
i === 0) {
|
|
16
|
+
boundsIJK = getBoundsIJKFromRectangleAnnotations(annotations, thresholdVolumeInformation[i].volume, options);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const outputSegmentationVolume = thresholdVolumeByRange(segmentationVolume, thresholdVolumeInformation, { ...options, boundsIJK });
|
|
20
|
+
outputSegmentationVolume.modified();
|
|
21
|
+
return outputSegmentationVolume;
|
|
22
|
+
}
|
|
23
|
+
function _validateAnnotations(annotations) {
|
|
24
|
+
const validToolNames = [
|
|
25
|
+
RectangleROIThresholdTool.toolName,
|
|
26
|
+
RectangleROIStartEndThresholdTool.toolName,
|
|
27
|
+
];
|
|
28
|
+
for (const annotation of annotations) {
|
|
29
|
+
const name = annotation.metadata.toolName;
|
|
30
|
+
if (!validToolNames.includes(name)) {
|
|
31
|
+
throw new Error('rectangleROIThresholdVolumeByRange only supports RectangleROIThreshold and RectangleROIStartEndThreshold annotations');
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export default rectangleROIThresholdVolumeByRange;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Types } from '@cornerstonejs/core';
|
|
2
|
+
export type Segment = {
|
|
3
|
+
segmentationId: string;
|
|
4
|
+
segmentIndex: number;
|
|
5
|
+
label: string;
|
|
6
|
+
style?: Record<string, unknown>;
|
|
7
|
+
containedSegmentIndices?: (number: any) => boolean;
|
|
8
|
+
};
|
|
9
|
+
export type SegmentContourActionConfiguration = {
|
|
10
|
+
getSegment?: (enabledElement: Types.IEnabledElement, configuration: SegmentContourActionConfiguration) => Segment;
|
|
11
|
+
segmentationId?: string;
|
|
12
|
+
segmentIndex?: number;
|
|
13
|
+
segmentData?: Map<number, Segment>;
|
|
14
|
+
toolGroupId?: string;
|
|
15
|
+
};
|
|
16
|
+
export default function segmentContourAction(element: HTMLDivElement, configuration: any): any;
|
|
17
|
+
export declare function defaultGetSegment(enabledElement: Types.IEnabledElement, configuration: SegmentContourActionConfiguration): Segment;
|