@cornerstonejs/tools 1.52.0 → 1.54.0
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/cjs/drawingSvg/drawPath.d.ts +11 -0
- package/dist/cjs/drawingSvg/drawPath.js +55 -0
- package/dist/cjs/drawingSvg/drawPath.js.map +1 -0
- package/dist/cjs/drawingSvg/drawPolyline.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawPolyline.js +2 -10
- package/dist/cjs/drawingSvg/drawPolyline.js.map +1 -1
- package/dist/cjs/drawingSvg/index.d.ts +2 -1
- package/dist/cjs/drawingSvg/index.js +3 -1
- package/dist/cjs/drawingSvg/index.js.map +1 -1
- package/dist/cjs/enums/WorkerTypes.d.ts +8 -0
- package/dist/cjs/enums/WorkerTypes.js +12 -0
- package/dist/cjs/enums/WorkerTypes.js.map +1 -0
- package/dist/cjs/enums/index.d.ts +2 -1
- package/dist/cjs/enums/index.js +3 -1
- package/dist/cjs/enums/index.js.map +1 -1
- package/dist/cjs/eventDispatchers/shared/getActiveToolForMouseEvent.js.map +1 -1
- package/dist/cjs/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +1 -1
- package/dist/cjs/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +171 -89
- package/dist/cjs/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js.map +1 -1
- package/dist/cjs/eventListeners/segmentation/imageChangeEventListener.js +4 -3
- package/dist/cjs/eventListeners/segmentation/imageChangeEventListener.js.map +1 -1
- package/dist/cjs/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js +58 -47
- package/dist/cjs/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js.map +1 -1
- package/dist/cjs/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.d.ts +1 -0
- package/dist/cjs/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js +5 -0
- package/dist/cjs/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js.map +1 -1
- package/dist/cjs/stateManagement/annotation/annotationState.d.ts +7 -1
- package/dist/cjs/stateManagement/annotation/annotationState.js +54 -1
- package/dist/cjs/stateManagement/annotation/annotationState.js.map +1 -1
- package/dist/cjs/stateManagement/annotation/helpers/state.d.ts +2 -1
- package/dist/cjs/stateManagement/annotation/helpers/state.js +14 -3
- package/dist/cjs/stateManagement/annotation/helpers/state.js.map +1 -1
- package/dist/cjs/stateManagement/index.d.ts +6 -1
- package/dist/cjs/stateManagement/index.js +6 -1
- package/dist/cjs/stateManagement/index.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/SegmentationStateManager.js +4 -1
- package/dist/cjs/stateManagement/segmentation/SegmentationStateManager.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/addRepresentationData.d.ts +12 -0
- package/dist/cjs/stateManagement/segmentation/addRepresentationData.js +35 -0
- package/dist/cjs/stateManagement/segmentation/addRepresentationData.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/addSegmentationRepresentation.js +32 -14
- package/dist/cjs/stateManagement/segmentation/addSegmentationRepresentation.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/config/segmentationVisibility.js +3 -52
- package/dist/cjs/stateManagement/segmentation/config/segmentationVisibility.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/convertStackToVolumeSegmentation.d.ts +9 -2
- package/dist/cjs/stateManagement/segmentation/convertStackToVolumeSegmentation.js +44 -27
- package/dist/cjs/stateManagement/segmentation/convertStackToVolumeSegmentation.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/convertVolumeToStackSegmentation.d.ts +13 -0
- package/dist/cjs/stateManagement/segmentation/convertVolumeToStackSegmentation.js +52 -26
- package/dist/cjs/stateManagement/segmentation/convertVolumeToStackSegmentation.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/helpers/validateSegmentationInput.js +6 -9
- package/dist/cjs/stateManagement/segmentation/helpers/validateSegmentationInput.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/index.d.ts +3 -1
- package/dist/cjs/stateManagement/segmentation/index.js +5 -1
- package/dist/cjs/stateManagement/segmentation/index.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.d.ts +2 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.js +8 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.d.ts +2 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.js +11 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.d.ts +7 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.js +162 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.d.ts +6 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.js +71 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.d.ts +6 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.js +120 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.d.ts +4 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.js +12 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.d.ts +3 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.js +52 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.d.ts +3 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.js +60 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.d.ts +5 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.js +56 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.d.ts +12 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.js +94 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.d.ts +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.js +74 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.d.ts +2 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.js +83 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/computeAndAddRepresentation.d.ts +3 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/computeAndAddRepresentation.js +64 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/computeAndAddRepresentation.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/index.d.ts +5 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/index.js +12 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/index.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/registerPolySegWorker.d.ts +1 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/registerPolySegWorker.js +27 -0
- package/dist/cjs/stateManagement/segmentation/polySeg/registerPolySegWorker.js.map +1 -0
- package/dist/cjs/stateManagement/segmentation/segmentIndex.js +4 -0
- package/dist/cjs/stateManagement/segmentation/segmentIndex.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/segmentationState.d.ts +6 -1
- package/dist/cjs/stateManagement/segmentation/segmentationState.js +30 -1
- package/dist/cjs/stateManagement/segmentation/segmentationState.js.map +1 -1
- package/dist/cjs/store/ToolGroupManager/ToolGroup.d.ts +3 -1
- package/dist/cjs/store/ToolGroupManager/ToolGroup.js +3 -2
- package/dist/cjs/store/ToolGroupManager/ToolGroup.js.map +1 -1
- package/dist/cjs/tools/ScaleOverlayTool.js +2 -1
- package/dist/cjs/tools/ScaleOverlayTool.js.map +1 -1
- package/dist/cjs/tools/SegmentationIntersectionTool.js +1 -1
- package/dist/cjs/tools/SegmentationIntersectionTool.js.map +1 -1
- package/dist/cjs/tools/annotation/LivewireContourSegmentationTool.js +1 -1
- package/dist/cjs/tools/annotation/LivewireContourSegmentationTool.js.map +1 -1
- package/dist/cjs/tools/annotation/LivewireContourTool.d.ts +4 -3
- package/dist/cjs/tools/annotation/LivewireContourTool.js +26 -26
- package/dist/cjs/tools/annotation/LivewireContourTool.js.map +1 -1
- package/dist/cjs/tools/annotation/PlanarFreehandContourSegmentationTool.d.ts +1 -2
- package/dist/cjs/tools/annotation/PlanarFreehandContourSegmentationTool.js +0 -11
- package/dist/cjs/tools/annotation/PlanarFreehandContourSegmentationTool.js.map +1 -1
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.js +2 -2
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/ProbeTool.js +3 -0
- package/dist/cjs/tools/annotation/ProbeTool.js.map +1 -1
- package/dist/cjs/tools/annotation/SplineROITool.d.ts +6 -3
- package/dist/cjs/tools/annotation/SplineROITool.js +37 -18
- package/dist/cjs/tools/annotation/SplineROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +12 -7
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js +25 -19
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js +16 -10
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js +19 -7
- package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -1
- package/dist/cjs/tools/annotation/splines/LinearSpline.js +1 -1
- package/dist/cjs/tools/annotation/splines/LinearSpline.js.map +1 -1
- package/dist/cjs/tools/annotation/splines/Spline.d.ts +2 -0
- package/dist/cjs/tools/annotation/splines/Spline.js +7 -3
- package/dist/cjs/tools/annotation/splines/Spline.js.map +1 -1
- package/dist/cjs/tools/base/AnnotationTool.js +1 -1
- package/dist/cjs/tools/base/AnnotationTool.js.map +1 -1
- package/dist/cjs/tools/base/BaseTool.js.map +1 -1
- package/dist/cjs/tools/base/ContourBaseTool.d.ts +1 -0
- package/dist/cjs/tools/base/ContourBaseTool.js +18 -1
- package/dist/cjs/tools/base/ContourBaseTool.js.map +1 -1
- package/dist/cjs/tools/base/ContourSegmentationBaseTool.d.ts +1 -2
- package/dist/cjs/tools/base/ContourSegmentationBaseTool.js +28 -24
- package/dist/cjs/tools/base/ContourSegmentationBaseTool.js.map +1 -1
- package/dist/cjs/tools/displayTools/Contour/contourConfig.js +1 -0
- package/dist/cjs/tools/displayTools/Contour/contourConfig.js.map +1 -1
- package/dist/cjs/tools/displayTools/Contour/contourDisplay.js +9 -6
- package/dist/cjs/tools/displayTools/Contour/contourDisplay.js.map +1 -1
- package/dist/cjs/tools/displayTools/Contour/removeContourFromElement.js.map +1 -1
- package/dist/cjs/tools/displayTools/Contour/{addContourSetsToElement.d.ts → vtkContour/addContourSetsToElement.d.ts} +1 -1
- package/dist/cjs/tools/displayTools/Contour/vtkContour/addContourSetsToElement.js.map +1 -0
- package/dist/cjs/tools/displayTools/Contour/vtkContour/addOrUpdateVTKContourSets.d.ts +3 -0
- package/dist/cjs/tools/displayTools/Contour/vtkContour/addOrUpdateVTKContourSets.js +14 -0
- package/dist/cjs/tools/displayTools/Contour/vtkContour/addOrUpdateVTKContourSets.js.map +1 -0
- package/dist/cjs/tools/displayTools/Contour/vtkContour/contourConfigCache.js.map +1 -0
- package/dist/cjs/tools/displayTools/Contour/vtkContour/updateVTKContourSets.d.ts +3 -0
- package/dist/cjs/tools/displayTools/Contour/{updateContourSets.js → vtkContour/updateVTKContourSets.js} +4 -4
- package/dist/cjs/tools/displayTools/Contour/vtkContour/updateVTKContourSets.js.map +1 -0
- package/dist/cjs/tools/displayTools/Contour/{utils.d.ts → vtkContour/utils.d.ts} +2 -2
- package/dist/cjs/tools/displayTools/Contour/vtkContour/utils.js.map +1 -0
- package/dist/cjs/tools/displayTools/Labelmap/addLabelmapToElement.js +1 -1
- package/dist/cjs/tools/displayTools/Labelmap/addLabelmapToElement.js.map +1 -1
- package/dist/cjs/tools/displayTools/Labelmap/index.d.ts +2 -1
- package/dist/cjs/tools/displayTools/Labelmap/index.js +4 -1
- package/dist/cjs/tools/displayTools/Labelmap/index.js.map +1 -1
- package/dist/cjs/tools/displayTools/Labelmap/labelmapDisplay.js +20 -2
- package/dist/cjs/tools/displayTools/Labelmap/labelmapDisplay.js.map +1 -1
- package/dist/cjs/tools/displayTools/Labelmap/validateLabelmap.d.ts +4 -0
- package/dist/cjs/tools/displayTools/Labelmap/validateLabelmap.js +38 -0
- package/dist/cjs/tools/displayTools/Labelmap/validateLabelmap.js.map +1 -0
- package/dist/cjs/tools/displayTools/Surface/addOrUpdateSurfaceToElement.d.ts +3 -0
- package/dist/cjs/tools/displayTools/Surface/addOrUpdateSurfaceToElement.js +112 -0
- package/dist/cjs/tools/displayTools/Surface/addOrUpdateSurfaceToElement.js.map +1 -0
- package/dist/cjs/tools/displayTools/Surface/surfaceConfig.d.ts +3 -0
- package/dist/cjs/tools/displayTools/Surface/surfaceConfig.js +11 -0
- package/dist/cjs/tools/displayTools/Surface/surfaceConfig.js.map +1 -0
- package/dist/cjs/tools/displayTools/Surface/surfaceDisplay.d.ts +7 -0
- package/dist/cjs/tools/displayTools/Surface/surfaceDisplay.js +173 -27
- package/dist/cjs/tools/displayTools/Surface/surfaceDisplay.js.map +1 -1
- package/dist/cjs/tools/displayTools/registerDisplayToolsWorker.d.ts +1 -0
- package/dist/cjs/tools/displayTools/registerDisplayToolsWorker.js +27 -0
- package/dist/cjs/tools/displayTools/registerDisplayToolsWorker.js.map +1 -0
- package/dist/cjs/tools/segmentation/BrushTool.js +1 -1
- package/dist/cjs/tools/segmentation/BrushTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/CircleScissorsTool.js +1 -1
- package/dist/cjs/tools/segmentation/CircleScissorsTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/PaintFillTool.js +1 -1
- package/dist/cjs/tools/segmentation/PaintFillTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/RectangleScissorsTool.js +1 -1
- package/dist/cjs/tools/segmentation/RectangleScissorsTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/SegmentSelectTool.d.ts +6 -2
- package/dist/cjs/tools/segmentation/SegmentSelectTool.js +45 -35
- package/dist/cjs/tools/segmentation/SegmentSelectTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/SphereScissorsTool.js +1 -1
- package/dist/cjs/tools/segmentation/SphereScissorsTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/BrushStrategy.js +7 -5
- package/dist/cjs/tools/segmentation/strategies/BrushStrategy.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/compositions/regionFill.js +1 -1
- package/dist/cjs/tools/segmentation/strategies/compositions/regionFill.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/fillSphere.js +14 -5
- package/dist/cjs/tools/segmentation/strategies/fillSphere.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/utils/getStrategyData.js +21 -9
- package/dist/cjs/tools/segmentation/strategies/utils/getStrategyData.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/utils/stackVolumeCheck.d.ts +5 -5
- package/dist/cjs/tools/segmentation/strategies/utils/stackVolumeCheck.js +15 -8
- package/dist/cjs/tools/segmentation/strategies/utils/stackVolumeCheck.js.map +1 -1
- package/dist/cjs/types/AnnotationTypes.d.ts +2 -0
- package/dist/cjs/types/ContourAnnotation.d.ts +6 -0
- package/dist/cjs/types/ContourAnnotation.js +7 -0
- package/dist/cjs/types/ContourAnnotation.js.map +1 -1
- package/dist/cjs/types/ContourSegmentationAnnotation.d.ts +0 -1
- package/dist/cjs/types/ContourTypes.d.ts +1 -0
- package/dist/cjs/types/EventTypes.d.ts +4 -1
- package/dist/cjs/types/ISpline.d.ts +1 -0
- package/dist/cjs/types/LabelmapTypes.d.ts +5 -1
- package/dist/cjs/types/PolySeg.d.ts +6 -0
- package/dist/cjs/types/PolySeg.js +3 -0
- package/dist/cjs/types/PolySeg.js.map +1 -0
- package/dist/cjs/types/SegmentationStateTypes.d.ts +12 -2
- package/dist/cjs/types/SplineProps.d.ts +1 -0
- package/dist/cjs/types/SurfaceTypes.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/cjs/utilities/boundingBox/getBoundingBoxAroundShape.js +6 -6
- package/dist/cjs/utilities/boundingBox/getBoundingBoxAroundShape.js.map +1 -1
- package/dist/cjs/utilities/contourSegmentation/addContourSegmentationAnnotation.d.ts +2 -0
- package/dist/cjs/utilities/contourSegmentation/addContourSegmentationAnnotation.js +20 -0
- package/dist/cjs/utilities/contourSegmentation/addContourSegmentationAnnotation.js.map +1 -0
- package/dist/cjs/utilities/contourSegmentation/areSameSegment.js +0 -2
- package/dist/cjs/utilities/contourSegmentation/areSameSegment.js.map +1 -1
- package/dist/cjs/utilities/contourSegmentation/index.d.ts +2 -0
- package/dist/cjs/utilities/contourSegmentation/index.js +5 -1
- package/dist/cjs/utilities/contourSegmentation/index.js.map +1 -1
- package/dist/cjs/utilities/contourSegmentation/removeContourSegmentationAnnotation.d.ts +2 -0
- package/dist/cjs/utilities/contourSegmentation/removeContourSegmentationAnnotation.js +19 -0
- package/dist/cjs/utilities/contourSegmentation/removeContourSegmentationAnnotation.js.map +1 -0
- package/dist/cjs/utilities/contours/detectContourHoles.js.map +1 -1
- package/dist/cjs/utilities/contours/generateContourSetsFromLabelmap.js +2 -2
- package/dist/cjs/utilities/contours/generateContourSetsFromLabelmap.js.map +1 -1
- package/dist/cjs/utilities/contours/getContourHolesDataCanvas.d.ts +3 -0
- package/dist/cjs/utilities/contours/getContourHolesDataCanvas.js +21 -0
- package/dist/cjs/utilities/contours/getContourHolesDataCanvas.js.map +1 -0
- package/dist/cjs/utilities/contours/getContourHolesDataWorld.d.ts +3 -0
- package/dist/cjs/utilities/contours/getContourHolesDataWorld.js +10 -0
- package/dist/cjs/utilities/contours/getContourHolesDataWorld.js.map +1 -0
- package/dist/cjs/utilities/contours/getDeduplicatedVTKPolyDataPoints.d.ts +11 -0
- package/dist/cjs/utilities/contours/getDeduplicatedVTKPolyDataPoints.js +50 -0
- package/dist/cjs/utilities/contours/getDeduplicatedVTKPolyDataPoints.js.map +1 -0
- package/dist/cjs/utilities/contours/index.d.ts +5 -2
- package/dist/cjs/utilities/contours/index.js +9 -3
- package/dist/cjs/utilities/contours/index.js.map +1 -1
- package/dist/cjs/utilities/contours/updateContourPolyline.d.ts +10 -0
- package/dist/cjs/utilities/contours/updateContourPolyline.js +64 -0
- package/dist/cjs/utilities/contours/updateContourPolyline.js.map +1 -0
- package/dist/cjs/utilities/index.d.ts +3 -1
- package/dist/cjs/utilities/index.js +5 -1
- package/dist/cjs/utilities/index.js.map +1 -1
- package/dist/cjs/utilities/math/polyline/containsPoint.js.map +1 -1
- package/dist/cjs/utilities/math/polyline/containsPoints.d.ts +2 -0
- package/dist/cjs/utilities/math/polyline/containsPoints.js +16 -0
- package/dist/cjs/utilities/math/polyline/containsPoints.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/getWindingDirection.d.ts +2 -0
- package/dist/cjs/utilities/math/polyline/getWindingDirection.js +12 -0
- package/dist/cjs/utilities/math/polyline/getWindingDirection.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/index.d.ts +4 -1
- package/dist/cjs/utilities/math/polyline/index.js +7 -1
- package/dist/cjs/utilities/math/polyline/index.js.map +1 -1
- package/dist/cjs/utilities/math/polyline/isPointInsidePolyline3D.d.ts +2 -0
- package/dist/cjs/utilities/math/polyline/isPointInsidePolyline3D.js +34 -0
- package/dist/cjs/utilities/math/polyline/isPointInsidePolyline3D.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +1 -0
- package/dist/cjs/utilities/segmentation/contourAndFindLargestBidirectional.js +0 -1
- package/dist/cjs/utilities/segmentation/contourAndFindLargestBidirectional.js.map +1 -1
- package/dist/cjs/utilities/segmentation/getHoveredContourSegmentationAnnotation.d.ts +1 -0
- package/dist/cjs/utilities/segmentation/getHoveredContourSegmentationAnnotation.js +18 -0
- package/dist/cjs/utilities/segmentation/getHoveredContourSegmentationAnnotation.js.map +1 -0
- package/dist/cjs/utilities/segmentation/getSegmentAtLabelmapBorder.d.ts +7 -0
- package/dist/cjs/utilities/segmentation/getSegmentAtLabelmapBorder.js +77 -0
- package/dist/cjs/utilities/segmentation/getSegmentAtLabelmapBorder.js.map +1 -0
- package/dist/cjs/utilities/segmentation/getSegmentAtWorldPoint.d.ts +11 -0
- package/dist/cjs/utilities/segmentation/getSegmentAtWorldPoint.js +82 -0
- package/dist/cjs/utilities/segmentation/getSegmentAtWorldPoint.js.map +1 -0
- package/dist/cjs/utilities/segmentation/getUniqueSegmentIndices.d.ts +2 -0
- package/dist/cjs/utilities/segmentation/getUniqueSegmentIndices.js +59 -0
- package/dist/cjs/utilities/segmentation/getUniqueSegmentIndices.js.map +1 -0
- package/dist/cjs/utilities/segmentation/index.d.ts +5 -1
- package/dist/cjs/utilities/segmentation/index.js +9 -1
- package/dist/cjs/utilities/segmentation/index.js.map +1 -1
- package/dist/cjs/utilities/triggerAnnotationRenderForToolGroupIds.d.ts +2 -0
- package/dist/cjs/utilities/triggerAnnotationRenderForToolGroupIds.js +32 -0
- package/dist/cjs/utilities/triggerAnnotationRenderForToolGroupIds.js.map +1 -0
- package/dist/cjs/workers/clippingPlaneWorker.d.ts +1 -0
- package/dist/cjs/workers/clippingPlaneWorker.js +63 -0
- package/dist/cjs/workers/clippingPlaneWorker.js.map +1 -0
- package/dist/cjs/workers/polySegConverters.d.ts +1 -0
- package/dist/cjs/workers/polySegConverters.js +267 -0
- package/dist/cjs/workers/polySegConverters.js.map +1 -0
- package/dist/esm/drawingSvg/drawPath.js +49 -0
- package/dist/esm/drawingSvg/drawPath.js.map +1 -0
- package/dist/esm/drawingSvg/drawPolyline.js +2 -10
- package/dist/esm/drawingSvg/drawPolyline.js.map +1 -1
- package/dist/esm/drawingSvg/index.js +2 -1
- package/dist/esm/drawingSvg/index.js.map +1 -1
- package/dist/esm/enums/WorkerTypes.js +10 -0
- package/dist/esm/enums/WorkerTypes.js.map +1 -0
- package/dist/esm/enums/index.js +2 -1
- package/dist/esm/enums/index.js.map +1 -1
- package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.js.map +1 -1
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +112 -43
- package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js.map +1 -1
- package/dist/esm/eventListeners/segmentation/imageChangeEventListener.js +3 -3
- package/dist/esm/eventListeners/segmentation/imageChangeEventListener.js.map +1 -1
- package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js +59 -45
- package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js.map +1 -1
- package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js +5 -0
- package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js.map +1 -1
- package/dist/esm/stateManagement/annotation/annotationState.js +46 -1
- package/dist/esm/stateManagement/annotation/annotationState.js.map +1 -1
- package/dist/esm/stateManagement/annotation/helpers/state.js +12 -2
- package/dist/esm/stateManagement/annotation/helpers/state.js.map +1 -1
- package/dist/esm/stateManagement/index.js +2 -2
- package/dist/esm/stateManagement/index.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js +4 -1
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/addRepresentationData.js +30 -0
- package/dist/esm/stateManagement/segmentation/addRepresentationData.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentation.js +32 -15
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentation.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.js +1 -46
- package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/convertStackToVolumeSegmentation.js +42 -27
- package/dist/esm/stateManagement/segmentation/convertStackToVolumeSegmentation.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/convertVolumeToStackSegmentation.js +49 -25
- package/dist/esm/stateManagement/segmentation/convertVolumeToStackSegmentation.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/helpers/validateSegmentationInput.js +6 -6
- package/dist/esm/stateManagement/segmentation/helpers/validateSegmentationInput.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/index.js +3 -1
- package/dist/esm/stateManagement/segmentation/index.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.js +4 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.js +7 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.js +142 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.js +53 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.js +108 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.js +8 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.js +37 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.js +45 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.js +41 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.js +78 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.js +59 -0
- package/dist/esm/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.js +68 -0
- package/dist/esm/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/computeAndAddRepresentation.js +47 -0
- package/dist/esm/stateManagement/segmentation/polySeg/computeAndAddRepresentation.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/index.js +6 -0
- package/dist/esm/stateManagement/segmentation/polySeg/index.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/polySeg/registerPolySegWorker.js +23 -0
- package/dist/esm/stateManagement/segmentation/polySeg/registerPolySegWorker.js.map +1 -0
- package/dist/esm/stateManagement/segmentation/segmentIndex.js +4 -0
- package/dist/esm/stateManagement/segmentation/segmentIndex.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/segmentationState.js +28 -1
- package/dist/esm/stateManagement/segmentation/segmentationState.js.map +1 -1
- package/dist/esm/store/ToolGroupManager/ToolGroup.js +3 -2
- package/dist/esm/store/ToolGroupManager/ToolGroup.js.map +1 -1
- package/dist/esm/tools/ScaleOverlayTool.js +2 -1
- package/dist/esm/tools/ScaleOverlayTool.js.map +1 -1
- package/dist/esm/tools/SegmentationIntersectionTool.js +1 -1
- package/dist/esm/tools/SegmentationIntersectionTool.js.map +1 -1
- package/dist/esm/tools/annotation/LivewireContourSegmentationTool.js +1 -1
- package/dist/esm/tools/annotation/LivewireContourSegmentationTool.js.map +1 -1
- package/dist/esm/tools/annotation/LivewireContourTool.js +28 -28
- package/dist/esm/tools/annotation/LivewireContourTool.js.map +1 -1
- package/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.js +0 -11
- package/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.js.map +1 -1
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js +3 -3
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js.map +1 -1
- package/dist/esm/tools/annotation/ProbeTool.js +3 -0
- package/dist/esm/tools/annotation/ProbeTool.js.map +1 -1
- package/dist/esm/tools/annotation/SplineROITool.js +37 -19
- package/dist/esm/tools/annotation/SplineROITool.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +12 -7
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +26 -20
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +16 -10
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js +20 -8
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -1
- package/dist/esm/tools/annotation/splines/LinearSpline.js +1 -1
- package/dist/esm/tools/annotation/splines/LinearSpline.js.map +1 -1
- package/dist/esm/tools/annotation/splines/Spline.js +5 -1
- package/dist/esm/tools/annotation/splines/Spline.js.map +1 -1
- package/dist/esm/tools/base/AnnotationTool.js +1 -1
- package/dist/esm/tools/base/AnnotationTool.js.map +1 -1
- package/dist/esm/tools/base/BaseTool.js +1 -1
- package/dist/esm/tools/base/BaseTool.js.map +1 -1
- package/dist/esm/tools/base/ContourBaseTool.js +20 -3
- package/dist/esm/tools/base/ContourBaseTool.js.map +1 -1
- package/dist/esm/tools/base/ContourSegmentationBaseTool.js +28 -24
- package/dist/esm/tools/base/ContourSegmentationBaseTool.js.map +1 -1
- package/dist/esm/tools/displayTools/Contour/contourConfig.js +1 -0
- package/dist/esm/tools/displayTools/Contour/contourConfig.js.map +1 -1
- package/dist/esm/tools/displayTools/Contour/contourDisplay.js +10 -7
- package/dist/esm/tools/displayTools/Contour/contourDisplay.js.map +1 -1
- package/dist/esm/tools/displayTools/Contour/removeContourFromElement.js.map +1 -1
- package/dist/esm/tools/displayTools/Contour/vtkContour/addContourSetsToElement.js.map +1 -0
- package/dist/esm/tools/displayTools/Contour/{addOrUpdateContourSets.js → vtkContour/addOrUpdateVTKContourSets.js} +4 -4
- package/dist/esm/tools/displayTools/Contour/vtkContour/addOrUpdateVTKContourSets.js.map +1 -0
- package/dist/esm/tools/displayTools/Contour/vtkContour/contourConfigCache.js.map +1 -0
- package/dist/esm/tools/displayTools/Contour/{updateContourSets.js → vtkContour/updateVTKContourSets.js} +2 -2
- package/dist/esm/tools/displayTools/Contour/vtkContour/updateVTKContourSets.js.map +1 -0
- package/dist/esm/tools/displayTools/Contour/vtkContour/utils.js.map +1 -0
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.js +1 -1
- package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.js.map +1 -1
- package/dist/esm/tools/displayTools/Labelmap/index.js +2 -1
- package/dist/esm/tools/displayTools/Labelmap/index.js.map +1 -1
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js +20 -2
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js.map +1 -1
- package/dist/esm/tools/displayTools/Labelmap/validateLabelmap.js +33 -0
- package/dist/esm/tools/displayTools/Labelmap/validateLabelmap.js.map +1 -0
- package/dist/esm/tools/displayTools/Surface/addOrUpdateSurfaceToElement.js +106 -0
- package/dist/esm/tools/displayTools/Surface/addOrUpdateSurfaceToElement.js.map +1 -0
- package/dist/esm/tools/displayTools/Surface/surfaceConfig.js +9 -0
- package/dist/esm/tools/displayTools/Surface/surfaceConfig.js.map +1 -0
- package/dist/esm/tools/displayTools/Surface/surfaceDisplay.js +162 -28
- package/dist/esm/tools/displayTools/Surface/surfaceDisplay.js.map +1 -1
- package/dist/esm/tools/displayTools/registerDisplayToolsWorker.js +23 -0
- package/dist/esm/tools/displayTools/registerDisplayToolsWorker.js.map +1 -0
- package/dist/esm/tools/segmentation/BrushTool.js +1 -1
- package/dist/esm/tools/segmentation/BrushTool.js.map +1 -1
- package/dist/esm/tools/segmentation/CircleScissorsTool.js +1 -1
- package/dist/esm/tools/segmentation/CircleScissorsTool.js.map +1 -1
- package/dist/esm/tools/segmentation/PaintFillTool.js +1 -1
- package/dist/esm/tools/segmentation/PaintFillTool.js.map +1 -1
- package/dist/esm/tools/segmentation/RectangleScissorsTool.js +1 -1
- package/dist/esm/tools/segmentation/RectangleScissorsTool.js.map +1 -1
- package/dist/esm/tools/segmentation/SegmentSelectTool.js +47 -37
- package/dist/esm/tools/segmentation/SegmentSelectTool.js.map +1 -1
- package/dist/esm/tools/segmentation/SphereScissorsTool.js +1 -1
- package/dist/esm/tools/segmentation/SphereScissorsTool.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.js +7 -5
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/compositions/regionFill.js +1 -1
- package/dist/esm/tools/segmentation/strategies/compositions/regionFill.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/fillSphere.js +14 -5
- package/dist/esm/tools/segmentation/strategies/fillSphere.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.js +21 -9
- package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.js +15 -7
- package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.js.map +1 -1
- package/dist/esm/types/ContourAnnotation.js +6 -1
- package/dist/esm/types/ContourAnnotation.js.map +1 -1
- package/dist/esm/types/PolySeg.js +2 -0
- package/dist/esm/types/PolySeg.js.map +1 -0
- package/dist/esm/utilities/boundingBox/getBoundingBoxAroundShape.js +3 -2
- package/dist/esm/utilities/boundingBox/getBoundingBoxAroundShape.js.map +1 -1
- package/dist/esm/utilities/contourSegmentation/addContourSegmentationAnnotation.js +16 -0
- package/dist/esm/utilities/contourSegmentation/addContourSegmentationAnnotation.js.map +1 -0
- package/dist/esm/utilities/contourSegmentation/areSameSegment.js +0 -2
- package/dist/esm/utilities/contourSegmentation/areSameSegment.js.map +1 -1
- package/dist/esm/utilities/contourSegmentation/index.js +2 -0
- package/dist/esm/utilities/contourSegmentation/index.js.map +1 -1
- package/dist/esm/utilities/contourSegmentation/removeContourSegmentationAnnotation.js +15 -0
- package/dist/esm/utilities/contourSegmentation/removeContourSegmentationAnnotation.js.map +1 -0
- package/dist/esm/utilities/contours/detectContourHoles.js.map +1 -1
- package/dist/esm/utilities/contours/generateContourSetsFromLabelmap.js +2 -2
- package/dist/esm/utilities/contours/generateContourSetsFromLabelmap.js.map +1 -1
- package/dist/esm/utilities/contours/getContourHolesDataCanvas.js +15 -0
- package/dist/esm/utilities/contours/getContourHolesDataCanvas.js.map +1 -0
- package/dist/esm/utilities/contours/getContourHolesDataWorld.js +6 -0
- package/dist/esm/utilities/contours/getContourHolesDataWorld.js.map +1 -0
- package/dist/esm/utilities/contours/getDeduplicatedVTKPolyDataPoints.js +46 -0
- package/dist/esm/utilities/contours/getDeduplicatedVTKPolyDataPoints.js.map +1 -0
- package/dist/esm/utilities/contours/index.js +5 -2
- package/dist/esm/utilities/contours/index.js.map +1 -1
- package/dist/esm/utilities/contours/updateContourPolyline.js +38 -0
- package/dist/esm/utilities/contours/updateContourPolyline.js.map +1 -0
- package/dist/esm/utilities/index.js +3 -1
- package/dist/esm/utilities/index.js.map +1 -1
- package/dist/esm/utilities/math/polyline/containsPoint.js.map +1 -1
- package/dist/esm/utilities/math/polyline/containsPoints.js +10 -0
- package/dist/esm/utilities/math/polyline/containsPoints.js.map +1 -0
- package/dist/esm/utilities/math/polyline/getWindingDirection.js +6 -0
- package/dist/esm/utilities/math/polyline/getWindingDirection.js.map +1 -0
- package/dist/esm/utilities/math/polyline/index.js +4 -1
- package/dist/esm/utilities/math/polyline/index.js.map +1 -1
- package/dist/esm/utilities/math/polyline/isPointInsidePolyline3D.js +27 -0
- package/dist/esm/utilities/math/polyline/isPointInsidePolyline3D.js.map +1 -0
- package/dist/esm/utilities/segmentation/contourAndFindLargestBidirectional.js +0 -1
- package/dist/esm/utilities/segmentation/contourAndFindLargestBidirectional.js.map +1 -1
- package/dist/esm/utilities/segmentation/getHoveredContourSegmentationAnnotation.js +14 -0
- package/dist/esm/utilities/segmentation/getHoveredContourSegmentationAnnotation.js.map +1 -0
- package/dist/esm/utilities/segmentation/getSegmentAtLabelmapBorder.js +73 -0
- package/dist/esm/utilities/segmentation/getSegmentAtLabelmapBorder.js.map +1 -0
- package/dist/esm/utilities/segmentation/getSegmentAtWorldPoint.js +75 -0
- package/dist/esm/utilities/segmentation/getSegmentAtWorldPoint.js.map +1 -0
- package/dist/esm/utilities/segmentation/getUniqueSegmentIndices.js +55 -0
- package/dist/esm/utilities/segmentation/getUniqueSegmentIndices.js.map +1 -0
- package/dist/esm/utilities/segmentation/index.js +5 -1
- package/dist/esm/utilities/segmentation/index.js.map +1 -1
- package/dist/esm/utilities/triggerAnnotationRenderForToolGroupIds.js +25 -0
- package/dist/esm/utilities/triggerAnnotationRenderForToolGroupIds.js.map +1 -0
- package/dist/esm/workers/clippingPlaneWorker.js +58 -0
- package/dist/esm/workers/clippingPlaneWorker.js.map +1 -0
- package/dist/esm/workers/polySegConverters.js +241 -0
- package/dist/esm/workers/polySegConverters.js.map +1 -0
- package/dist/types/drawingSvg/drawPath.d.ts +12 -0
- package/dist/types/drawingSvg/drawPath.d.ts.map +1 -0
- package/dist/types/drawingSvg/drawPolyline.d.ts +1 -1
- package/dist/types/drawingSvg/drawPolyline.d.ts.map +1 -1
- package/dist/types/drawingSvg/index.d.ts +2 -1
- package/dist/types/drawingSvg/index.d.ts.map +1 -1
- package/dist/types/enums/WorkerTypes.d.ts +9 -0
- package/dist/types/enums/WorkerTypes.d.ts.map +1 -0
- package/dist/types/enums/index.d.ts +2 -1
- package/dist/types/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +1 -1
- package/dist/types/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts.map +1 -1
- package/dist/types/eventListeners/segmentation/imageChangeEventListener.d.ts.map +1 -1
- package/dist/types/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.d.ts.map +1 -1
- package/dist/types/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.d.ts +1 -0
- package/dist/types/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.d.ts.map +1 -1
- package/dist/types/stateManagement/annotation/annotationState.d.ts +7 -1
- package/dist/types/stateManagement/annotation/annotationState.d.ts.map +1 -1
- package/dist/types/stateManagement/annotation/helpers/state.d.ts +2 -1
- package/dist/types/stateManagement/annotation/helpers/state.d.ts.map +1 -1
- package/dist/types/stateManagement/index.d.ts +6 -1
- package/dist/types/stateManagement/segmentation/SegmentationStateManager.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/addRepresentationData.d.ts +13 -0
- package/dist/types/stateManagement/segmentation/addRepresentationData.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/addSegmentationRepresentation.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/config/segmentationVisibility.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/convertStackToVolumeSegmentation.d.ts +9 -2
- package/dist/types/stateManagement/segmentation/convertStackToVolumeSegmentation.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/convertVolumeToStackSegmentation.d.ts +13 -0
- package/dist/types/stateManagement/segmentation/convertVolumeToStackSegmentation.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/helpers/validateSegmentationInput.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/index.d.ts +3 -1
- package/dist/types/stateManagement/segmentation/index.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.d.ts +3 -0
- package/dist/types/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.d.ts +3 -0
- package/dist/types/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.d.ts +8 -0
- package/dist/types/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.d.ts +7 -0
- package/dist/types/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.d.ts +7 -0
- package/dist/types/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.d.ts +5 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.d.ts +4 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.d.ts +4 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.d.ts +6 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.d.ts +13 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.d.ts +2 -0
- package/dist/types/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.d.ts +3 -0
- package/dist/types/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/computeAndAddRepresentation.d.ts +4 -0
- package/dist/types/stateManagement/segmentation/polySeg/computeAndAddRepresentation.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/index.d.ts +6 -0
- package/dist/types/stateManagement/segmentation/polySeg/index.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/polySeg/registerPolySegWorker.d.ts +2 -0
- package/dist/types/stateManagement/segmentation/polySeg/registerPolySegWorker.d.ts.map +1 -0
- package/dist/types/stateManagement/segmentation/segmentIndex.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/segmentationState.d.ts +6 -1
- package/dist/types/stateManagement/segmentation/segmentationState.d.ts.map +1 -1
- package/dist/types/store/ToolGroupManager/ToolGroup.d.ts +3 -1
- package/dist/types/store/ToolGroupManager/ToolGroup.d.ts.map +1 -1
- package/dist/types/tools/ScaleOverlayTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/LivewireContourTool.d.ts +4 -3
- package/dist/types/tools/annotation/LivewireContourTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/PlanarFreehandContourSegmentationTool.d.ts +1 -2
- package/dist/types/tools/annotation/PlanarFreehandContourSegmentationTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/PlanarFreehandROITool.d.ts.map +1 -1
- package/dist/types/tools/annotation/ProbeTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/SplineROITool.d.ts +6 -3
- package/dist/types/tools/annotation/SplineROITool.d.ts.map +1 -1
- package/dist/types/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts.map +1 -1
- package/dist/types/tools/annotation/planarFreehandROITool/drawLoop.d.ts.map +1 -1
- package/dist/types/tools/annotation/planarFreehandROITool/openContourEditLoop.d.ts.map +1 -1
- package/dist/types/tools/annotation/planarFreehandROITool/renderMethods.d.ts.map +1 -1
- package/dist/types/tools/annotation/splines/Spline.d.ts +2 -0
- package/dist/types/tools/annotation/splines/Spline.d.ts.map +1 -1
- package/dist/types/tools/base/AnnotationTool.d.ts.map +1 -1
- package/dist/types/tools/base/BaseTool.d.ts.map +1 -1
- package/dist/types/tools/base/ContourBaseTool.d.ts +1 -0
- package/dist/types/tools/base/ContourBaseTool.d.ts.map +1 -1
- package/dist/types/tools/base/ContourSegmentationBaseTool.d.ts +1 -2
- package/dist/types/tools/base/ContourSegmentationBaseTool.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Contour/contourConfig.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Contour/contourDisplay.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Contour/removeContourFromElement.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Contour/{addContourSetsToElement.d.ts → vtkContour/addContourSetsToElement.d.ts} +1 -1
- package/dist/types/tools/displayTools/Contour/vtkContour/addContourSetsToElement.d.ts.map +1 -0
- package/dist/types/tools/displayTools/Contour/vtkContour/addOrUpdateVTKContourSets.d.ts +4 -0
- package/dist/types/tools/displayTools/Contour/vtkContour/addOrUpdateVTKContourSets.d.ts.map +1 -0
- package/dist/types/tools/displayTools/Contour/vtkContour/contourConfigCache.d.ts.map +1 -0
- package/dist/types/tools/displayTools/Contour/vtkContour/updateVTKContourSets.d.ts +4 -0
- package/dist/types/tools/displayTools/Contour/vtkContour/updateVTKContourSets.d.ts.map +1 -0
- package/dist/types/tools/displayTools/Contour/{utils.d.ts → vtkContour/utils.d.ts} +2 -2
- package/dist/types/tools/displayTools/Contour/vtkContour/utils.d.ts.map +1 -0
- package/dist/types/tools/displayTools/Labelmap/index.d.ts +2 -1
- package/dist/types/tools/displayTools/Labelmap/index.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Labelmap/labelmapDisplay.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Labelmap/validateLabelmap.d.ts +5 -0
- package/dist/types/tools/displayTools/Labelmap/validateLabelmap.d.ts.map +1 -0
- package/dist/types/tools/displayTools/Surface/addOrUpdateSurfaceToElement.d.ts +4 -0
- package/dist/types/tools/displayTools/Surface/addOrUpdateSurfaceToElement.d.ts.map +1 -0
- package/dist/types/tools/displayTools/Surface/surfaceConfig.d.ts +4 -0
- package/dist/types/tools/displayTools/Surface/surfaceConfig.d.ts.map +1 -0
- package/dist/types/tools/displayTools/Surface/surfaceDisplay.d.ts +7 -0
- package/dist/types/tools/displayTools/Surface/surfaceDisplay.d.ts.map +1 -1
- package/dist/types/tools/displayTools/registerDisplayToolsWorker.d.ts +2 -0
- package/dist/types/tools/displayTools/registerDisplayToolsWorker.d.ts.map +1 -0
- package/dist/types/tools/segmentation/CircleScissorsTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/RectangleScissorsTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/SegmentSelectTool.d.ts +6 -2
- package/dist/types/tools/segmentation/SegmentSelectTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/SphereScissorsTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/strategies/BrushStrategy.d.ts.map +1 -1
- package/dist/types/tools/segmentation/strategies/fillSphere.d.ts.map +1 -1
- package/dist/types/tools/segmentation/strategies/utils/getStrategyData.d.ts.map +1 -1
- package/dist/types/tools/segmentation/strategies/utils/stackVolumeCheck.d.ts +5 -5
- package/dist/types/tools/segmentation/strategies/utils/stackVolumeCheck.d.ts.map +1 -1
- package/dist/types/types/AnnotationTypes.d.ts +2 -0
- package/dist/types/types/AnnotationTypes.d.ts.map +1 -1
- package/dist/types/types/ContourAnnotation.d.ts +6 -0
- package/dist/types/types/ContourAnnotation.d.ts.map +1 -1
- package/dist/types/types/ContourSegmentationAnnotation.d.ts +0 -1
- package/dist/types/types/ContourSegmentationAnnotation.d.ts.map +1 -1
- package/dist/types/types/ContourTypes.d.ts +1 -0
- package/dist/types/types/ContourTypes.d.ts.map +1 -1
- package/dist/types/types/EventTypes.d.ts +4 -1
- package/dist/types/types/EventTypes.d.ts.map +1 -1
- package/dist/types/types/ISpline.d.ts +1 -0
- package/dist/types/types/ISpline.d.ts.map +1 -1
- package/dist/types/types/LabelmapTypes.d.ts +5 -1
- package/dist/types/types/LabelmapTypes.d.ts.map +1 -1
- package/dist/types/types/PolySeg.d.ts +7 -0
- package/dist/types/types/PolySeg.d.ts.map +1 -0
- package/dist/types/types/SegmentationStateTypes.d.ts +12 -2
- package/dist/types/types/SegmentationStateTypes.d.ts.map +1 -1
- package/dist/types/types/SplineProps.d.ts +1 -0
- package/dist/types/types/SplineProps.d.ts.map +1 -1
- package/dist/types/types/SurfaceTypes.d.ts +1 -1
- package/dist/types/types/SurfaceTypes.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/utilities/boundingBox/getBoundingBoxAroundShape.d.ts.map +1 -1
- package/dist/types/utilities/contourSegmentation/addContourSegmentationAnnotation.d.ts +3 -0
- package/dist/types/utilities/contourSegmentation/addContourSegmentationAnnotation.d.ts.map +1 -0
- package/dist/types/utilities/contourSegmentation/areSameSegment.d.ts.map +1 -1
- package/dist/types/utilities/contourSegmentation/index.d.ts +2 -0
- package/dist/types/utilities/contourSegmentation/index.d.ts.map +1 -1
- package/dist/types/utilities/contourSegmentation/removeContourSegmentationAnnotation.d.ts +3 -0
- package/dist/types/utilities/contourSegmentation/removeContourSegmentationAnnotation.d.ts.map +1 -0
- package/dist/types/utilities/contours/detectContourHoles.d.ts.map +1 -1
- package/dist/types/utilities/contours/getContourHolesDataCanvas.d.ts +4 -0
- package/dist/types/utilities/contours/getContourHolesDataCanvas.d.ts.map +1 -0
- package/dist/types/utilities/contours/getContourHolesDataWorld.d.ts +4 -0
- package/dist/types/utilities/contours/getContourHolesDataWorld.d.ts.map +1 -0
- package/dist/types/utilities/contours/getDeduplicatedVTKPolyDataPoints.d.ts +12 -0
- package/dist/types/utilities/contours/getDeduplicatedVTKPolyDataPoints.d.ts.map +1 -0
- package/dist/types/utilities/contours/index.d.ts +5 -2
- package/dist/types/utilities/contours/index.d.ts.map +1 -1
- package/dist/types/utilities/contours/updateContourPolyline.d.ts +11 -0
- package/dist/types/utilities/contours/updateContourPolyline.d.ts.map +1 -0
- package/dist/types/utilities/index.d.ts +3 -1
- package/dist/types/utilities/index.d.ts.map +1 -1
- package/dist/types/utilities/math/polyline/containsPoint.d.ts.map +1 -1
- package/dist/types/utilities/math/polyline/containsPoints.d.ts +3 -0
- package/dist/types/utilities/math/polyline/containsPoints.d.ts.map +1 -0
- package/dist/types/utilities/math/polyline/getWindingDirection.d.ts +3 -0
- package/dist/types/utilities/math/polyline/getWindingDirection.d.ts.map +1 -0
- package/dist/types/utilities/math/polyline/index.d.ts +4 -1
- package/dist/types/utilities/math/polyline/index.d.ts.map +1 -1
- package/dist/types/utilities/math/polyline/isPointInsidePolyline3D.d.ts +3 -0
- package/dist/types/utilities/math/polyline/isPointInsidePolyline3D.d.ts.map +1 -0
- package/dist/types/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +1 -0
- package/dist/types/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts.map +1 -1
- package/dist/types/utilities/segmentation/contourAndFindLargestBidirectional.d.ts.map +1 -1
- package/dist/types/utilities/segmentation/getHoveredContourSegmentationAnnotation.d.ts +2 -0
- package/dist/types/utilities/segmentation/getHoveredContourSegmentationAnnotation.d.ts.map +1 -0
- package/dist/types/utilities/segmentation/getSegmentAtLabelmapBorder.d.ts +8 -0
- package/dist/types/utilities/segmentation/getSegmentAtLabelmapBorder.d.ts.map +1 -0
- package/dist/types/utilities/segmentation/getSegmentAtWorldPoint.d.ts +12 -0
- package/dist/types/utilities/segmentation/getSegmentAtWorldPoint.d.ts.map +1 -0
- package/dist/types/utilities/segmentation/getUniqueSegmentIndices.d.ts +3 -0
- package/dist/types/utilities/segmentation/getUniqueSegmentIndices.d.ts.map +1 -0
- package/dist/types/utilities/segmentation/index.d.ts +5 -1
- package/dist/types/utilities/segmentation/index.d.ts.map +1 -1
- package/dist/types/utilities/triggerAnnotationRenderForToolGroupIds.d.ts +3 -0
- package/dist/types/utilities/triggerAnnotationRenderForToolGroupIds.d.ts.map +1 -0
- package/dist/types/workers/clippingPlaneWorker.d.ts +2 -0
- package/dist/types/workers/clippingPlaneWorker.d.ts.map +1 -0
- package/dist/types/workers/polySegConverters.d.ts +2 -0
- package/dist/types/workers/polySegConverters.d.ts.map +1 -0
- package/dist/umd/17dd54813d5acc10bf8f.wasm +0 -0
- package/dist/umd/444.index.js +3 -0
- package/dist/umd/444.index.js.LICENSE.txt +5 -0
- package/dist/umd/444.index.js.map +1 -0
- package/dist/umd/78.index.js +3 -0
- package/dist/umd/78.index.js.LICENSE.txt +5 -0
- package/dist/umd/78.index.js.map +1 -0
- package/dist/umd/985.index.js +2 -0
- package/dist/umd/985.index.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +5 -3
- package/src/drawingSvg/drawPath.ts +96 -0
- package/src/drawingSvg/drawPolyline.ts +12 -16
- package/src/drawingSvg/index.ts +2 -0
- package/src/enums/WorkerTypes.ts +16 -0
- package/src/enums/index.js +2 -0
- package/src/eventDispatchers/shared/getActiveToolForMouseEvent.ts +1 -1
- package/src/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.ts +204 -75
- package/src/eventListeners/segmentation/imageChangeEventListener.ts +3 -4
- package/src/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.ts +97 -69
- package/src/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.ts +11 -0
- package/src/stateManagement/annotation/annotationState.ts +107 -0
- package/src/stateManagement/annotation/helpers/state.ts +29 -1
- package/src/stateManagement/index.js +10 -0
- package/src/stateManagement/segmentation/SegmentationStateManager.ts +4 -1
- package/src/stateManagement/segmentation/addRepresentationData.ts +71 -0
- package/src/stateManagement/segmentation/addSegmentationRepresentation.ts +39 -16
- package/src/stateManagement/segmentation/config/segmentationVisibility.ts +1 -59
- package/src/stateManagement/segmentation/convertStackToVolumeSegmentation.ts +74 -37
- package/src/stateManagement/segmentation/convertVolumeToStackSegmentation.ts +102 -38
- package/src/stateManagement/segmentation/helpers/validateSegmentationInput.ts +13 -8
- package/src/stateManagement/segmentation/index.ts +9 -2
- package/src/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.ts +17 -0
- package/src/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.ts +25 -0
- package/src/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.ts +273 -0
- package/src/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.ts +89 -0
- package/src/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.ts +193 -0
- package/src/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.ts +26 -0
- package/src/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.ts +62 -0
- package/src/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.ts +81 -0
- package/src/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.ts +81 -0
- package/src/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.ts +167 -0
- package/src/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.ts +95 -0
- package/src/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.ts +123 -0
- package/src/stateManagement/segmentation/polySeg/computeAndAddRepresentation.ts +97 -0
- package/src/stateManagement/segmentation/polySeg/index.ts +12 -0
- package/src/stateManagement/segmentation/polySeg/registerPolySegWorker.ts +34 -0
- package/src/stateManagement/segmentation/segmentIndex.ts +5 -0
- package/src/stateManagement/segmentation/segmentationState.ts +62 -0
- package/src/store/ToolGroupManager/ToolGroup.ts +9 -2
- package/src/tools/ScaleOverlayTool.ts +4 -1
- package/src/tools/SegmentationIntersectionTool.ts +1 -1
- package/src/tools/annotation/LivewireContourSegmentationTool.ts +1 -1
- package/src/tools/annotation/LivewireContourTool.ts +65 -38
- package/src/tools/annotation/PlanarFreehandContourSegmentationTool.ts +1 -22
- package/src/tools/annotation/PlanarFreehandROITool.ts +8 -5
- package/src/tools/annotation/ProbeTool.ts +4 -0
- package/src/tools/annotation/SplineROITool.ts +76 -29
- package/src/tools/annotation/planarFreehandROITool/closedContourEditLoop.ts +20 -11
- package/src/tools/annotation/planarFreehandROITool/drawLoop.ts +42 -23
- package/src/tools/annotation/planarFreehandROITool/openContourEditLoop.ts +28 -13
- package/src/tools/annotation/planarFreehandROITool/openContourEndEditLoop.ts +1 -1
- package/src/tools/annotation/planarFreehandROITool/renderMethods.ts +28 -10
- package/src/tools/annotation/splines/LinearSpline.ts +1 -1
- package/src/tools/annotation/splines/Spline.ts +13 -1
- package/src/tools/base/AnnotationTool.ts +2 -1
- package/src/tools/base/BaseTool.ts +1 -6
- package/src/tools/base/ContourBaseTool.ts +46 -4
- package/src/tools/base/ContourSegmentationBaseTool.ts +51 -42
- package/src/tools/displayTools/Contour/contourConfig.ts +1 -0
- package/src/tools/displayTools/Contour/contourDisplay.ts +82 -9
- package/src/tools/displayTools/Contour/removeContourFromElement.ts +2 -0
- package/src/tools/displayTools/Contour/{addContourSetsToElement.ts → vtkContour/addContourSetsToElement.ts} +1 -1
- package/src/tools/displayTools/Contour/{addOrUpdateContourSets.ts → vtkContour/addOrUpdateVTKContourSets.ts} +4 -4
- package/src/tools/displayTools/Contour/{updateContourSets.ts → vtkContour/updateVTKContourSets.ts} +2 -2
- package/src/tools/displayTools/Contour/{utils.ts → vtkContour/utils.ts} +1 -1
- package/src/tools/displayTools/Labelmap/addLabelmapToElement.ts +1 -1
- package/src/tools/displayTools/Labelmap/index.ts +10 -1
- package/src/tools/displayTools/Labelmap/labelmapDisplay.ts +39 -4
- package/src/tools/displayTools/Labelmap/validateLabelmap.ts +71 -0
- package/src/tools/displayTools/Surface/addOrUpdateSurfaceToElement.ts +172 -0
- package/src/tools/displayTools/Surface/surfaceConfig.ts +12 -0
- package/src/tools/displayTools/Surface/surfaceDisplay.ts +275 -35
- package/src/tools/displayTools/registerDisplayToolsWorker.ts +34 -0
- package/src/tools/segmentation/BrushTool.ts +1 -1
- package/src/tools/segmentation/CircleScissorsTool.ts +3 -1
- package/src/tools/segmentation/PaintFillTool.ts +1 -1
- package/src/tools/segmentation/RectangleScissorsTool.ts +3 -1
- package/src/tools/segmentation/SegmentSelectTool.ts +70 -75
- package/src/tools/segmentation/SphereScissorsTool.ts +3 -1
- package/src/tools/segmentation/strategies/BrushStrategy.ts +12 -9
- package/src/tools/segmentation/strategies/compositions/regionFill.ts +1 -1
- package/src/tools/segmentation/strategies/fillSphere.ts +13 -5
- package/src/tools/segmentation/strategies/utils/getStrategyData.ts +30 -15
- package/src/tools/segmentation/strategies/utils/stackVolumeCheck.ts +24 -17
- package/src/types/AnnotationTypes.ts +14 -0
- package/src/types/ContourAnnotation.ts +13 -0
- package/src/types/ContourSegmentationAnnotation.ts +0 -1
- package/src/types/ContourTypes.ts +3 -0
- package/src/types/EventTypes.ts +9 -0
- package/src/types/ISpline.ts +3 -0
- package/src/types/LabelmapTypes.ts +7 -1
- package/src/types/PolySeg.ts +7 -0
- package/src/types/SegmentationStateTypes.ts +20 -4
- package/src/types/SplineProps.ts +10 -0
- package/src/types/SurfaceTypes.ts +1 -1
- package/src/types/index.ts +3 -0
- package/src/utilities/boundingBox/getBoundingBoxAroundShape.ts +4 -2
- package/src/utilities/contourSegmentation/addContourSegmentationAnnotation.ts +29 -0
- package/src/utilities/contourSegmentation/areSameSegment.ts +0 -2
- package/src/utilities/contourSegmentation/index.ts +2 -0
- package/src/utilities/contourSegmentation/removeContourSegmentationAnnotation.ts +30 -0
- package/src/utilities/contours/detectContourHoles.ts +2 -0
- package/src/utilities/contours/generateContourSetsFromLabelmap.ts +2 -2
- package/src/utilities/contours/getContourHolesDataCanvas.ts +33 -0
- package/src/utilities/contours/getContourHolesDataWorld.ts +19 -0
- package/src/utilities/contours/getDeduplicatedVTKPolyDataPoints.ts +66 -0
- package/src/utilities/contours/index.ts +8 -2
- package/src/utilities/contours/updateContourPolyline.ts +74 -0
- package/src/utilities/index.ts +4 -0
- package/src/utilities/math/polyline/containsPoint.ts +4 -2
- package/src/utilities/math/polyline/containsPoints.ts +22 -0
- package/src/utilities/math/polyline/getWindingDirection.ts +14 -0
- package/src/utilities/math/polyline/index.ts +6 -0
- package/src/utilities/math/polyline/isPointInsidePolyline3D.ts +56 -0
- package/src/utilities/math/polyline/planarFreehandROIInternalTypes.ts +1 -0
- package/src/utilities/segmentation/contourAndFindLargestBidirectional.ts +0 -1
- package/src/utilities/segmentation/getHoveredContourSegmentationAnnotation.ts +25 -0
- package/src/utilities/segmentation/getSegmentAtLabelmapBorder.ts +179 -0
- package/src/utilities/segmentation/getSegmentAtWorldPoint.ts +173 -0
- package/src/utilities/segmentation/getUniqueSegmentIndices.ts +76 -0
- package/src/utilities/segmentation/index.ts +8 -0
- package/src/utilities/triggerAnnotationRenderForToolGroupIds.ts +38 -0
- package/src/workers/clippingPlaneWorker.js +87 -0
- package/src/workers/polySegConverters.js +467 -0
- package/dist/cjs/tools/displayTools/Contour/addContourSetsToElement.js.map +0 -1
- package/dist/cjs/tools/displayTools/Contour/addOrUpdateContourSets.d.ts +0 -3
- package/dist/cjs/tools/displayTools/Contour/addOrUpdateContourSets.js +0 -14
- package/dist/cjs/tools/displayTools/Contour/addOrUpdateContourSets.js.map +0 -1
- package/dist/cjs/tools/displayTools/Contour/contourConfigCache.js.map +0 -1
- package/dist/cjs/tools/displayTools/Contour/updateContourSets.d.ts +0 -3
- package/dist/cjs/tools/displayTools/Contour/updateContourSets.js.map +0 -1
- package/dist/cjs/tools/displayTools/Contour/utils.js.map +0 -1
- package/dist/cjs/tools/displayTools/Labelmap/validateRepresentationData.d.ts +0 -3
- package/dist/cjs/tools/displayTools/Labelmap/validateRepresentationData.js +0 -20
- package/dist/cjs/tools/displayTools/Labelmap/validateRepresentationData.js.map +0 -1
- package/dist/cjs/tools/displayTools/Surface/addSurfaceToElement.d.ts +0 -2
- package/dist/cjs/tools/displayTools/Surface/addSurfaceToElement.js +0 -84
- package/dist/cjs/tools/displayTools/Surface/addSurfaceToElement.js.map +0 -1
- package/dist/cjs/utilities/contours/mergePoints.d.ts +0 -8
- package/dist/cjs/utilities/contours/mergePoints.js +0 -77
- package/dist/cjs/utilities/contours/mergePoints.js.map +0 -1
- package/dist/esm/tools/displayTools/Contour/addContourSetsToElement.js.map +0 -1
- package/dist/esm/tools/displayTools/Contour/addOrUpdateContourSets.js.map +0 -1
- package/dist/esm/tools/displayTools/Contour/contourConfigCache.js.map +0 -1
- package/dist/esm/tools/displayTools/Contour/updateContourSets.js.map +0 -1
- package/dist/esm/tools/displayTools/Contour/utils.js.map +0 -1
- package/dist/esm/tools/displayTools/Labelmap/validateRepresentationData.js +0 -18
- package/dist/esm/tools/displayTools/Labelmap/validateRepresentationData.js.map +0 -1
- package/dist/esm/tools/displayTools/Surface/addSurfaceToElement.js +0 -79
- package/dist/esm/tools/displayTools/Surface/addSurfaceToElement.js.map +0 -1
- package/dist/esm/utilities/contours/mergePoints.js +0 -73
- package/dist/esm/utilities/contours/mergePoints.js.map +0 -1
- package/dist/types/tools/displayTools/Contour/addContourSetsToElement.d.ts.map +0 -1
- package/dist/types/tools/displayTools/Contour/addOrUpdateContourSets.d.ts +0 -4
- package/dist/types/tools/displayTools/Contour/addOrUpdateContourSets.d.ts.map +0 -1
- package/dist/types/tools/displayTools/Contour/contourConfigCache.d.ts.map +0 -1
- package/dist/types/tools/displayTools/Contour/updateContourSets.d.ts +0 -4
- package/dist/types/tools/displayTools/Contour/updateContourSets.d.ts.map +0 -1
- package/dist/types/tools/displayTools/Contour/utils.d.ts.map +0 -1
- package/dist/types/tools/displayTools/Labelmap/validateRepresentationData.d.ts +0 -4
- package/dist/types/tools/displayTools/Labelmap/validateRepresentationData.d.ts.map +0 -1
- package/dist/types/tools/displayTools/Surface/addSurfaceToElement.d.ts +0 -3
- package/dist/types/tools/displayTools/Surface/addSurfaceToElement.d.ts.map +0 -1
- package/dist/types/utilities/contours/mergePoints.d.ts +0 -9
- package/dist/types/utilities/contours/mergePoints.d.ts.map +0 -1
- package/src/tools/displayTools/Labelmap/validateRepresentationData.ts +0 -36
- package/src/tools/displayTools/Surface/addSurfaceToElement.ts +0 -115
- package/src/utilities/contours/mergePoints.ts +0 -108
- /package/dist/cjs/tools/displayTools/Contour/{addContourSetsToElement.js → vtkContour/addContourSetsToElement.js} +0 -0
- /package/dist/cjs/tools/displayTools/Contour/{contourConfigCache.d.ts → vtkContour/contourConfigCache.d.ts} +0 -0
- /package/dist/cjs/tools/displayTools/Contour/{contourConfigCache.js → vtkContour/contourConfigCache.js} +0 -0
- /package/dist/cjs/tools/displayTools/Contour/{utils.js → vtkContour/utils.js} +0 -0
- /package/dist/esm/tools/displayTools/Contour/{addContourSetsToElement.js → vtkContour/addContourSetsToElement.js} +0 -0
- /package/dist/esm/tools/displayTools/Contour/{contourConfigCache.js → vtkContour/contourConfigCache.js} +0 -0
- /package/dist/esm/tools/displayTools/Contour/{utils.js → vtkContour/utils.js} +0 -0
- /package/dist/types/tools/displayTools/Contour/{contourConfigCache.d.ts → vtkContour/contourConfigCache.d.ts} +0 -0
- /package/src/tools/displayTools/Contour/{contourConfigCache.ts → vtkContour/contourConfigCache.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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CACoB,CAAC;IAExC,MAAM,SAAS,GAAG,IAAA,0CAAuB,EAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAEzE,IAAI,CAAC,SAAS,EAAE;QACd,OAAO;KACR;IAED,IAAI,oCAAoC,GACtC,iBAAiB,CAAC,8BAA8B,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IAEvE,oCAAoC;QAClC,oCAAoC,CAAC,MAAM,CACzC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,KAAK,qCAAe,CAAC,QAAQ,CACrE,CAAC;IAEJ,IAAI,CAAC,CAAA,oCAAoC,aAApC,oCAAoC,uBAApC,oCAAoC,CAAE,MAAM,CAAA,EAAE;QACjD,OAAO;KACR;IAED,MAAM,2BAA2B,GAAG,EAAE,CAAC;IACvC,oCAAoC,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"imageChangeEventListener.js","sourceRoot":"","sources":["../../../../src/eventListeners/segmentation/imageChangeEventListener.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sFAAiE;AACjE,2FAAsE;AACtE,8CAQ6B;AAC7B,mEAAuE;AACvE,0GAAsE;AACtE,wGAA0F;AAE1F,iGAAkG;AAClG,uHAA+F;AAE/F,MAAM,MAAM,GAAG,UAAU,OAAuB;IAC9C,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;IAEhD,IAAI,CAAC,CAAC,QAAQ,YAAY,oBAAa,CAAC,EAAE;QACxC,OAAO;KACR;IAED,OAAO,CAAC,gBAAgB,CACtB,YAAK,CAAC,MAAM,CAAC,eAAe,EAC5B,yBAA0C,CAC3C,CAAC;IAEF,OAAO,CAAC,gBAAgB,CACtB,YAAK,CAAC,MAAM,CAAC,cAAc,EAC3B,yBAA0C,CAC3C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,OAAO,GA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C3B,yBAA0C,CAC3C,CAAC;SACH;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kBAAe;IACb,MAAM;IACN,OAAO;CACR,CAAC"}
|
|
@@ -22,68 +22,79 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const core_1 = require("@cornerstonejs/core");
|
|
30
|
-
const SegmentationRepresentations_1 = __importDefault(require("../../../enums/SegmentationRepresentations"));
|
|
31
27
|
const SegmentationState = __importStar(require("../../../stateManagement/segmentation/segmentationState"));
|
|
32
|
-
const stackVolumeCheck_1 = require("../../../tools/segmentation/strategies/utils/stackVolumeCheck");
|
|
33
28
|
const ToolGroupManager_1 = require("../../../store/ToolGroupManager");
|
|
34
29
|
const onLabelmapSegmentationDataModified = function (evt) {
|
|
35
30
|
const { segmentationId, modifiedSlicesToUse } = evt.detail;
|
|
36
31
|
const { representationData, type } = SegmentationState.getSegmentation(segmentationId);
|
|
37
32
|
const toolGroupIds = SegmentationState.getToolGroupIdsWithSegmentation(segmentationId);
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
const labelmapRepresentationData = representationData[type];
|
|
34
|
+
if ('volumeId' in labelmapRepresentationData) {
|
|
35
|
+
performVolumeLabelmapUpdate({
|
|
36
|
+
modifiedSlicesToUse,
|
|
37
|
+
representationData,
|
|
38
|
+
type,
|
|
39
|
+
});
|
|
40
40
|
}
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const { imageData, vtkOpenGLTexture } = segmentationVolume;
|
|
48
|
-
let slicesToUpdate;
|
|
49
|
-
if (modifiedSlicesToUse && Array.isArray(modifiedSlicesToUse)) {
|
|
50
|
-
slicesToUpdate = modifiedSlicesToUse;
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
const numSlices = imageData.getDimensions()[2];
|
|
54
|
-
slicesToUpdate = [...Array(numSlices).keys()];
|
|
55
|
-
}
|
|
56
|
-
slicesToUpdate.forEach((i) => {
|
|
57
|
-
vtkOpenGLTexture.setUpdatedFrame(i);
|
|
41
|
+
if ('imageIdReferenceMap' in labelmapRepresentationData) {
|
|
42
|
+
performStackLabelmapUpdate({
|
|
43
|
+
toolGroupIds,
|
|
44
|
+
segmentationId,
|
|
45
|
+
representationData,
|
|
46
|
+
type,
|
|
58
47
|
});
|
|
59
|
-
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
function performVolumeLabelmapUpdate({ modifiedSlicesToUse, representationData, type, }) {
|
|
51
|
+
const segmentationVolume = core_1.cache.getVolume(representationData[type].volumeId);
|
|
52
|
+
if (!segmentationVolume) {
|
|
53
|
+
console.warn('segmentation not found in cache');
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const { imageData, vtkOpenGLTexture } = segmentationVolume;
|
|
57
|
+
let slicesToUpdate;
|
|
58
|
+
if (modifiedSlicesToUse && Array.isArray(modifiedSlicesToUse)) {
|
|
59
|
+
slicesToUpdate = modifiedSlicesToUse;
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
const numSlices = imageData.getDimensions()[2];
|
|
63
|
+
slicesToUpdate = [...Array(numSlices).keys()];
|
|
64
|
+
}
|
|
65
|
+
slicesToUpdate.forEach((i) => {
|
|
66
|
+
vtkOpenGLTexture.setUpdatedFrame(i);
|
|
67
|
+
});
|
|
68
|
+
imageData.modified();
|
|
69
|
+
}
|
|
70
|
+
function performStackLabelmapUpdate({ toolGroupIds, segmentationId, representationData, type, }) {
|
|
71
|
+
toolGroupIds.forEach((toolGroupId) => {
|
|
72
|
+
const toolGroupSegmentationRepresentations = SegmentationState.getSegmentationRepresentations(toolGroupId);
|
|
73
|
+
const toolGroup = (0, ToolGroupManager_1.getToolGroup)(toolGroupId);
|
|
74
|
+
const viewportsInfo = toolGroup.getViewportsInfo();
|
|
75
|
+
toolGroupSegmentationRepresentations.forEach((representation) => {
|
|
76
|
+
if (representation.segmentationId !== segmentationId) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
viewportsInfo.forEach(({ viewportId, renderingEngineId }) => {
|
|
80
|
+
const viewport = (0, core_1.getEnabledElementByIds)(viewportId, renderingEngineId).viewport;
|
|
81
|
+
if (viewport instanceof core_1.VolumeViewport) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const actorEntry = viewport.getActor(representation.segmentationRepresentationUID);
|
|
85
|
+
if (!actorEntry) {
|
|
68
86
|
return;
|
|
69
87
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const segImageData = actorEntry.actor.getMapper().getInputData();
|
|
78
|
-
const { imageIdReferenceMap } = representationData[type];
|
|
79
|
-
const currentSegmentationImageId = imageIdReferenceMap.get(currentImageId);
|
|
80
|
-
const segmentationImage = core_1.cache.getImage(currentSegmentationImageId);
|
|
81
|
-
segImageData.modified();
|
|
82
|
-
core_1.utilities.updateVTKImageDataWithCornerstoneImage(segImageData, segmentationImage);
|
|
83
|
-
});
|
|
88
|
+
const currentImageId = viewport.getCurrentImageId();
|
|
89
|
+
const segImageData = actorEntry.actor.getMapper().getInputData();
|
|
90
|
+
const { imageIdReferenceMap } = representationData[type];
|
|
91
|
+
const currentSegmentationImageId = imageIdReferenceMap.get(currentImageId);
|
|
92
|
+
const segmentationImage = core_1.cache.getImage(currentSegmentationImageId);
|
|
93
|
+
segImageData.modified();
|
|
94
|
+
core_1.utilities.updateVTKImageDataWithCornerstoneImage(segImageData, segmentationImage);
|
|
84
95
|
});
|
|
85
96
|
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
88
99
|
exports.default = onLabelmapSegmentationDataModified;
|
|
89
100
|
//# sourceMappingURL=onLabelmapSegmentationDataModified.js.map
|
package/dist/cjs/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onLabelmapSegmentationDataModified.js","sourceRoot":"","sources":["../../../../../src/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onLabelmapSegmentationDataModified.js","sourceRoot":"","sources":["../../../../../src/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAK6B;AAE7B,2GAA6F;AAM7F,sEAA+D;AAK/D,MAAM,kCAAkC,GAAG,UACzC,GAAsC;IAEtC,MAAM,EAAE,cAAc,EAAE,mBAAmB,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAE3D,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAChC,iBAAiB,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAEpD,MAAM,YAAY,GAChB,iBAAiB,CAAC,+BAA+B,CAAC,cAAc,CAAC,CAAC;IAEpE,MAAM,0BAA0B,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAE5D,IAAI,UAAU,IAAI,0BAA0B,EAAE;QAE5C,2BAA2B,CAAC;YAC1B,mBAAmB;YACnB,kBAAkB;YAClB,IAAI;SACL,CAAC,CAAC;KACJ;IAED,IAAI,qBAAqB,IAAI,0BAA0B,EAAE;QAEvD,0BAA0B,CAAC;YACzB,YAAY;YACZ,cAAc;YACd,kBAAkB;YAClB,IAAI;SACL,CAAC,CAAC;KACJ;AACH,CAAC,CAAC;AAEF,SAAS,2B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c,EAAE;gBACpD,OAAO;aACR;YAED,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,EAAE;gBAC1D,MAAM,QAAQ,GAAG,IAAA,6BAAsB,EACrC,UAAU,EACV,iBAAiB,CAClB,CAAC,QAAQ,CAAC;gBAEX,IAAI,QAAQ,YAAY,qBAAc,EAAE;oBACtC,OAAO;iBACR;gBAED,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAClC,cAAc,CAAC,6BAA6B,CAC7C,CAAC;gBAEF,IAAI,CAAC,UAAU,EAAE;oBACf,OAAO;iBACR;gBAED,MAAM,cAAc,GAAG,QAAQ,CAAC,iBAAiB,EAAE,CAAC;gBAEpD,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,YAAY,EAAE,CAAC;gBAEjE,MAAM,EAAE,mBAAmB,EAAE,GAAG,kBAAkB,CAChD,IAAI,CAC4B,CAAC;gBAEnC,MAAM,0BAA0B,GAC9B,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;gBAE1C,MAAM,iBAAiB,GAAG,YAAK,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC;gBACrE,YAAY,CAAC,QAAQ,EAAE,CAAC;gBAGxB,gBAAO,CAAC,sCAAsC,CAC5C,YAAY,EACZ,iBAAiB,CAClB,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kBAAe,kCAAkC,CAAC"}
|
|
@@ -16,6 +16,7 @@ declare class FrameOfReferenceSpecificAnnotationManager implements IAnnotationMa
|
|
|
16
16
|
removeAnnotations: (groupKey: string, toolName?: string) => void;
|
|
17
17
|
saveAnnotations: (groupKey?: string, toolName?: string) => AnnotationState | GroupSpecificAnnotations | Annotations;
|
|
18
18
|
restoreAnnotations: (state: AnnotationState | GroupSpecificAnnotations | Annotations, groupKey?: string, toolName?: string) => void;
|
|
19
|
+
getAllAnnotations: () => Annotations;
|
|
19
20
|
getNumberOfAllAnnotations: () => number;
|
|
20
21
|
removeAllAnnotations: () => void;
|
|
21
22
|
}
|
|
@@ -162,6 +162,11 @@ class FrameOfReferenceSpecificAnnotationManager {
|
|
|
162
162
|
this.annotations = (0, lodash_clonedeep_1.default)(state);
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
+
this.getAllAnnotations = () => {
|
|
166
|
+
return Object.values(this.annotations)
|
|
167
|
+
.map((frameOfReferenceSpecificAnnotations) => Object.values(frameOfReferenceSpecificAnnotations))
|
|
168
|
+
.flat(2);
|
|
169
|
+
};
|
|
165
170
|
this.getNumberOfAllAnnotations = () => {
|
|
166
171
|
let count = 0;
|
|
167
172
|
const annotations = this.annotations;
|
package/dist/cjs/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameOfReferenceSpecificAnnotationManager.js","sourceRoot":"","sources":["../../../../src/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAyC;AAUzC,8CAM6B;AAE7B,2DAAqE;AACrE,iEAAyE;AAYzE,MAAM,yCAAyC;IAO7C,YAAY,GAAY;QAuBxB,gBAAW,GAAG,CAAC,uBAAgD,EAAU,EAAE;YACzE,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE;gBAC/C,OAAO,uBAAuB,CAAC;aAChC;YAED,MAAM,OAAO,GAAG,uBAAuB,CAAC;YACxC,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;YAElD,IAAI,CAAC,cAAc,EAAE;gBACnB,MAAM,IAAI,KAAK,CACb,sGAAsG,CACvG,CAAC;aACH;YAED,OAAO,cAAc,CAAC,mBAAmB,CAAC;QAC5C,CAAC,CAAC;QASF,gCAA2B,GAAG,CAC5B,GAA8C,EAC9C,EAAE;YACF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,EAAE,CAAC;oBAE3B,mCAAmC,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;iBAC7D;gBAED,mCAAmC,CAAC,QAAQ,CAAC,GAAgB,KAAK,CAAC;aACpE;iBAAM,IAAI,QAAQ,EAAE;gBAGnB,WAAW,CAAC,QAAQ,CAAC,GAA6B,KAAK,CAAC;aACzD;iBAAM;gBAEL,IAAI,CAAC,WAAW,GAAoB,IAAA,0BAAS,EAAC,KAAK,CAAC,CAAC;aACtD;QACH,CAAC,CAAC;QAOF,8BAAyB,GAAG,GAAW,EAAE;YACvC,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;YACrC,KAAK,MAAM,QAAQ,IAAI,WAAW,EAAE;gBAClC,MAAM,mCAAmC,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;gBAClE,KAAK,MAAM,QAAQ,IAAI,mCAAmC,EAAE;oBAC1D,MAAM,uBAAuB,GAC3B,mCAAmC,CAAC,QAAQ,CAAC,CAAC;oBAChD,KAAK,IAAI,uBAAuB,CAAC,MAAM,CAAC;iBACzC;aACF;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAKF,yBAAoB,GAAG,GAAS,EAAE;YAChC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACxB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"FrameOfReferenceSpecificAnnotationManager.js","sourceRoot":"","sources":["../../../../src/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAyC;AAUzC,8CAM6B;AAE7B,2DAAqE;AACrE,iEAAyE;AAYzE,MAAM,yCAAyC;IAO7C,YAAY,GAAY;QAuBxB,gBAAW,GAAG,CAAC,uBAAgD,EAAU,EAAE;YACzE,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE;gBAC/C,OAAO,uBAAuB,CAAC;aAChC;YAED,MAAM,OAAO,GAAG,uBA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,CAAC;QACf,CAAC,CAAC;QAKF,yBAAoB,GAAG,GAAS,EAAE;YAChC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACxB,CAAC,CAAC;QA3WA,IAAI,CAAC,GAAG,EAAE;YACR,GAAG,GAAG,gBAAS,CAAC,MAAM,EAAE,CAAC;SAC1B;QACD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QAGf,kBAAW,CAAC,gBAAgB,CAC1B,YAAK,CAAC,MAAM,CAAC,qBAAqB,EAClC,IAAI,CAAC,2BAA2B,CACjC,CAAC;IACJ,CAAC;CAiWF;AAED,MAAM,gDAAgD,GACpD,IAAI,yCAAyC,CAAC,SAAS,CAAC,CAAC;AAElD,4GAAgD;AACzD,kBAAe,yCAAyC,CAAC"}
|
|
@@ -4,9 +4,15 @@ declare function getAnnotationManager(): import("./FrameOfReferenceSpecificAnnot
|
|
|
4
4
|
declare function setAnnotationManager(annotationManager: any): void;
|
|
5
5
|
declare function resetAnnotationManager(): void;
|
|
6
6
|
declare function getAnnotations(toolName: string, annotationGroupSelector: AnnotationGroupSelector): Annotations;
|
|
7
|
+
declare function getAllAnnotations(): Annotations;
|
|
8
|
+
declare function clearParentAnnotation(annotation: Annotation): void;
|
|
9
|
+
declare function addChildAnnotation(parentAnnotation: Annotation, childAnnotation: Annotation): void;
|
|
10
|
+
declare function getParentAnnotation(annotation: Annotation): Annotation;
|
|
11
|
+
declare function getChildAnnotations(annotation: Annotation): Annotation[];
|
|
7
12
|
declare function addAnnotation(annotation: Annotation, annotationGroupSelector: AnnotationGroupSelector): string;
|
|
8
13
|
declare function getNumberOfAnnotations(toolName: string, annotationGroupSelector: AnnotationGroupSelector): number;
|
|
9
14
|
declare function removeAnnotation(annotationUID: string): void;
|
|
10
15
|
declare function getAnnotation(annotationUID: string): Annotation;
|
|
11
16
|
declare function removeAllAnnotations(): void;
|
|
12
|
-
|
|
17
|
+
declare function invalidateAnnotation(annotation: Annotation): void;
|
|
18
|
+
export { getAllAnnotations, getAnnotations, getParentAnnotation, getChildAnnotations, clearParentAnnotation, addChildAnnotation, getNumberOfAnnotations, addAnnotation, getAnnotation, removeAnnotation, removeAllAnnotations, setAnnotationManager, getAnnotationManager, resetAnnotationManager, invalidateAnnotation, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resetAnnotationManager = exports.getAnnotationManager = exports.setAnnotationManager = exports.removeAllAnnotations = exports.removeAnnotation = exports.getAnnotation = exports.addAnnotation = exports.getNumberOfAnnotations = exports.getAnnotations = void 0;
|
|
3
|
+
exports.invalidateAnnotation = exports.resetAnnotationManager = exports.getAnnotationManager = exports.setAnnotationManager = exports.removeAllAnnotations = exports.removeAnnotation = exports.getAnnotation = exports.addAnnotation = exports.getNumberOfAnnotations = exports.addChildAnnotation = exports.clearParentAnnotation = exports.getChildAnnotations = exports.getParentAnnotation = exports.getAnnotations = exports.getAllAnnotations = void 0;
|
|
4
4
|
const core_1 = require("@cornerstonejs/core");
|
|
5
5
|
const enums_1 = require("../../enums");
|
|
6
6
|
const FrameOfReferenceSpecificAnnotationManager_1 = require("./FrameOfReferenceSpecificAnnotationManager");
|
|
@@ -24,6 +24,47 @@ function getAnnotations(toolName, annotationGroupSelector) {
|
|
|
24
24
|
return manager.getAnnotations(groupKey, toolName);
|
|
25
25
|
}
|
|
26
26
|
exports.getAnnotations = getAnnotations;
|
|
27
|
+
function getAllAnnotations() {
|
|
28
|
+
const manager = getAnnotationManager();
|
|
29
|
+
return manager.getAllAnnotations();
|
|
30
|
+
}
|
|
31
|
+
exports.getAllAnnotations = getAllAnnotations;
|
|
32
|
+
function clearParentAnnotation(annotation) {
|
|
33
|
+
const { annotationUID: childUID, parentAnnotationUID } = annotation;
|
|
34
|
+
if (!parentAnnotationUID) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const parentAnnotation = getAnnotation(parentAnnotationUID);
|
|
38
|
+
const childUIDIndex = parentAnnotation.childAnnotationUIDs.indexOf(childUID);
|
|
39
|
+
parentAnnotation.childAnnotationUIDs.splice(childUIDIndex, 1);
|
|
40
|
+
annotation.parentAnnotationUID = undefined;
|
|
41
|
+
}
|
|
42
|
+
exports.clearParentAnnotation = clearParentAnnotation;
|
|
43
|
+
function addChildAnnotation(parentAnnotation, childAnnotation) {
|
|
44
|
+
const { annotationUID: parentUID } = parentAnnotation;
|
|
45
|
+
const { annotationUID: childUID } = childAnnotation;
|
|
46
|
+
clearParentAnnotation(childAnnotation);
|
|
47
|
+
if (!parentAnnotation.childAnnotationUIDs) {
|
|
48
|
+
parentAnnotation.childAnnotationUIDs = [];
|
|
49
|
+
}
|
|
50
|
+
if (parentAnnotation.childAnnotationUIDs.includes(childUID)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
parentAnnotation.childAnnotationUIDs.push(childUID);
|
|
54
|
+
childAnnotation.parentAnnotationUID = parentUID;
|
|
55
|
+
}
|
|
56
|
+
exports.addChildAnnotation = addChildAnnotation;
|
|
57
|
+
function getParentAnnotation(annotation) {
|
|
58
|
+
return annotation.parentAnnotationUID
|
|
59
|
+
? getAnnotation(annotation.parentAnnotationUID)
|
|
60
|
+
: undefined;
|
|
61
|
+
}
|
|
62
|
+
exports.getParentAnnotation = getParentAnnotation;
|
|
63
|
+
function getChildAnnotations(annotation) {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
return ((_b = (_a = annotation.childAnnotationUIDs) === null || _a === void 0 ? void 0 : _a.map((childAnnotationUID) => getAnnotation(childAnnotationUID))) !== null && _b !== void 0 ? _b : []);
|
|
66
|
+
}
|
|
67
|
+
exports.getChildAnnotations = getChildAnnotations;
|
|
27
68
|
function addAnnotation(annotation, annotationGroupSelector) {
|
|
28
69
|
if (!annotation.annotationUID) {
|
|
29
70
|
annotation.annotationUID = core_1.utilities.uuidv4();
|
|
@@ -48,6 +89,7 @@ function getNumberOfAnnotations(toolName, annotationGroupSelector) {
|
|
|
48
89
|
}
|
|
49
90
|
exports.getNumberOfAnnotations = getNumberOfAnnotations;
|
|
50
91
|
function removeAnnotation(annotationUID) {
|
|
92
|
+
var _a;
|
|
51
93
|
if (!annotationUID) {
|
|
52
94
|
return;
|
|
53
95
|
}
|
|
@@ -56,6 +98,7 @@ function removeAnnotation(annotationUID) {
|
|
|
56
98
|
if (!annotation) {
|
|
57
99
|
return;
|
|
58
100
|
}
|
|
101
|
+
(_a = annotation.childAnnotationUIDs) === null || _a === void 0 ? void 0 : _a.forEach((childAnnotationUID) => removeAnnotation(childAnnotationUID));
|
|
59
102
|
manager.removeAnnotation(annotationUID);
|
|
60
103
|
const eventType = enums_1.Events.ANNOTATION_REMOVED;
|
|
61
104
|
const eventDetail = {
|
|
@@ -76,4 +119,14 @@ function removeAllAnnotations() {
|
|
|
76
119
|
manager.removeAllAnnotations();
|
|
77
120
|
}
|
|
78
121
|
exports.removeAllAnnotations = removeAllAnnotations;
|
|
122
|
+
function invalidateAnnotation(annotation) {
|
|
123
|
+
let currAnnotation = annotation;
|
|
124
|
+
while (currAnnotation) {
|
|
125
|
+
currAnnotation.invalidated = true;
|
|
126
|
+
currAnnotation = currAnnotation.parentAnnotationUID
|
|
127
|
+
? getAnnotation(currAnnotation.parentAnnotationUID)
|
|
128
|
+
: undefined;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.invalidateAnnotation = invalidateAnnotation;
|
|
79
132
|
//# sourceMappingURL=annotationState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotationState.js","sourceRoot":"","sources":["../../../../src/stateManagement/annotation/annotationState.ts"],"names":[],"mappings":";;;AAAA,8CAI6B;AAC7B,uCAAqC;AACrC,2GAA+G;AAI/G,2CAGyB;AAGzB,IAAI,cAAc,GAAG,4FAAgD,CAAC;AAMtE,SAAS,oBAAoB;IAC3B,OAAO,cAAc,CAAC;AACxB,CAA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AC;IAEF,IAAA,mBAAY,EAAC,kBAAW,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AACpD,CAAC;AA+CC,4CAAgB;AAzClB,SAAS,aAAa,CAAC,aAAqB;IAC1C,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IACvC,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAExD,OAAO,UAAU,CAAC;AACpB,CAAC;AAmCC,sCAAa;AA9Bf,SAAS,oBAAoB;IAC3B,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IACvC,OAAO,CAAC,oBAAoB,EAAE,CAAC;AACjC,CAAC;AA6BC,oDAAoB;AAvBtB,SAAS,oBAAoB,CAAC,UAAsB;IAClD,IAAI,cAAc,GAAG,UAAU,CAAC;IAEhC,OAAO,cAAc,EAAE;QACrB,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC;QAElC,cAAc,GAAG,cAAc,CAAC,mBAAmB;YACjD,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,mBAAmB,CAAC;YACnD,CAAC,CAAC,SAAS,CAAC;KACf;AACH,CAAC;AAkBC,oDAAoB"}
|
|
@@ -4,4 +4,5 @@ declare function triggerAnnotationAddedForElement(annotation: Annotation, elemen
|
|
|
4
4
|
declare function triggerAnnotationAddedForFOR(annotation: Annotation): void;
|
|
5
5
|
declare function triggerAnnotationModified(annotation: Annotation, element: HTMLDivElement, changeType?: ChangeTypes): void;
|
|
6
6
|
declare function triggerAnnotationCompleted(annotation: Annotation): void;
|
|
7
|
-
|
|
7
|
+
declare function triggerContourAnnotationCompleted(annotation: Annotation, contourHoleProcessingEnabled?: boolean): void;
|
|
8
|
+
export { triggerAnnotationAddedForElement, triggerAnnotationAddedForFOR, triggerAnnotationModified, triggerAnnotationCompleted, triggerContourAnnotationCompleted, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.triggerAnnotationCompleted = exports.triggerAnnotationModified = exports.triggerAnnotationAddedForFOR = exports.triggerAnnotationAddedForElement = void 0;
|
|
3
|
+
exports.triggerContourAnnotationCompleted = exports.triggerAnnotationCompleted = exports.triggerAnnotationModified = exports.triggerAnnotationAddedForFOR = exports.triggerAnnotationAddedForElement = void 0;
|
|
4
4
|
const core_1 = require("@cornerstonejs/core");
|
|
5
5
|
const enums_1 = require("../../../enums");
|
|
6
6
|
const ToolGroupManager_1 = require("../../../store/ToolGroupManager");
|
|
@@ -59,11 +59,22 @@ function triggerAnnotationModified(annotation, element, changeType = enums_1.Cha
|
|
|
59
59
|
}
|
|
60
60
|
exports.triggerAnnotationModified = triggerAnnotationModified;
|
|
61
61
|
function triggerAnnotationCompleted(annotation) {
|
|
62
|
-
const eventType = enums_1.Events.ANNOTATION_COMPLETED;
|
|
63
62
|
const eventDetail = {
|
|
64
63
|
annotation,
|
|
65
64
|
};
|
|
66
|
-
(
|
|
65
|
+
_triggerAnnotationCompleted(eventDetail);
|
|
67
66
|
}
|
|
68
67
|
exports.triggerAnnotationCompleted = triggerAnnotationCompleted;
|
|
68
|
+
function triggerContourAnnotationCompleted(annotation, contourHoleProcessingEnabled = false) {
|
|
69
|
+
const eventDetail = {
|
|
70
|
+
annotation,
|
|
71
|
+
contourHoleProcessingEnabled,
|
|
72
|
+
};
|
|
73
|
+
_triggerAnnotationCompleted(eventDetail);
|
|
74
|
+
}
|
|
75
|
+
exports.triggerContourAnnotationCompleted = triggerContourAnnotationCompleted;
|
|
76
|
+
function _triggerAnnotationCompleted(eventDetail) {
|
|
77
|
+
const eventType = enums_1.Events.ANNOTATION_COMPLETED;
|
|
78
|
+
(0, core_1.triggerEvent)(core_1.eventTarget, eventType, eventDetail);
|
|
79
|
+
}
|
|
69
80
|
//# sourceMappingURL=state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/stateManagement/annotation/helpers/state.ts"],"names":[],"mappings":";;;AAAA,8CAK6B;AAC7B,0CAAqD;AAErD,sEAA4E;
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/stateManagement/annotation/helpers/state.ts"],"names":[],"mappings":";;;AAAA,8CAK6B;AAC7B,0CAAqD;AAErD,sEAA4E;AAa5E,SAAS,gCAAgC,CACvC,UAAsB,EACtB,OAAuB;IAEvB,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;IAClD,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,cAAc,CAAC;IAEvD,MAAM,SAAS,GAAG,cAAM,CAAC,gBAAgB,CAAC;IAE1C,MAAM,WAAW,GAA+B;QAC9C,UAAU;QACV,UAAU;QACV,iBAAiB,EAAE,eAAe,CAAC,EAAE;KACtC,CAAC;IAEF,IAAA,mBAAY,EAAC,kBAAW,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AACpD,CAAC;AA0GC,4EAAgC;AAnGlC,SAAS,4BAA4B,CAAC,UAAsB;IAC1D,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC;IAEzC,MAAM,UAAU,GAAG,IAAA,4CAAyB,EAAC,QAAQ,CAAC,CAAC;IACvD,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;QACtB,OAAO;KACR;IAGD,MAAM,iBAAiB,GAAG,EAAE,CAAC;IAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QAC/B,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YAC/C,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,GAAG,YAAY,CAAC;YACvD,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAA,6BAAsB,EACpD,UAAU,EACV,iBAAiB,CAClB,CAAC;YAEF,IAAI,UAAU,CAAC,QAAQ,CAAC,mBAAmB,KAAK,mBAAmB,EAAE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B,SAAS,iCAAiC,CACxC,UAAsB,EACtB,4BAA4B,GAAG,KAAK;IAEpC,MAAM,WAAW,GAA0C;QACzD,UAAU;QACV,4BAA4B;KAC7B,CAAC;IAEF,2BAA2B,CAAC,WAAW,CAAC,CAAC;AAC3C,CAAC;AAkBC,8EAAiC;AAZnC,SAAS,2BAA2B,CAClC,WAA2C;IAE3C,MAAM,SAAS,GAAG,cAAM,CAAC,oBAAoB,CAAC;IAC9C,IAAA,mBAAY,EAAC,kBAAW,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -7,9 +7,14 @@ import { addAnnotation } from "./annotation/annotationState";
|
|
|
7
7
|
import { getNumberOfAnnotations } from "./annotation/annotationState";
|
|
8
8
|
import { removeAnnotation } from "./annotation/annotationState";
|
|
9
9
|
import { getAnnotation } from "./annotation/annotationState";
|
|
10
|
+
import { getParentAnnotation } from "./annotation/annotationState";
|
|
11
|
+
import { getChildAnnotations } from "./annotation/annotationState";
|
|
12
|
+
import { clearParentAnnotation } from "./annotation/annotationState";
|
|
13
|
+
import { addChildAnnotation } from "./annotation/annotationState";
|
|
10
14
|
import { setAnnotationManager } from "./annotation/annotationState";
|
|
11
15
|
import { getAnnotationManager } from "./annotation/annotationState";
|
|
12
16
|
import { resetAnnotationManager } from "./annotation/annotationState";
|
|
17
|
+
import { invalidateAnnotation } from "./annotation/annotationState";
|
|
13
18
|
import { addSegmentationRepresentations } from "./segmentation";
|
|
14
19
|
import { removeSegmentationsFromToolGroup } from "./segmentation";
|
|
15
|
-
export { FrameOfReferenceSpecificAnnotationManager, defaultFrameOfReferenceSpecificAnnotationManager, annotationLocking, annotationSelection, getAnnotations, addAnnotation, getNumberOfAnnotations, removeAnnotation, getAnnotation, setAnnotationManager, getAnnotationManager, resetAnnotationManager, addSegmentationRepresentations, removeSegmentationsFromToolGroup };
|
|
20
|
+
export { FrameOfReferenceSpecificAnnotationManager, defaultFrameOfReferenceSpecificAnnotationManager, annotationLocking, annotationSelection, getAnnotations, addAnnotation, getNumberOfAnnotations, removeAnnotation, getAnnotation, getParentAnnotation, getChildAnnotations, clearParentAnnotation, addChildAnnotation, setAnnotationManager, getAnnotationManager, resetAnnotationManager, invalidateAnnotation, addSegmentationRepresentations, removeSegmentationsFromToolGroup };
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.removeSegmentationsFromToolGroup = exports.addSegmentationRepresentations = exports.resetAnnotationManager = exports.getAnnotationManager = exports.setAnnotationManager = exports.getAnnotation = exports.removeAnnotation = exports.getNumberOfAnnotations = exports.addAnnotation = exports.getAnnotations = exports.annotationSelection = exports.annotationLocking = exports.defaultFrameOfReferenceSpecificAnnotationManager = exports.FrameOfReferenceSpecificAnnotationManager = void 0;
|
|
26
|
+
exports.removeSegmentationsFromToolGroup = exports.addSegmentationRepresentations = exports.invalidateAnnotation = exports.resetAnnotationManager = exports.getAnnotationManager = exports.setAnnotationManager = exports.addChildAnnotation = exports.clearParentAnnotation = exports.getChildAnnotations = exports.getParentAnnotation = exports.getAnnotation = exports.removeAnnotation = exports.getNumberOfAnnotations = exports.addAnnotation = exports.getAnnotations = exports.annotationSelection = exports.annotationLocking = exports.defaultFrameOfReferenceSpecificAnnotationManager = exports.FrameOfReferenceSpecificAnnotationManager = void 0;
|
|
27
27
|
const FrameOfReferenceSpecificAnnotationManager_1 = __importStar(require("./annotation/FrameOfReferenceSpecificAnnotationManager"));
|
|
28
28
|
exports.FrameOfReferenceSpecificAnnotationManager = FrameOfReferenceSpecificAnnotationManager_1.default;
|
|
29
29
|
Object.defineProperty(exports, "defaultFrameOfReferenceSpecificAnnotationManager", { enumerable: true, get: function () { return FrameOfReferenceSpecificAnnotationManager_1.defaultFrameOfReferenceSpecificAnnotationManager; } });
|
|
@@ -36,10 +36,15 @@ Object.defineProperty(exports, "getAnnotations", { enumerable: true, get: functi
|
|
|
36
36
|
Object.defineProperty(exports, "addAnnotation", { enumerable: true, get: function () { return annotationState_1.addAnnotation; } });
|
|
37
37
|
Object.defineProperty(exports, "removeAnnotation", { enumerable: true, get: function () { return annotationState_1.removeAnnotation; } });
|
|
38
38
|
Object.defineProperty(exports, "getAnnotation", { enumerable: true, get: function () { return annotationState_1.getAnnotation; } });
|
|
39
|
+
Object.defineProperty(exports, "getParentAnnotation", { enumerable: true, get: function () { return annotationState_1.getParentAnnotation; } });
|
|
40
|
+
Object.defineProperty(exports, "getChildAnnotations", { enumerable: true, get: function () { return annotationState_1.getChildAnnotations; } });
|
|
41
|
+
Object.defineProperty(exports, "clearParentAnnotation", { enumerable: true, get: function () { return annotationState_1.clearParentAnnotation; } });
|
|
42
|
+
Object.defineProperty(exports, "addChildAnnotation", { enumerable: true, get: function () { return annotationState_1.addChildAnnotation; } });
|
|
39
43
|
Object.defineProperty(exports, "getNumberOfAnnotations", { enumerable: true, get: function () { return annotationState_1.getNumberOfAnnotations; } });
|
|
40
44
|
Object.defineProperty(exports, "setAnnotationManager", { enumerable: true, get: function () { return annotationState_1.setAnnotationManager; } });
|
|
41
45
|
Object.defineProperty(exports, "getAnnotationManager", { enumerable: true, get: function () { return annotationState_1.getAnnotationManager; } });
|
|
42
46
|
Object.defineProperty(exports, "resetAnnotationManager", { enumerable: true, get: function () { return annotationState_1.resetAnnotationManager; } });
|
|
47
|
+
Object.defineProperty(exports, "invalidateAnnotation", { enumerable: true, get: function () { return annotationState_1.invalidateAnnotation; } });
|
|
43
48
|
const segmentation_1 = require("./segmentation");
|
|
44
49
|
Object.defineProperty(exports, "addSegmentationRepresentations", { enumerable: true, get: function () { return segmentation_1.addSegmentationRepresentations; } });
|
|
45
50
|
Object.defineProperty(exports, "removeSegmentationsFromToolGroup", { enumerable: true, get: function () { return segmentation_1.removeSegmentationsFromToolGroup; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stateManagement/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oIAEgE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stateManagement/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oIAEgE;AA2B9D,oDA7BK,mDAAyC,CA6BL;AACzC,iIA7BA,4FAAgD,OA6BA;AA3BlD,kFAAoE;AA4BlE,8CAAiB;AA3BnB,sFAAwE;AA4BtE,kDAAmB;AA1BrB,kEAcsC;AAapC,+FA1BA,gCAAc,OA0BA;AACd,8FA1BA,+BAAa,OA0BA;AAEb,iGA3BA,kCAAgB,OA2BA;AAChB,8FA3BA,+BAAa,OA2BA;AACb,oGA3BA,qCAAmB,OA2BA;AACnB,oGA3BA,qCAAmB,OA2BA;AACnB,sGA3BA,uCAAqB,OA2BA;AACrB,mGA3BA,oCAAkB,OA2BA;AANlB,uGApBA,wCAAsB,OAoBA;AAOtB,qGA1BA,sCAAoB,OA0BA;AACpB,qGA1BA,sCAAoB,OA0BA;AACpB,uGA1BA,wCAAsB,OA0BA;AACtB,qGA1BA,sCAAoB,OA0BA;AAvBtB,iDAGwB;AAsBtB,+GAxBA,6CAA8B,OAwBA;AAC9B,iHAxBA,+CAAgC,OAwBA"}
|
|
@@ -9,13 +9,16 @@ const core_1 = require("@cornerstonejs/core");
|
|
|
9
9
|
const enums_1 = require("../../enums");
|
|
10
10
|
const contourConfig_1 = __importDefault(require("../../tools/displayTools/Contour/contourConfig"));
|
|
11
11
|
const labelmapConfig_1 = __importDefault(require("../../tools/displayTools/Labelmap/labelmapConfig"));
|
|
12
|
+
const surfaceConfig_1 = __importDefault(require("../../tools/displayTools/Surface/surfaceConfig"));
|
|
12
13
|
const defaultLabelmapConfig = (0, labelmapConfig_1.default)();
|
|
13
14
|
const defaultContourConfig = (0, contourConfig_1.default)();
|
|
15
|
+
const defaultSurfaceConfig = (0, surfaceConfig_1.default)();
|
|
14
16
|
const newGlobalConfig = {
|
|
15
17
|
renderInactiveSegmentations: true,
|
|
16
18
|
representations: {
|
|
17
19
|
[enums_1.SegmentationRepresentations.Labelmap]: defaultLabelmapConfig,
|
|
18
20
|
[enums_1.SegmentationRepresentations.Contour]: defaultContourConfig,
|
|
21
|
+
[enums_1.SegmentationRepresentations.Surface]: defaultSurfaceConfig,
|
|
19
22
|
},
|
|
20
23
|
};
|
|
21
24
|
const initialDefaultState = {
|
|
@@ -89,7 +92,7 @@ class SegmentationStateManager {
|
|
|
89
92
|
}
|
|
90
93
|
getSegmentationRepresentationByUID(toolGroupId, segmentationRepresentationUID) {
|
|
91
94
|
const toolGroupSegRepresentations = this.getSegmentationRepresentations(toolGroupId);
|
|
92
|
-
const segmentationData = toolGroupSegRepresentations.find((representation) => representation.segmentationRepresentationUID ===
|
|
95
|
+
const segmentationData = toolGroupSegRepresentations === null || toolGroupSegRepresentations === void 0 ? void 0 : toolGroupSegRepresentations.find((representation) => representation.segmentationRepresentationUID ===
|
|
93
96
|
segmentationRepresentationUID);
|
|
94
97
|
return segmentationData;
|
|
95
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentationStateManager.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/SegmentationStateManager.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAyC;AAEzC,8CAA2D;AAE3D,uCAA0D;AAC1D,mGAAqF;AACrF,sGAAwF;
|
|
1
|
+
{"version":3,"file":"SegmentationStateManager.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/SegmentationStateManager.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAyC;AAEzC,8CAA2D;AAE3D,uCAA0D;AAC1D,mGAAqF;AACrF,sGAAwF;AACxF,mGAAqF;AAarF,MAAM,qBAAqB,GAAG,IAAA,wBAAwB,GAAE,CAAC;AACzD,MAAM,oBAAoB,GAAG,IAAA,uBAAuB,GAAE,CAAC;AACvD,MAAM,oBAAo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AAM,KAAK,CAAC,EAAE;YAClD,2BAA2B,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;YAC7C,OAAO;SACR;QAID,IAAI,gDAAgD,CAAC,MAAM,EAAE;YAC3D,2BAA2B,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE;gBACrD,IACE,cAAc,CAAC,6BAA6B;oBAC5C,gDAAgD,CAAC,6BAA6B,EAC9E;oBACA,cAAc,CAAC,MAAM,GAAG,KAAK,CAAC;iBAC/B;YACH,CAAC,CAAC,CAAC;SACJ;IAGH,CAAC;CACF;AAndD,2CAmdC;AAED,MAAM,+BAA+B,GAAG,IAAI,wBAAwB,CAAC,SAAS,CAAC,CAAC;AACvE,0EAA+B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LabelmapSegmentationData } from '../../types/LabelmapTypes';
|
|
2
|
+
import { ContourSegmentationData } from '../../types/ContourTypes';
|
|
3
|
+
import { SurfaceSegmentationData } from '../../types/SurfaceTypes';
|
|
4
|
+
import SegmentationRepresentations from '../../enums/SegmentationRepresentations';
|
|
5
|
+
declare type SegmentationData = LabelmapSegmentationData | ContourSegmentationData | SurfaceSegmentationData;
|
|
6
|
+
declare type AddRepresentationData = {
|
|
7
|
+
segmentationId: string;
|
|
8
|
+
type: SegmentationRepresentations;
|
|
9
|
+
data: SegmentationData;
|
|
10
|
+
};
|
|
11
|
+
declare function addRepresentationData({ segmentationId, type, data, }: AddRepresentationData): void;
|
|
12
|
+
export default addRepresentationData;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const segmentationState_1 = require("./segmentationState");
|
|
7
|
+
const SegmentationRepresentations_1 = __importDefault(require("../../enums/SegmentationRepresentations"));
|
|
8
|
+
function addRepresentationData({ segmentationId, type, data, }) {
|
|
9
|
+
const segmentation = (0, segmentationState_1.getSegmentation)(segmentationId);
|
|
10
|
+
if (segmentation.representationData[type]) {
|
|
11
|
+
console.warn(`Representation data of type ${type} already exists for segmentation ${segmentationId}, overwriting it.`);
|
|
12
|
+
}
|
|
13
|
+
switch (type) {
|
|
14
|
+
case SegmentationRepresentations_1.default.Labelmap:
|
|
15
|
+
if (data) {
|
|
16
|
+
segmentation.representationData[type] =
|
|
17
|
+
data;
|
|
18
|
+
}
|
|
19
|
+
break;
|
|
20
|
+
case SegmentationRepresentations_1.default.Contour:
|
|
21
|
+
if (data) {
|
|
22
|
+
segmentation.representationData[type] = data;
|
|
23
|
+
}
|
|
24
|
+
break;
|
|
25
|
+
case SegmentationRepresentations_1.default.Surface:
|
|
26
|
+
if (data) {
|
|
27
|
+
segmentation.representationData[type] = data;
|
|
28
|
+
}
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
throw new Error(`Invalid representation type ${type}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = addRepresentationData;
|
|
35
|
+
//# sourceMappingURL=addRepresentationData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addRepresentationData.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/addRepresentationData.ts"],"names":[],"mappings":";;;;;AAGA,2DAAsD;AACtD,0GAAkF;AA6BlF,SAAS,qBAAqB,CAAC,EAC7B,cAAc,EACd,IAAI,EACJ,IAAI,GACkB;IACtB,MAAM,YAAY,GAAG,IAAA,mCAAe,EAAC,cAAc,CAAC,CAAC;IAErD,IAAI,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE;QACzC,OAAO,CAAC,IAAI,CACV,+BAA+B,IAAI,oCAAoC,cAAc,mBAAmB,CACzG,CAAC;KAGH;IAED,QAAQ,IAAI,EAAE;QACZ,KAAK,qCAA2B,CAAC,QAAQ;YACvC,IAAI,IAAI,EAAE;gBACR,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC;oBACnC,IAAgC,CAAC;aACpC;YACD,MAAM;QACR,KAAK,qCAA2B,CAAC,OAAO;YACtC,IAAI,IAAI,EAAE;gBACR,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,IAA+B,CAAC;aACzE;YACD,MAAM;QACR,KAAK,qCAA2B,CAAC,OAAO;YACtC,IAAI,IAAI,EAAE;gBACR,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,IAA+B,CAAC;aACzE;YACD,MAAM;QACR;YACE,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,EAAE,CAAC,CAAC;KAC1D;AACH,CAAC;AAED,kBAAe,qBAAqB,CAAC"}
|