@cornerstonejs/tools 2.0.0-beta.20 → 2.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/cursors/SVGCursorDescriptor.d.ts +1 -1
- package/dist/esm/cursors/SVGCursorDescriptor.js +7 -0
- package/dist/esm/cursors/SVGMouseCursor.d.ts +1 -1
- package/dist/esm/drawingSvg/draw.d.ts +2 -1
- package/dist/esm/drawingSvg/drawArrow.d.ts +1 -1
- package/dist/esm/drawingSvg/drawCircle.d.ts +1 -1
- package/dist/esm/drawingSvg/drawEllipse.d.ts +1 -1
- package/dist/esm/drawingSvg/drawEllipse.js +1 -0
- package/dist/esm/drawingSvg/drawEllipseByCoordinates.d.ts +1 -1
- package/dist/esm/drawingSvg/drawHandle.d.ts +1 -1
- package/dist/esm/drawingSvg/drawHandles.d.ts +1 -1
- package/dist/esm/drawingSvg/drawHeight.d.ts +3 -0
- package/dist/esm/drawingSvg/drawHeight.js +42 -0
- package/dist/esm/drawingSvg/drawLine.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLink.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLinkedTextBox.d.ts +1 -1
- package/dist/esm/drawingSvg/drawPath.d.ts +1 -1
- package/dist/esm/drawingSvg/drawPolyline.d.ts +1 -1
- package/dist/esm/drawingSvg/drawRect.d.ts +1 -1
- package/dist/esm/drawingSvg/drawRect.js +1 -0
- package/dist/esm/drawingSvg/drawRectByCoordinates.d.ts +1 -1
- package/dist/esm/drawingSvg/drawRedactionRect.d.ts +3 -1
- package/dist/esm/drawingSvg/drawTextBox.d.ts +1 -1
- package/dist/esm/drawingSvg/getSvgDrawingHelper.d.ts +1 -1
- package/dist/esm/drawingSvg/getSvgDrawingHelper.js +1 -1
- package/dist/esm/drawingSvg/index.d.ts +2 -1
- package/dist/esm/drawingSvg/index.js +2 -1
- package/dist/esm/enums/ToolBindings.d.ts +3 -1
- package/dist/esm/enums/ToolBindings.js +2 -0
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyDown.d.ts +1 -1
- package/dist/esm/eventDispatchers/keyboardEventHandlers/keyUp.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDown.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownActivate.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownAnnotationAction.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDrag.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseMove.d.ts +1 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseWheel.d.ts +2 -1
- package/dist/esm/eventDispatchers/mouseEventHandlers/mouseWheel.js +15 -2
- package/dist/esm/eventDispatchers/shared/getActiveToolForKeyboardEvent.d.ts +1 -1
- package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.d.ts +1 -1
- package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.js +3 -4
- package/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.d.ts +1 -1
- package/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.js +1 -1
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForKeyboardEvents.d.ts +2 -2
- package/dist/esm/eventDispatchers/shared/getToolsWithActionsForMouseEvent.d.ts +4 -3
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForMouseEvent.d.ts +3 -3
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForTouchEvent.d.ts +2 -2
- package/dist/esm/eventDispatchers/touchEventHandlers/touchDrag.d.ts +1 -1
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStart.d.ts +1 -1
- package/dist/esm/eventDispatchers/touchEventHandlers/touchStartActivate.d.ts +1 -1
- package/dist/esm/eventListeners/annotations/annotationCompletedListener.d.ts +1 -1
- package/dist/esm/eventListeners/annotations/annotationRemovedListener.d.ts +1 -1
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +3 -3
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +1 -1
- package/dist/esm/eventListeners/mouse/getMouseEventPoints.d.ts +1 -1
- package/dist/esm/eventListeners/mouse/getMouseEventPoints.js +4 -1
- package/dist/esm/eventListeners/mouse/mouseDownListener.js +9 -1
- package/dist/esm/eventListeners/segmentation/imageChangeEventListener.js +6 -6
- package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js +3 -3
- package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.js +2 -2
- package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.js +3 -2
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js +5 -5
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.d.ts +1 -1
- package/dist/esm/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js +4 -2
- package/dist/esm/eventListeners/touch/getTouchEventPoints.d.ts +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/stateManagement/annotation/AnnotationRenderingEngine.d.ts +20 -0
- package/dist/esm/stateManagement/annotation/AnnotationRenderingEngine.js +112 -0
- package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.d.ts +3 -3
- package/dist/esm/stateManagement/annotation/annotationLocking.d.ts +1 -1
- package/dist/esm/stateManagement/annotation/annotationState.d.ts +2 -2
- package/dist/esm/stateManagement/annotation/annotationVisibility.d.ts +1 -1
- package/dist/esm/stateManagement/annotation/config/ToolStyle.d.ts +1 -1
- package/dist/esm/stateManagement/annotation/config/getFont.d.ts +2 -2
- package/dist/esm/stateManagement/annotation/config/getState.d.ts +1 -1
- package/dist/esm/stateManagement/annotation/config/helpers.d.ts +2 -2
- package/dist/esm/stateManagement/annotation/helpers/state.d.ts +2 -2
- package/dist/esm/stateManagement/annotation/utilities/defineProperties.d.ts +1 -1
- package/dist/esm/stateManagement/index.d.ts +3 -3
- package/dist/esm/stateManagement/index.js +2 -2
- package/dist/esm/{tools/displayTools → stateManagement/segmentation}/SegmentationRenderingEngine.d.ts +3 -3
- package/dist/esm/{tools/displayTools → stateManagement/segmentation}/SegmentationRenderingEngine.js +14 -17
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.d.ts +12 -12
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js +27 -19
- package/dist/esm/stateManagement/segmentation/activeSegmentation.d.ts +5 -4
- package/dist/esm/stateManagement/segmentation/activeSegmentation.js +12 -5
- package/dist/esm/stateManagement/segmentation/addRepresentationData.d.ts +3 -3
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentation.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/{addRepresentation.js → addSegmentationRepresentation.js} +6 -6
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.d.ts +3 -0
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.js +9 -0
- package/dist/esm/stateManagement/segmentation/addSegmentations.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/config/index.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/config/index.js +2 -2
- package/dist/esm/stateManagement/segmentation/config/segmentationColor.js +2 -2
- package/dist/esm/stateManagement/segmentation/config/segmentationConfig.d.ts +5 -5
- package/dist/esm/stateManagement/segmentation/config/segmentationConfig.js +5 -5
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.d.ts +5 -5
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.js +12 -12
- package/dist/esm/stateManagement/segmentation/convertStackToVolumeSegmentation.js +3 -7
- package/dist/esm/stateManagement/segmentation/convertVolumeToStackSegmentation.js +8 -53
- package/dist/esm/stateManagement/segmentation/helpers/clipAndCacheSurfacesForViewport.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/helpers/getSegmentationRepresentationRenderingConfig.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/helpers/{getRepresentationRenderingConfig.js → getSegmentationRepresentationRenderingConfig.js} +2 -2
- package/dist/esm/stateManagement/segmentation/helpers/normalizeSegmentationInput.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/helpers/validateSegmentationInput.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/index.d.ts +3 -3
- package/dist/esm/stateManagement/segmentation/index.js +3 -3
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/contourComputationStrategies.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/contourComputationStrategies.js +3 -3
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/utils/createAndAddContourSegmentationsFromClippedSurfaces.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/utils/extractContourData.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.js +12 -21
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.js +2 -6
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.js +8 -13
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.js +2 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.js +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.js +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.js +4 -3
- package/dist/esm/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.js +2 -2
- package/dist/esm/stateManagement/segmentation/polySeg/computeAndAddRepresentation.d.ts +1 -1
- package/dist/esm/stateManagement/segmentation/removeSegmentationRepresentations.d.ts +2 -0
- package/dist/esm/stateManagement/segmentation/{removeRepresentationsFromViewport.js → removeSegmentationRepresentations.js} +9 -6
- package/dist/esm/stateManagement/segmentation/segmentIndex.js +2 -2
- package/dist/esm/stateManagement/segmentation/segmentLocking.d.ts +2 -2
- package/dist/esm/stateManagement/segmentation/segmentLocking.js +2 -2
- package/dist/esm/stateManagement/segmentation/segmentationState.d.ts +16 -16
- package/dist/esm/stateManagement/segmentation/segmentationState.js +30 -30
- package/dist/esm/store/SynchronizerManager/Synchronizer.d.ts +7 -3
- package/dist/esm/store/SynchronizerManager/Synchronizer.js +2 -1
- package/dist/esm/store/SynchronizerManager/createSynchronizer.d.ts +3 -3
- package/dist/esm/store/SynchronizerManager/createSynchronizer.js +1 -1
- package/dist/esm/store/SynchronizerManager/getAllSynchronizers.d.ts +1 -1
- package/dist/esm/store/SynchronizerManager/getSynchronizer.d.ts +1 -1
- package/dist/esm/store/SynchronizerManager/getSynchronizersForViewport.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/ToolGroup.d.ts +3 -3
- package/dist/esm/store/ToolGroupManager/ToolGroup.js +5 -2
- package/dist/esm/store/ToolGroupManager/createToolGroup.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/destroyToolGroup.js +1 -0
- package/dist/esm/store/ToolGroupManager/getAllToolGroups.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/getToolGroup.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/getToolGroupForViewport.d.ts +1 -1
- package/dist/esm/store/ToolGroupManager/getToolGroupsWithToolName.d.ts +1 -1
- package/dist/esm/store/addEnabledElement.d.ts +1 -1
- package/dist/esm/store/addEnabledElement.js +1 -1
- package/dist/esm/store/addTool.js +0 -3
- package/dist/esm/store/filterMoveableAnnotationTools.d.ts +1 -1
- package/dist/esm/store/filterToolsWithAnnotationsForElement.d.ts +1 -1
- package/dist/esm/store/filterToolsWithMoveableHandles.d.ts +1 -1
- package/dist/esm/store/removeEnabledElement.d.ts +1 -1
- package/dist/esm/store/removeEnabledElement.js +1 -1
- package/dist/esm/store/state.d.ts +4 -3
- package/dist/esm/store/state.js +1 -1
- package/dist/esm/synchronizers/callbacks/areViewportsCoplanar .d.ts +1 -1
- package/dist/esm/synchronizers/callbacks/cameraSyncCallback.d.ts +2 -2
- package/dist/esm/synchronizers/callbacks/imageSliceSyncCallback.d.ts +2 -2
- package/dist/esm/synchronizers/callbacks/presentationViewSyncCallback.d.ts +1 -1
- package/dist/esm/synchronizers/callbacks/slabThicknessSyncCallback.d.ts +1 -1
- package/dist/esm/synchronizers/callbacks/voiSyncCallback.d.ts +5 -2
- package/dist/esm/synchronizers/callbacks/zoomPanSyncCallback.d.ts +2 -2
- package/dist/esm/synchronizers/synchronizers/createCameraPositionSynchronizer.d.ts +1 -1
- package/dist/esm/synchronizers/synchronizers/createImageSliceSynchronizer.d.ts +1 -1
- package/dist/esm/synchronizers/synchronizers/createPresentationViewSynchronizer.d.ts +2 -2
- package/dist/esm/synchronizers/synchronizers/createPresentationViewSynchronizer.js +1 -1
- package/dist/esm/synchronizers/synchronizers/createSlabThicknessSynchronizer.d.ts +1 -1
- package/dist/esm/synchronizers/synchronizers/createVOISynchronizer.d.ts +1 -1
- package/dist/esm/synchronizers/synchronizers/createZoomPanSynchronizer.d.ts +1 -1
- package/dist/esm/tools/AdvancedMagnifyTool.d.ts +4 -6
- package/dist/esm/tools/AdvancedMagnifyViewport.js +1 -1
- package/dist/esm/tools/AdvancedMagnifyViewportManager.d.ts +3 -2
- package/dist/esm/tools/AdvancedMagnifyViewportManager.js +1 -1
- package/dist/esm/tools/AnnotationEraserTool.d.ts +1 -1
- package/dist/esm/tools/CrosshairsTool.d.ts +5 -5
- package/dist/esm/tools/CrosshairsTool.js +4 -3
- package/dist/esm/tools/MIPJumpToClickTool.d.ts +1 -2
- package/dist/esm/tools/MIPJumpToClickTool.js +2 -3
- package/dist/esm/tools/MagnifyTool.d.ts +2 -3
- package/dist/esm/tools/OrientationMarkerTool.d.ts +41 -58
- package/dist/esm/tools/OrientationMarkerTool.js +8 -7
- package/dist/esm/tools/OverlayGridTool.d.ts +2 -4
- package/dist/esm/tools/OverlayGridTool.js +1 -1
- package/dist/esm/tools/PanTool.d.ts +1 -1
- package/dist/esm/tools/PanTool.js +5 -0
- package/dist/esm/tools/PlanarRotateTool.d.ts +3 -1
- package/dist/esm/tools/PlanarRotateTool.js +18 -4
- package/dist/esm/tools/ReferenceCursors.d.ts +2 -5
- package/dist/esm/tools/ReferenceLinesTool.d.ts +4 -6
- package/dist/esm/tools/ReferenceLinesTool.js +1 -1
- package/dist/esm/tools/ScaleOverlayTool.d.ts +7 -9
- package/dist/esm/tools/ScaleOverlayTool.js +1 -2
- package/dist/esm/tools/SculptorTool/CircleSculptCursor.d.ts +4 -4
- package/dist/esm/tools/SculptorTool.d.ts +1 -1
- package/dist/esm/tools/SegmentationIntersectionTool.d.ts +2 -2
- package/dist/esm/tools/StackScrollTool.d.ts +2 -1
- package/dist/esm/tools/StackScrollTool.js +17 -3
- package/dist/esm/tools/StackScrollToolMouseWheelTool.d.ts +1 -2
- package/dist/esm/tools/StackScrollToolMouseWheelTool.js +1 -2
- package/dist/esm/tools/TrackballRotateTool.d.ts +1 -1
- package/dist/esm/tools/TrackballRotateTool.js +4 -0
- package/dist/esm/tools/VolumeRotateMouseWheelTool.d.ts +2 -3
- package/dist/esm/tools/WindowLevelRegionTool.d.ts +3 -3
- package/dist/esm/tools/WindowLevelRegionTool.js +1 -3
- package/dist/esm/tools/WindowLevelTool.d.ts +1 -1
- package/dist/esm/tools/WindowLevelTool.js +12 -7
- package/dist/esm/tools/ZoomTool.d.ts +2 -2
- package/dist/esm/tools/ZoomTool.js +2 -2
- package/dist/esm/tools/annotation/AngleTool.d.ts +5 -7
- package/dist/esm/tools/annotation/ArrowAnnotateTool.d.ts +5 -7
- package/dist/esm/tools/annotation/BidirectionalTool.d.ts +5 -7
- package/dist/esm/tools/annotation/CircleROITool.d.ts +5 -7
- package/dist/esm/tools/annotation/CircleROITool.js +8 -5
- package/dist/esm/tools/annotation/CobbAngleTool.d.ts +5 -7
- package/dist/esm/tools/annotation/DragProbeTool.d.ts +3 -5
- package/dist/esm/tools/annotation/DragProbeTool.js +0 -5
- package/dist/esm/tools/annotation/EllipticalROITool.d.ts +5 -7
- package/dist/esm/tools/annotation/EllipticalROITool.js +8 -3
- package/dist/esm/tools/annotation/HeightTool.d.ts +36 -0
- package/dist/esm/tools/annotation/HeightTool.js +435 -0
- package/dist/esm/tools/annotation/KeyImageTool.d.ts +4 -6
- package/dist/esm/tools/annotation/LengthTool.d.ts +5 -7
- package/dist/esm/tools/annotation/LengthTool.js +7 -5
- package/dist/esm/tools/annotation/LivewireContourTool.d.ts +3 -4
- package/dist/esm/tools/annotation/LivewireContourTool.js +2 -1
- package/dist/esm/tools/annotation/PlanarFreehandROITool.d.ts +21 -4
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js +155 -113
- package/dist/esm/tools/annotation/ProbeTool.d.ts +4 -6
- package/dist/esm/tools/annotation/ProbeTool.js +14 -29
- package/dist/esm/tools/annotation/RectangleROITool.d.ts +5 -5
- package/dist/esm/tools/annotation/RectangleROITool.js +7 -3
- package/dist/esm/tools/annotation/SplineContourSegmentationTool.d.ts +1 -1
- package/dist/esm/tools/annotation/SplineROITool.d.ts +1 -3
- package/dist/esm/tools/annotation/SplineROITool.js +2 -2
- package/dist/esm/tools/annotation/UltrasoundDirectionalTool.d.ts +5 -7
- package/dist/esm/tools/annotation/VideoRedactionTool.d.ts +4 -5
- package/dist/esm/tools/annotation/planarFreehandROITool/findOpenUShapedContourVectorToPeak.d.ts +1 -1
- package/dist/esm/tools/annotation/splines/CardinalSpline.d.ts +1 -1
- package/dist/esm/tools/annotation/splines/CubicSpline.d.ts +1 -1
- package/dist/esm/tools/annotation/splines/QuadraticSpline.d.ts +1 -1
- package/dist/esm/tools/annotation/splines/Spline.d.ts +1 -1
- package/dist/esm/tools/base/AnnotationDisplayTool.d.ts +3 -3
- package/dist/esm/tools/base/AnnotationDisplayTool.js +3 -9
- package/dist/esm/tools/base/AnnotationTool.d.ts +3 -14
- package/dist/esm/tools/base/BaseTool.d.ts +5 -5
- package/dist/esm/tools/base/BaseTool.js +1 -1
- package/dist/esm/tools/base/ContourBaseTool.d.ts +1 -1
- package/dist/esm/tools/base/ContourBaseTool.js +3 -3
- package/dist/esm/tools/base/ContourSegmentationBaseTool.js +10 -10
- package/dist/esm/tools/displayTools/Contour/contourConfig.d.ts +1 -1
- package/dist/esm/tools/displayTools/Contour/contourDisplay.d.ts +2 -2
- package/dist/esm/tools/displayTools/Contour/contourDisplay.js +2 -1
- package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.d.ts +2 -2
- package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.js +4 -4
- package/dist/esm/tools/displayTools/Contour/contourHandler/utils.d.ts +1 -1
- package/dist/esm/tools/displayTools/Contour/removeContourFromElement.js +2 -2
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.d.ts +1 -1
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.js +3 -3
- package/dist/esm/tools/displayTools/Labelmap/labelmapConfig.d.ts +1 -1
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.d.ts +5 -5
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js +10 -8
- package/dist/esm/tools/displayTools/Labelmap/validateLabelmap.d.ts +2 -2
- package/dist/esm/tools/displayTools/Surface/surfaceConfig.d.ts +1 -1
- package/dist/esm/tools/displayTools/Surface/surfaceDisplay.d.ts +2 -2
- package/dist/esm/tools/distancePointToContour.d.ts +1 -1
- package/dist/esm/tools/index.d.ts +2 -1
- package/dist/esm/tools/index.js +2 -1
- package/dist/esm/tools/segmentation/BrushTool.js +5 -5
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.d.ts +20 -15
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.js +199 -67
- package/dist/esm/tools/segmentation/CircleScissorsTool.d.ts +3 -3
- package/dist/esm/tools/segmentation/CircleScissorsTool.js +10 -3
- package/dist/esm/tools/segmentation/PaintFillTool.d.ts +1 -1
- package/dist/esm/tools/segmentation/PaintFillTool.js +15 -14
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.d.ts +20 -10
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js +174 -55
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.d.ts +3 -3
- package/dist/esm/tools/segmentation/RectangleScissorsTool.d.ts +4 -3
- package/dist/esm/tools/segmentation/RectangleScissorsTool.js +8 -5
- package/dist/esm/tools/segmentation/SegmentSelectTool.d.ts +2 -2
- package/dist/esm/tools/segmentation/SegmentSelectTool.js +2 -2
- package/dist/esm/tools/segmentation/SphereScissorsTool.d.ts +3 -2
- package/dist/esm/tools/segmentation/SphereScissorsTool.js +12 -4
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.d.ts +4 -5
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.js +3 -1
- package/dist/esm/tools/segmentation/strategies/compositions/determineSegmentIndex.js +6 -3
- package/dist/esm/tools/segmentation/strategies/compositions/dynamicThreshold.js +1 -1
- package/dist/esm/tools/segmentation/strategies/compositions/islandRemoval.js +1 -1
- package/dist/esm/tools/segmentation/strategies/compositions/preview.js +2 -2
- package/dist/esm/tools/segmentation/strategies/compositions/regionFill.js +6 -3
- package/dist/esm/tools/segmentation/strategies/compositions/setValue.js +1 -1
- package/dist/esm/tools/segmentation/strategies/eraseRectangle.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/fillCircle.js +1 -1
- package/dist/esm/tools/segmentation/strategies/fillRectangle.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/fillRectangle.js +10 -7
- package/dist/esm/tools/segmentation/strategies/fillSphere.js +1 -1
- package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.js +7 -24
- package/dist/esm/tools/segmentation/strategies/utils/isWithinThreshold.d.ts +9 -2
- package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.d.ts +3 -3
- package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.js +0 -3
- package/dist/esm/types/AnnotationGroupSelector.d.ts +1 -1
- package/dist/esm/types/AnnotationRenderContext.d.ts +3 -2
- package/dist/esm/types/AnnotationStyle.d.ts +2 -2
- package/dist/esm/types/AnnotationTypes.d.ts +3 -3
- package/dist/esm/types/BoundsIJK.d.ts +1 -1
- package/dist/esm/types/CINETypes.d.ts +1 -0
- package/dist/esm/types/CalculatorTypes.d.ts +1 -1
- package/dist/esm/types/CardinalSplineProps.d.ts +1 -1
- package/dist/esm/types/ClosestPoint.d.ts +1 -1
- package/dist/esm/types/ContourAnnotation.d.ts +1 -1
- package/dist/esm/types/ContourSegmentationAnnotation.d.ts +2 -2
- package/dist/esm/types/ControlPointInfo.d.ts +1 -1
- package/dist/esm/types/EventTypes.d.ts +13 -12
- package/dist/esm/types/FloodFillTypes.d.ts +2 -2
- package/dist/esm/types/IAnnotationManager.d.ts +3 -3
- package/dist/esm/types/IDistance.d.ts +1 -1
- package/dist/esm/types/IPoints.d.ts +2 -2
- package/dist/esm/types/ISetToolModeOptions.d.ts +2 -2
- package/dist/esm/types/ISpline.d.ts +1 -1
- package/dist/esm/types/ISynchronizerEventHandler.d.ts +3 -3
- package/dist/esm/types/IToolClassReference.d.ts +3 -3
- package/dist/esm/types/IToolGroup.d.ts +8 -8
- package/dist/esm/types/ITouchPoints.d.ts +2 -2
- package/dist/esm/types/InteractionTypes.d.ts +1 -1
- package/dist/esm/types/InternalToolTypes.d.ts +4 -4
- package/dist/esm/types/InterpolationTypes.d.ts +3 -3
- package/dist/esm/types/JumpToSliceOptions.d.ts +1 -1
- package/dist/esm/types/LabelmapToolOperationData.d.ts +3 -2
- package/dist/esm/types/PlanarBoundingBox.d.ts +1 -1
- package/dist/esm/types/SVGDrawingHelper.d.ts +1 -1
- package/dist/esm/types/ScrollOptions.d.ts +1 -1
- package/dist/esm/types/SegmentationStateTypes.d.ts +7 -6
- package/dist/esm/types/SplineCurveSegment.d.ts +1 -1
- package/dist/esm/types/SplineLineSegment.d.ts +1 -1
- package/dist/esm/types/ToolAction.d.ts +1 -1
- package/dist/esm/types/ToolHandle.d.ts +1 -1
- package/dist/esm/types/ToolProps.d.ts +1 -1
- package/dist/esm/types/ToolSpecificAnnotationTypes.d.ts +34 -12
- package/dist/esm/types/index.d.ts +2 -2
- package/dist/esm/utilities/annotationFrameRange.d.ts +1 -1
- package/dist/esm/utilities/annotationHydration.d.ts +3 -2
- package/dist/esm/utilities/cine/playClip.d.ts +6 -2
- package/dist/esm/utilities/cine/playClip.js +53 -6
- package/dist/esm/utilities/cine/state.d.ts +1 -1
- package/dist/esm/utilities/contourSegmentation/addContourSegmentationAnnotation.d.ts +1 -1
- package/dist/esm/utilities/contourSegmentation/areSameSegment.d.ts +1 -1
- package/dist/esm/utilities/contourSegmentation/isContourSegmentationAnnotation.d.ts +2 -2
- package/dist/esm/utilities/contourSegmentation/removeContourSegmentationAnnotation.d.ts +1 -1
- package/dist/esm/utilities/contours/AnnotationToPointData.d.ts +1 -1
- package/dist/esm/utilities/contours/areCoplanarContours.d.ts +1 -1
- package/dist/esm/utilities/contours/findHandlePolylineIndex.d.ts +1 -1
- package/dist/esm/utilities/contours/interpolation/createPolylineToolData.d.ts +1 -1
- package/dist/esm/utilities/contours/interpolation/getInterpolationData.d.ts +1 -1
- package/dist/esm/utilities/contours/interpolation/interpolate.d.ts +1 -1
- package/dist/esm/utilities/contours/reverseIfAntiClockwise.d.ts +1 -1
- package/dist/esm/utilities/contours/updateContourPolyline.d.ts +1 -1
- package/dist/esm/utilities/dynamicVolume/generateImageFromTimeData.d.ts +3 -2
- package/dist/esm/utilities/dynamicVolume/generateImageFromTimeData.js +31 -23
- package/dist/esm/utilities/dynamicVolume/getDataInTime.d.ts +1 -1
- package/dist/esm/utilities/dynamicVolume/getDataInTime.js +14 -9
- package/dist/esm/utilities/getAnnotationNearPoint.d.ts +1 -1
- package/dist/esm/utilities/getCalibratedUnits.d.ts +0 -6
- package/dist/esm/utilities/getCalibratedUnits.js +13 -4
- package/dist/esm/utilities/getPixelValueUnits.d.ts +2 -1
- package/dist/esm/utilities/getPixelValueUnits.js +1 -0
- package/dist/esm/utilities/getSphereBoundsInfo.d.ts +1 -1
- package/dist/esm/utilities/getToolsWithModesForElement.d.ts +1 -1
- package/dist/esm/utilities/getVOIMultipliers.d.ts +1 -1
- package/dist/esm/utilities/index.d.ts +1 -3
- package/dist/esm/utilities/index.js +1 -3
- package/dist/esm/utilities/livewire/LiveWirePath.d.ts +1 -1
- package/dist/esm/utilities/livewire/LivewireScissors.d.ts +1 -1
- package/dist/esm/utilities/math/aabb/distanceToPoint.d.ts +1 -1
- package/dist/esm/utilities/math/aabb/distanceToPointSquared.d.ts +1 -1
- package/dist/esm/utilities/math/aabb/intersectAABB.d.ts +1 -1
- package/dist/esm/utilities/math/basic/BasicStatsCalculator.d.ts +2 -2
- package/dist/esm/utilities/math/basic/BasicStatsCalculator.js +1 -1
- package/dist/esm/utilities/math/basic/Calculator.d.ts +1 -1
- package/dist/esm/utilities/math/circle/getCanvasCircleCorners.d.ts +1 -1
- package/dist/esm/utilities/math/circle/getCanvasCircleRadius.d.ts +1 -1
- package/dist/esm/utilities/math/line/distanceToPointSquared.d.ts +1 -1
- package/dist/esm/utilities/math/midPoint.d.ts +1 -1
- package/dist/esm/utilities/math/point/mirror.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/combinePolyline.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/getAABB.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/getLinesIntersection.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/getNormal2.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/getNormal3.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/intersectPolyline.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +2 -2
- package/dist/esm/utilities/math/sphere/pointInSphere.d.ts +1 -1
- package/dist/esm/utilities/orientation/getOrientationStringLPS.d.ts +1 -1
- package/dist/esm/utilities/planar/filterAnnotationsForDisplay.d.ts +1 -1
- package/dist/esm/utilities/planar/filterAnnotationsWithinPlane.d.ts +3 -0
- package/dist/esm/utilities/planar/filterAnnotationsWithinPlane.js +26 -0
- package/dist/esm/utilities/planar/filterAnnotationsWithinSlice.d.ts +1 -1
- package/dist/esm/utilities/planar/index.d.ts +3 -1
- package/dist/esm/utilities/planar/index.js +3 -1
- package/dist/esm/utilities/planarFreehandROITool/interpolation/algorithms/bspline.d.ts +1 -1
- package/dist/esm/utilities/planarFreehandROITool/interpolation/interpolateSegmentPoints.d.ts +1 -1
- package/dist/esm/utilities/planarFreehandROITool/smoothAnnotation.d.ts +2 -2
- package/dist/esm/utilities/planarFreehandROITool/smoothPoints.d.ts +11 -3
- package/dist/esm/utilities/polyData/utils.d.ts +1 -1
- package/dist/esm/utilities/scroll.d.ts +4 -3
- package/dist/esm/utilities/scroll.js +3 -10
- package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts +1 -1
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.d.ts +2 -11
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js +1 -1
- package/dist/esm/utilities/segmentation/createMergedLabelmapForIndex.d.ts +1 -1
- package/dist/esm/utilities/segmentation/createMergedLabelmapForIndex.js +7 -7
- package/dist/esm/utilities/segmentation/floodFill.d.ts +1 -1
- package/dist/esm/utilities/segmentation/getDefaultRepresentationConfig.d.ts +1 -1
- package/dist/esm/utilities/segmentation/getSegmentIndexAtLabelmapBorder.js +8 -5
- package/dist/esm/utilities/segmentation/getSegmentIndexAtWorldPoint.d.ts +1 -1
- package/dist/esm/utilities/segmentation/getSegmentIndexAtWorldPoint.js +7 -4
- package/dist/esm/utilities/segmentation/getUniqueSegmentIndices.js +4 -5
- package/dist/esm/utilities/segmentation/index.d.ts +2 -2
- package/dist/esm/utilities/segmentation/index.js +2 -2
- package/dist/esm/utilities/segmentation/isValidRepresentationConfig.d.ts +1 -1
- package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.d.ts +1 -1
- package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.js +3 -2
- package/dist/esm/utilities/segmentation/segmentContourAction.d.ts +1 -1
- package/dist/esm/utilities/segmentation/segmentContourAction.js +4 -4
- package/dist/esm/utilities/segmentation/thresholdSegmentationByRange.d.ts +2 -2
- package/dist/esm/utilities/segmentation/thresholdSegmentationByRange.js +24 -17
- package/dist/esm/utilities/segmentation/thresholdVolumeByRange.d.ts +3 -3
- package/dist/esm/utilities/segmentation/thresholdVolumeByRange.js +21 -12
- package/dist/esm/utilities/segmentation/triggerSegmentationRender.d.ts +3 -3
- package/dist/esm/utilities/segmentation/triggerSegmentationRender.js +7 -5
- package/dist/esm/utilities/segmentation/utilities.d.ts +12 -2
- package/dist/esm/utilities/segmentation/utilities.js +5 -6
- package/dist/esm/utilities/stackPrefetch/stackContextPrefetch.js +30 -25
- package/dist/esm/utilities/stackPrefetch/stackPrefetch.js +3 -8
- package/dist/esm/utilities/stackPrefetch/stackPrefetchUtils.js +2 -3
- package/dist/esm/utilities/stackPrefetch/state.d.ts +20 -1
- package/dist/esm/utilities/touch/index.d.ts +1 -1
- package/dist/esm/utilities/triggerAnnotationRender.d.ts +0 -20
- package/dist/esm/utilities/triggerAnnotationRender.js +1 -112
- package/dist/esm/utilities/viewport/isViewportPreScaled.d.ts +1 -1
- package/dist/esm/utilities/viewport/isViewportPreScaled.js +2 -5
- package/dist/esm/utilities/viewport/jumpToSlice.d.ts +1 -1
- package/dist/esm/utilities/viewport/jumpToSlice.js +4 -6
- package/dist/esm/utilities/voi/colorbar/ColorbarCanvas.d.ts +2 -2
- package/dist/esm/utilities/voi/colorbar/ViewportColorbar.d.ts +1 -1
- package/dist/esm/utilities/voi/colorbar/ViewportColorbar.js +1 -1
- package/dist/esm/utilities/voi/colorbar/types/ColorbarCanvasProps.d.ts +1 -1
- package/dist/esm/utilities/voi/colorbar/types/ColorbarCommonProps.d.ts +1 -1
- package/dist/esm/utilities/voi/colorbar/types/ColorbarProps.d.ts +3 -3
- package/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.d.ts +8 -0
- package/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.js +4 -10
- package/dist/esm/widgets/types/index.d.ts +2 -2
- package/dist/esm/workers/polySegConverters.js +65 -32
- package/dist/umd/78.index.js +1 -1
- package/dist/umd/78.index.js.map +1 -1
- package/dist/umd/985.index.js +1 -1
- package/dist/umd/985.index.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +5 -7
- package/dist/esm/stateManagement/segmentation/addRepresentation.d.ts +0 -3
- package/dist/esm/stateManagement/segmentation/addRepresentations.d.ts +0 -3
- package/dist/esm/stateManagement/segmentation/addRepresentations.js +0 -9
- package/dist/esm/stateManagement/segmentation/helpers/getRepresentationRenderingConfig.d.ts +0 -2
- package/dist/esm/stateManagement/segmentation/removeRepresentationsFromViewport.d.ts +0 -2
- package/dist/esm/utilities/pointInShapeCallback.d.ts +0 -18
- package/dist/esm/utilities/pointInShapeCallback.js +0 -82
- package/dist/esm/utilities/pointInSurroundingSphereCallback.d.ts +0 -4
- package/dist/esm/utilities/pointInSurroundingSphereCallback.js +0 -63
- package/dist/esm/utilities/segmentation/triggerSegmentationRenderForViewports.d.ts +0 -3
- package/dist/esm/utilities/segmentation/triggerSegmentationRenderForViewports.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Types } from '@cornerstonejs/core';
|
|
2
|
-
import { AnnotationTool } from '../tools';
|
|
3
|
-
import { Annotation, Annotations } from './AnnotationTypes';
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import type { AnnotationTool } from '../tools';
|
|
3
|
+
import type { Annotation, Annotations } from './AnnotationTypes';
|
|
4
4
|
type ToolAnnotationsPair = {
|
|
5
5
|
tool: AnnotationTool;
|
|
6
6
|
annotations: Annotations;
|
|
@@ -12,4 +12,4 @@ type ToolAnnotationPair = {
|
|
|
12
12
|
type ToolsWithMoveableHandles = ToolAnnotationPair & {
|
|
13
13
|
handle: Types.Point3;
|
|
14
14
|
};
|
|
15
|
-
export { ToolsWithMoveableHandles, ToolAnnotationsPair, ToolAnnotationPair };
|
|
15
|
+
export type { ToolsWithMoveableHandles, ToolAnnotationsPair, ToolAnnotationPair, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Types } from '@cornerstonejs/core';
|
|
2
|
-
import { Annotation } from './AnnotationTypes';
|
|
3
|
-
import { InterpolationROIAnnotation } from './ToolSpecificAnnotationTypes';
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import type { Annotation } from './AnnotationTypes';
|
|
3
|
+
import type { InterpolationROIAnnotation } from './ToolSpecificAnnotationTypes';
|
|
4
4
|
export type InterpolationViewportData = {
|
|
5
5
|
annotation: InterpolationROIAnnotation;
|
|
6
6
|
interpolationUID: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
import { LabelmapSegmentationDataStack, LabelmapSegmentationDataVolume } from './LabelmapTypes';
|
|
2
|
+
import type { LabelmapSegmentationDataStack, LabelmapSegmentationDataVolume } from './LabelmapTypes';
|
|
3
3
|
type LabelmapToolOperationData = {
|
|
4
4
|
segmentationId: string;
|
|
5
5
|
segmentIndex: number;
|
|
@@ -10,10 +10,11 @@ type LabelmapToolOperationData = {
|
|
|
10
10
|
strategySpecificConfiguration: any;
|
|
11
11
|
segmentationRepresentationUID: string;
|
|
12
12
|
points: Types.Point3[];
|
|
13
|
+
voxelManager: any;
|
|
13
14
|
preview: any;
|
|
14
15
|
toolGroupId: string;
|
|
15
16
|
};
|
|
16
17
|
type LabelmapToolOperationDataStack = LabelmapToolOperationData & LabelmapSegmentationDataStack;
|
|
17
18
|
type LabelmapToolOperationDataVolume = LabelmapToolOperationData & LabelmapSegmentationDataVolume;
|
|
18
19
|
type LabelmapToolOperationDataAny = LabelmapToolOperationDataVolume | LabelmapToolOperationDataStack;
|
|
19
|
-
export { LabelmapToolOperationData, LabelmapToolOperationDataAny, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume, };
|
|
20
|
+
export type { LabelmapToolOperationData, LabelmapToolOperationDataAny, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume, };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
import * as Enums from '../enums';
|
|
3
|
-
import { ContourConfig, ContourRenderingConfig, ContourSegmentationData } from './ContourTypes';
|
|
2
|
+
import type * as Enums from '../enums';
|
|
3
|
+
import type { ContourConfig, ContourRenderingConfig, ContourSegmentationData } from './ContourTypes';
|
|
4
4
|
import type { LabelmapConfig, LabelmapRenderingConfig, LabelmapSegmentationData } from './LabelmapTypes';
|
|
5
|
-
import { SurfaceSegmentationData, SurfaceRenderingConfig } from './SurfaceTypes';
|
|
5
|
+
import type { SurfaceSegmentationData, SurfaceRenderingConfig } from './SurfaceTypes';
|
|
6
6
|
export type SegmentRepresentationConfig = {
|
|
7
7
|
[key: number | string]: RepresentationConfig;
|
|
8
8
|
};
|
|
9
|
+
export type SurfaceConfig = {};
|
|
9
10
|
export type RepresentationConfig = {
|
|
10
11
|
LABELMAP?: LabelmapConfig;
|
|
11
12
|
CONTOUR?: ContourConfig;
|
|
12
|
-
SURFACE?:
|
|
13
|
+
SURFACE?: SurfaceConfig;
|
|
13
14
|
};
|
|
14
15
|
export type SegmentationRepresentationConfig = {
|
|
15
16
|
renderInactiveRepresentations: boolean;
|
|
@@ -41,7 +42,7 @@ export type BaseSegmentationRepresentation = {
|
|
|
41
42
|
colorLUTIndex: number;
|
|
42
43
|
polySeg?: {
|
|
43
44
|
enabled: boolean;
|
|
44
|
-
options?:
|
|
45
|
+
options?: unknown;
|
|
45
46
|
};
|
|
46
47
|
config: {
|
|
47
48
|
allSegments?: RepresentationConfig;
|
|
@@ -92,6 +93,6 @@ export type RepresentationPublicInputOptions = {
|
|
|
92
93
|
colorLUTOrIndex?: Types.ColorLUT | number;
|
|
93
94
|
polySeg?: {
|
|
94
95
|
enabled: boolean;
|
|
95
|
-
options?:
|
|
96
|
+
options?: unknown;
|
|
96
97
|
};
|
|
97
98
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
import { Annotation } from './AnnotationTypes';
|
|
3
|
-
import { ISpline } from './';
|
|
4
|
-
import { ContourSegmentationAnnotationData } from './ContourSegmentationAnnotation';
|
|
5
|
-
import { ContourAnnotation } from './ContourAnnotation';
|
|
6
|
-
interface ROICachedStats {
|
|
2
|
+
import type { Annotation } from './AnnotationTypes';
|
|
3
|
+
import type { ISpline } from './';
|
|
4
|
+
import type { ContourSegmentationAnnotationData } from './ContourSegmentationAnnotation';
|
|
5
|
+
import type { ContourAnnotation } from './ContourAnnotation';
|
|
6
|
+
export interface ROICachedStats {
|
|
7
7
|
[targetId: string]: {
|
|
8
8
|
Modality: string;
|
|
9
9
|
area: number;
|
|
@@ -216,22 +216,33 @@ export interface RectangleROIStartEndThresholdAnnotation extends Annotation {
|
|
|
216
216
|
FrameOfReferenceUID: string;
|
|
217
217
|
referencedImageId?: string;
|
|
218
218
|
toolName: string;
|
|
219
|
-
enabledElement:
|
|
219
|
+
enabledElement: Types.IEnabledElement;
|
|
220
220
|
volumeId: string;
|
|
221
221
|
spacingInNormal: number;
|
|
222
222
|
};
|
|
223
223
|
data: {
|
|
224
224
|
label: string;
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
startCoordinate: number;
|
|
226
|
+
endCoordinate: number;
|
|
227
227
|
cachedStats: {
|
|
228
228
|
pointsInVolume: Types.Point3[];
|
|
229
229
|
projectionPoints: Types.Point3[][];
|
|
230
230
|
projectionPointsImageIds: string[];
|
|
231
|
+
statistics?: ROICachedStats;
|
|
231
232
|
};
|
|
232
233
|
handles: {
|
|
233
234
|
points: Types.Point3[];
|
|
234
235
|
activeHandleIndex: number | null;
|
|
236
|
+
textBox: {
|
|
237
|
+
hasMoved: boolean;
|
|
238
|
+
worldPosition: Types.Point3;
|
|
239
|
+
worldBoundingBox: {
|
|
240
|
+
topLeft: Types.Point3;
|
|
241
|
+
topRight: Types.Point3;
|
|
242
|
+
bottomLeft: Types.Point3;
|
|
243
|
+
bottomRight: Types.Point3;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
235
246
|
};
|
|
236
247
|
};
|
|
237
248
|
}
|
|
@@ -245,21 +256,32 @@ export interface CircleROIStartEndThresholdAnnotation extends Annotation {
|
|
|
245
256
|
FrameOfReferenceUID: string;
|
|
246
257
|
referencedImageId?: string;
|
|
247
258
|
toolName: string;
|
|
248
|
-
enabledElement:
|
|
259
|
+
enabledElement: Types.IEnabledElement;
|
|
249
260
|
volumeId: string;
|
|
250
261
|
spacingInNormal: number;
|
|
251
262
|
};
|
|
252
263
|
data: {
|
|
253
264
|
label: string;
|
|
254
|
-
|
|
255
|
-
|
|
265
|
+
startCoordinate: number;
|
|
266
|
+
endCoordinate: number;
|
|
256
267
|
cachedStats?: {
|
|
257
268
|
pointsInVolume: Types.Point3[];
|
|
258
269
|
projectionPoints: Types.Point3[][];
|
|
270
|
+
statistics?: ROICachedStats;
|
|
259
271
|
};
|
|
260
272
|
handles: {
|
|
261
273
|
points: [Types.Point3, Types.Point3];
|
|
262
274
|
activeHandleIndex: number | null;
|
|
275
|
+
textBox?: {
|
|
276
|
+
hasMoved: boolean;
|
|
277
|
+
worldPosition: Types.Point3;
|
|
278
|
+
worldBoundingBox: {
|
|
279
|
+
topLeft: Types.Point3;
|
|
280
|
+
topRight: Types.Point3;
|
|
281
|
+
bottomLeft: Types.Point3;
|
|
282
|
+
bottomRight: Types.Point3;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
263
285
|
};
|
|
264
286
|
};
|
|
265
287
|
}
|
|
@@ -433,7 +455,7 @@ export interface VideoRedactionAnnotation extends Annotation {
|
|
|
433
455
|
activeHandleIndex: number | null;
|
|
434
456
|
};
|
|
435
457
|
cachedStats: {
|
|
436
|
-
[key: string]:
|
|
458
|
+
[key: string]: unknown;
|
|
437
459
|
};
|
|
438
460
|
active: boolean;
|
|
439
461
|
};
|
|
@@ -23,7 +23,7 @@ import type BoundsIJK from './BoundsIJK';
|
|
|
23
23
|
import type SVGDrawingHelper from './SVGDrawingHelper';
|
|
24
24
|
import type * as CINETypes from './CINETypes';
|
|
25
25
|
import type { RepresentationConfig, SegmentationRepresentationConfig, SegmentationRepresentationData, Segmentation, SegmentationState, RepresentationPublicInput } from './SegmentationStateTypes';
|
|
26
|
-
import { ISculptToolShape } from './ISculptToolShape';
|
|
26
|
+
import type { ISculptToolShape } from './ISculptToolShape';
|
|
27
27
|
import type ISynchronizerEventHandler from './ISynchronizerEventHandler';
|
|
28
28
|
import type { FloodFillGetter, FloodFillOptions, FloodFillResult } from './FloodFillTypes';
|
|
29
29
|
import type IToolClassReference from './IToolClassReference';
|
|
@@ -33,7 +33,7 @@ import type AnnotationGroupSelector from './AnnotationGroupSelector';
|
|
|
33
33
|
import type AnnotationRenderContext from './AnnotationRenderContext';
|
|
34
34
|
import type { Statistics, NamedStatistics } from './CalculatorTypes';
|
|
35
35
|
import type { CanvasCoordinates } from '../utilities/math/ellipse/getCanvasEllipseCorners';
|
|
36
|
-
import { LabelmapToolOperationData, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume } from './LabelmapToolOperationData';
|
|
36
|
+
import type { LabelmapToolOperationData, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume } from './LabelmapToolOperationData';
|
|
37
37
|
import type { InterpolationViewportData, ImageInterpolationData } from './InterpolationTypes';
|
|
38
38
|
import type { CardinalSplineProps } from './CardinalSplineProps';
|
|
39
39
|
import type { ClosestControlPoint } from './ClosestControlPoint';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Types
|
|
2
|
-
import {
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { StackViewport } from '@cornerstonejs/core';
|
|
3
|
+
import type { Annotation } from '../types';
|
|
3
4
|
declare function annotationHydration(viewport: Types.IViewport, toolName: string, worldPoints: Types.Point3[], options?: {
|
|
4
5
|
FrameOfReferenceUID?: string;
|
|
5
6
|
annotationUID?: string;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { CINETypes } from '../../types';
|
|
1
|
+
import type { CINETypes } from '../../types';
|
|
2
|
+
type StopClipOptions = {
|
|
3
|
+
stopDynamicCine: boolean;
|
|
4
|
+
viewportId?: string;
|
|
5
|
+
};
|
|
2
6
|
declare function playClip(element: HTMLDivElement, playClipOptions: CINETypes.PlayClipOptions): void;
|
|
3
|
-
declare function stopClip(element: HTMLDivElement, options?:
|
|
7
|
+
declare function stopClip(element: HTMLDivElement, options?: StopClipOptions): void;
|
|
4
8
|
export { playClip, stopClip };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { glMatrix, vec3 } from 'gl-matrix';
|
|
2
|
-
import { utilities as csUtils, getEnabledElement, StackViewport, VolumeViewport, cache, BaseVolumeViewport, Enums, } from '@cornerstonejs/core';
|
|
2
|
+
import { utilities as csUtils, getEnabledElement, StackViewport, VideoViewport, VolumeViewport, cache, BaseVolumeViewport, Enums, } from '@cornerstonejs/core';
|
|
3
3
|
import CINE_EVENTS from './events';
|
|
4
4
|
import { addToolState, getToolState, getToolStateByViewportId } from './state';
|
|
5
5
|
import scroll from '../scroll';
|
|
@@ -86,13 +86,24 @@ function playClip(element, playClipOptions) {
|
|
|
86
86
|
}
|
|
87
87
|
const delta = newStepIndex - currentStepIndex;
|
|
88
88
|
if (delta) {
|
|
89
|
-
|
|
89
|
+
try {
|
|
90
|
+
playClipContext.scroll(delta);
|
|
91
|
+
}
|
|
92
|
+
catch (e) {
|
|
93
|
+
console.warn('Play clip not scrolling', e);
|
|
94
|
+
_stopClipWithData(playClipData);
|
|
95
|
+
triggerEvent(element, CINE_EVENTS.CLIP_STOPPED, eventDetail);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
90
98
|
}
|
|
91
99
|
};
|
|
92
100
|
if (isDynamicCinePlaying) {
|
|
93
101
|
dynamicVolumesPlayingMap.set(volume.volumeId, element);
|
|
94
102
|
}
|
|
95
|
-
if (
|
|
103
|
+
if (playClipContext.play) {
|
|
104
|
+
playClipData.framesPerSecond = playClipContext.play(playClipOptions.framesPerSecond);
|
|
105
|
+
}
|
|
106
|
+
else if (playClipTimeouts &&
|
|
96
107
|
playClipTimeouts.length > 0 &&
|
|
97
108
|
playClipIsTimeVarying) {
|
|
98
109
|
playClipData.usingFrameTimeVector = true;
|
|
@@ -120,6 +131,7 @@ function _stopClip(element, options = { stopDynamicCine: true, viewportId: undef
|
|
|
120
131
|
const { stopDynamicCine, viewportId } = options;
|
|
121
132
|
const enabledElement = getEnabledElement(element);
|
|
122
133
|
let toolState;
|
|
134
|
+
const viewport = enabledElement?.viewport;
|
|
123
135
|
if (!enabledElement) {
|
|
124
136
|
if (viewportId) {
|
|
125
137
|
toolState = getToolStateByViewportId(viewportId);
|
|
@@ -135,8 +147,10 @@ function _stopClip(element, options = { stopDynamicCine: true, viewportId: undef
|
|
|
135
147
|
if (toolState) {
|
|
136
148
|
_stopClipWithData(toolState);
|
|
137
149
|
}
|
|
138
|
-
if (
|
|
139
|
-
|
|
150
|
+
if (viewport instanceof VideoViewport) {
|
|
151
|
+
viewport.pause();
|
|
152
|
+
}
|
|
153
|
+
else if (stopDynamicCine && viewport instanceof BaseVolumeViewport) {
|
|
140
154
|
_stopDynamicVolumeCine(element);
|
|
141
155
|
}
|
|
142
156
|
}
|
|
@@ -231,6 +245,36 @@ function _createStackViewportCinePlayContext(viewport, waitForRendered) {
|
|
|
231
245
|
},
|
|
232
246
|
};
|
|
233
247
|
}
|
|
248
|
+
function _createVideoViewportCinePlayContext(viewport, waitForRendered) {
|
|
249
|
+
return {
|
|
250
|
+
get numScrollSteps() {
|
|
251
|
+
return viewport.getNumberOfSlices();
|
|
252
|
+
},
|
|
253
|
+
get currentStepIndex() {
|
|
254
|
+
return viewport.getSliceIndex();
|
|
255
|
+
},
|
|
256
|
+
get frameTimeVectorEnabled() {
|
|
257
|
+
return true;
|
|
258
|
+
},
|
|
259
|
+
waitForRenderedCount: 0,
|
|
260
|
+
scroll(delta) {
|
|
261
|
+
if (this.waitForRenderedCount <= waitForRendered &&
|
|
262
|
+
viewport.viewportStatus !== ViewportStatus.RENDERED) {
|
|
263
|
+
this.waitForRenderedCount++;
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
this.waitForRenderedCount = 0;
|
|
267
|
+
scroll(viewport, { delta, debounceLoading: debounced });
|
|
268
|
+
},
|
|
269
|
+
play(fps) {
|
|
270
|
+
if (fps) {
|
|
271
|
+
viewport.setPlaybackRate(fps / 24);
|
|
272
|
+
}
|
|
273
|
+
viewport.play();
|
|
274
|
+
return viewport.getFrameRate();
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
}
|
|
234
278
|
function _createVolumeViewportCinePlayContext(viewport, volume) {
|
|
235
279
|
const { volumeId } = volume;
|
|
236
280
|
const cachedScrollInfo = {
|
|
@@ -281,7 +325,7 @@ function _createDynamicVolumeViewportCinePlayContext(volume) {
|
|
|
281
325
|
return false;
|
|
282
326
|
},
|
|
283
327
|
scroll(delta) {
|
|
284
|
-
volume.
|
|
328
|
+
volume.scroll(delta);
|
|
285
329
|
},
|
|
286
330
|
};
|
|
287
331
|
}
|
|
@@ -296,6 +340,9 @@ function _createCinePlayContext(viewport, playClipOptions) {
|
|
|
296
340
|
}
|
|
297
341
|
return _createVolumeViewportCinePlayContext(viewport, volume);
|
|
298
342
|
}
|
|
343
|
+
if (viewport instanceof VideoViewport) {
|
|
344
|
+
return _createVideoViewportCinePlayContext(viewport, playClipOptions.waitForRendered ?? 30);
|
|
345
|
+
}
|
|
299
346
|
throw new Error('Unknown viewport type');
|
|
300
347
|
}
|
|
301
348
|
export { playClip, stopClip };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CINETypes } from '../../types';
|
|
1
|
+
import type { CINETypes } from '../../types';
|
|
2
2
|
declare function addToolState(element: HTMLDivElement, data: CINETypes.ToolData): void;
|
|
3
3
|
declare function getToolState(element: HTMLDivElement): CINETypes.ToolData | undefined;
|
|
4
4
|
declare function getToolStateByViewportId(viewportId: string): CINETypes.ToolData | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ContourSegmentationAnnotation } from '../../types';
|
|
1
|
+
import type { ContourSegmentationAnnotation } from '../../types';
|
|
2
2
|
export declare function addContourSegmentationAnnotation(annotation: ContourSegmentationAnnotation): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ContourSegmentationAnnotation } from '../../types/ContourSegmentationAnnotation';
|
|
1
|
+
import type { ContourSegmentationAnnotation } from '../../types/ContourSegmentationAnnotation';
|
|
2
2
|
export default function areSameSegment(firstAnnotation: ContourSegmentationAnnotation, secondAnnotation: ContourSegmentationAnnotation): boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Annotation } from '../../types';
|
|
2
|
-
import { ContourSegmentationAnnotation } from '../../types/ContourSegmentationAnnotation';
|
|
1
|
+
import type { Annotation } from '../../types';
|
|
2
|
+
import type { ContourSegmentationAnnotation } from '../../types/ContourSegmentationAnnotation';
|
|
3
3
|
export default function isContourSegmentationAnnotation(annotation: Annotation): annotation is ContourSegmentationAnnotation;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ContourSegmentationAnnotation } from '../../types';
|
|
1
|
+
import type { ContourSegmentationAnnotation } from '../../types';
|
|
2
2
|
export declare function removeContourSegmentationAnnotation(annotation: ContourSegmentationAnnotation): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ContourAnnotation } from '../../types/ContourAnnotation';
|
|
1
|
+
import type { ContourAnnotation } from '../../types/ContourAnnotation';
|
|
2
2
|
export default function areCoplanarContours(firstAnnotation: ContourAnnotation, secondAnnotation: ContourAnnotation): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ContourAnnotation } from '../../types/ToolSpecificAnnotationTypes';
|
|
1
|
+
import type { ContourAnnotation } from '../../types/ToolSpecificAnnotationTypes';
|
|
2
2
|
export default function findHandlePolylineIndex(annotation: ContourAnnotation, handleIndex: number): number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InterpolationROIAnnotation } from '../../../types/ToolSpecificAnnotationTypes';
|
|
1
|
+
import type { InterpolationROIAnnotation } from '../../../types/ToolSpecificAnnotationTypes';
|
|
2
2
|
export default function createPolylineToolData(polyline: any, handlePoints: any, referencedToolData: any): InterpolationROIAnnotation;
|
|
@@ -4,7 +4,7 @@ export type PointsXYZI = Types.PointsXYZ & {
|
|
|
4
4
|
I?: boolean[];
|
|
5
5
|
kIndex?: number;
|
|
6
6
|
};
|
|
7
|
-
export type PointsArray3 = Types.
|
|
7
|
+
export type PointsArray3 = Types.IPointsManager<Types.Point3> & {
|
|
8
8
|
I?: boolean[];
|
|
9
9
|
};
|
|
10
10
|
declare function interpolate(viewportData: InterpolationViewportData): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Types } from '@cornerstonejs/core';
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
2
|
export default function reverseIfAntiClockwise(points: Types.Point2[], ...otherListsToReverse: unknown[][]): Types.Point2[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Types } from '@cornerstonejs/core';
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
2
|
import type { ContourAnnotation } from '../../types';
|
|
3
3
|
import type { ContourWindingDirection } from '../../types/ContourAnnotation';
|
|
4
4
|
export default function updateContourPolyline(annotation: ContourAnnotation, polylineData: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { Types } from '@cornerstonejs/core';
|
|
2
|
-
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { Enums } from '@cornerstonejs/core';
|
|
3
|
+
declare function generateImageFromTimeData(dynamicVolume: Types.IDynamicImageVolume, operation: Enums.GenerateImageType, frameNumbers?: number[]): Float32Array;
|
|
3
4
|
export default generateImageFromTimeData;
|
|
@@ -1,42 +1,50 @@
|
|
|
1
1
|
import { Enums } from '@cornerstonejs/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
throw new Error('Please provide two or more time points');
|
|
7
|
-
}
|
|
8
|
-
const typedArrays = dynamicVolume.getScalarDataArrays();
|
|
9
|
-
const arrayLength = typedArrays[0].length;
|
|
10
|
-
const finalArray = new Float32Array(arrayLength);
|
|
11
|
-
if (operation === Enums.DynamicOperatorType.SUM) {
|
|
12
|
-
for (let i = 0; i < numFrames; i++) {
|
|
13
|
-
const currentArray = typedArrays[frames[i]];
|
|
2
|
+
const operationFunctions = {
|
|
3
|
+
[Enums.GenerateImageType.SUM]: (voxelManager, frames, arrayLength) => {
|
|
4
|
+
const finalArray = new Float32Array(arrayLength);
|
|
5
|
+
for (const timepoint of frames) {
|
|
14
6
|
for (let j = 0; j < arrayLength; j++) {
|
|
15
|
-
finalArray[j] +=
|
|
7
|
+
finalArray[j] += voxelManager.getAtIndexAndTimePoint(j, timepoint);
|
|
16
8
|
}
|
|
17
9
|
}
|
|
18
10
|
return finalArray;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (frames.length
|
|
11
|
+
},
|
|
12
|
+
[Enums.GenerateImageType.SUBTRACT]: (voxelManager, frames, arrayLength) => {
|
|
13
|
+
if (frames.length !== 2) {
|
|
22
14
|
throw new Error('Please provide only 2 time points for subtraction.');
|
|
23
15
|
}
|
|
16
|
+
const finalArray = new Float32Array(arrayLength);
|
|
24
17
|
for (let j = 0; j < arrayLength; j++) {
|
|
25
|
-
finalArray[j]
|
|
18
|
+
finalArray[j] =
|
|
19
|
+
voxelManager.getAtIndexAndTimePoint(j, frames[0]) -
|
|
20
|
+
voxelManager.getAtIndexAndTimePoint(j, frames[1]);
|
|
26
21
|
}
|
|
27
22
|
return finalArray;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
},
|
|
24
|
+
[Enums.GenerateImageType.AVERAGE]: (voxelManager, frames, arrayLength) => {
|
|
25
|
+
const finalArray = new Float32Array(arrayLength);
|
|
26
|
+
for (const timepoint of frames) {
|
|
32
27
|
for (let j = 0; j < arrayLength; j++) {
|
|
33
|
-
finalArray[j] +=
|
|
28
|
+
finalArray[j] += voxelManager.getAtIndexAndTimePoint(j, timepoint);
|
|
34
29
|
}
|
|
35
30
|
}
|
|
36
31
|
for (let k = 0; k < arrayLength; k++) {
|
|
37
|
-
finalArray[k]
|
|
32
|
+
finalArray[k] /= frames.length;
|
|
38
33
|
}
|
|
39
34
|
return finalArray;
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
function generateImageFromTimeData(dynamicVolume, operation, frameNumbers) {
|
|
38
|
+
const frames = frameNumbers || [...Array(dynamicVolume.numTimePoints).keys()];
|
|
39
|
+
if (frames.length <= 1) {
|
|
40
|
+
throw new Error('Please provide two or more time points');
|
|
41
|
+
}
|
|
42
|
+
const voxelManager = dynamicVolume.voxelManager;
|
|
43
|
+
const arrayLength = voxelManager.getScalarDataLength();
|
|
44
|
+
const operationFunction = operationFunctions[operation];
|
|
45
|
+
if (!operationFunction) {
|
|
46
|
+
throw new Error(`Unsupported operation: ${operation}`);
|
|
40
47
|
}
|
|
48
|
+
return operationFunction(voxelManager, frames, arrayLength);
|
|
41
49
|
}
|
|
42
50
|
export default generateImageFromTimeData;
|