@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":"BaseTool.js","sourceRoot":"","sources":["../../../../src/tools/base/BaseTool.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"BaseTool.js","sourceRoot":"","sources":["../../../../src/tools/base/BaseTool.ts"],"names":[],"mappings":";;;;;AAAA,8CAAoE;AAEpE,sEAA8C;AA0B9C,MAAe,QAAQ;IAUrB,YAAY,SAA0B,EAAE,gBAA2B;QACjE,MAAM,YAAY,GAAG,gBAAS,CAAC,SAAS,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;QAEtE,MAAM,EACJ,aAAa,GAAG,EAAE,EAClB,yBAAyB,EACzB,WAAW,GACZ,GAAG,YAAY,CAAC;QAGjB,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE;YAC7B,aAAa,CAAC,UAAU,GAAG,EAAE,CAAC;YAC9B,aAAa,CAAC,eAAe,GAAG,SAAS,CAAC;YAC1C,aAAa,CAAC,cAAc,GAAG,SAAS,CAAC;YACzC,aAAa,CAAC,eAAe,GAAG,EAAE,CAAC;SACpC;QAED,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,IAAI,EAAE,CAAC;QACjE,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,GAAG,mBAAS,CAAC,QAAQ,CAAC;IACjC,CAAC;IAMM,WAAW;QAEhB,OAAyB,IAAI,CAAC,WAAY,CAAC,QAAQ,CAAC;IACtD,CAAC;IASM,mBAAmB,CACxB,cAAqC,EACrC,aAAsB;;QAEtB,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC;QAC1D,OAAO,MAAA,UAAU,CAAC,cAAc,CAAC,0CAAE,IAAI,CACrC,IAAI,EACJ,cAAc,EACd,aAAa,CACd,CAAC;IACJ,CAAC;IAaM,2BAA2B,CAChC,cAAqC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AG,MAAA,QAAQ,CAAC,WAAW,wDAAI,CAAC;QAC1C,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC;SACjB;QACD,IAAI,QAAQ,YAAY,yBAAkB,EAAE;YAC1C,OAAO,YAAY,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,CAAC;SACvD;QACD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;CACF;AAID,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAAC;AAC/B,kBAAe,QAAQ,CAAC"}
|
|
@@ -7,6 +7,7 @@ declare abstract class ContourBaseTool extends AnnotationTool {
|
|
|
7
7
|
protected createAnnotation(evt: EventTypes.InteractionEventType): Annotation;
|
|
8
8
|
protected addAnnotation(annotation: Annotation, element: HTMLDivElement): string;
|
|
9
9
|
protected cancelAnnotation(annotation: Annotation): void;
|
|
10
|
+
protected moveAnnotation(annotation: Annotation, worldPosDelta: Types.Point3): void;
|
|
10
11
|
protected getPolylinePoints(annotation: ContourAnnotation): Types.Point3[];
|
|
11
12
|
protected renderAnnotationInstance(renderContext: AnnotationRenderContext): boolean;
|
|
12
13
|
}
|
|
@@ -8,6 +8,7 @@ const core_1 = require("@cornerstonejs/core");
|
|
|
8
8
|
const annotationState_1 = require("../../stateManagement/annotation/annotationState");
|
|
9
9
|
const drawingSvg_1 = require("../../drawingSvg");
|
|
10
10
|
const AnnotationTool_1 = __importDefault(require("./AnnotationTool"));
|
|
11
|
+
const contours_1 = require("../../utilities/contours");
|
|
11
12
|
class ContourBaseTool extends AnnotationTool_1.default {
|
|
12
13
|
constructor(toolProps, defaultToolProps) {
|
|
13
14
|
super(toolProps, defaultToolProps);
|
|
@@ -107,6 +108,17 @@ class ContourBaseTool extends AnnotationTool_1.default {
|
|
|
107
108
|
}
|
|
108
109
|
cancelAnnotation(annotation) {
|
|
109
110
|
}
|
|
111
|
+
moveAnnotation(annotation, worldPosDelta) {
|
|
112
|
+
const { points } = annotation.data.handles;
|
|
113
|
+
for (let i = 0, numPoints = points.length; i < numPoints; i++) {
|
|
114
|
+
const point = points[i];
|
|
115
|
+
point[0] += worldPosDelta[0];
|
|
116
|
+
point[1] += worldPosDelta[1];
|
|
117
|
+
point[2] += worldPosDelta[2];
|
|
118
|
+
}
|
|
119
|
+
annotation.invalidated = true;
|
|
120
|
+
(0, annotationState_1.getChildAnnotations)(annotation).forEach((childAnnotation) => this.moveAnnotation(childAnnotation, worldPosDelta));
|
|
121
|
+
}
|
|
110
122
|
getPolylinePoints(annotation) {
|
|
111
123
|
var _a, _b;
|
|
112
124
|
return (_b = (_a = annotation.data.contour) === null || _a === void 0 ? void 0 : _a.polyline) !== null && _b !== void 0 ? _b : annotation.data.polyline;
|
|
@@ -114,12 +126,17 @@ class ContourBaseTool extends AnnotationTool_1.default {
|
|
|
114
126
|
renderAnnotationInstance(renderContext) {
|
|
115
127
|
const { enabledElement, annotationStyle, svgDrawingHelper } = renderContext;
|
|
116
128
|
const annotation = renderContext.annotation;
|
|
129
|
+
if (annotation.parentAnnotationUID) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
117
132
|
const { annotationUID } = annotation;
|
|
118
133
|
const { viewport } = enabledElement;
|
|
119
134
|
const { worldToCanvas } = viewport;
|
|
120
135
|
const polylineCanvasPoints = this.getPolylinePoints(annotation).map((point) => worldToCanvas(point));
|
|
121
136
|
const { lineWidth, lineDash, color, fillColor, fillOpacity } = annotationStyle;
|
|
122
|
-
(0,
|
|
137
|
+
const childContours = (0, contours_1.getContourHolesDataCanvas)(annotation, viewport);
|
|
138
|
+
const allContours = [polylineCanvasPoints, ...childContours];
|
|
139
|
+
(0, drawingSvg_1.drawPath)(svgDrawingHelper, annotationUID, 'contourPolyline', allContours, {
|
|
123
140
|
color,
|
|
124
141
|
lineDash,
|
|
125
142
|
lineWidth: Math.max(0.1, lineWidth),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContourBaseTool.js","sourceRoot":"","sources":["../../../../src/tools/base/ContourBaseTool.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAwD;AAExD,
|
|
1
|
+
{"version":3,"file":"ContourBaseTool.js","sourceRoot":"","sources":["../../../../src/tools/base/ContourBaseTool.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAwD;AAExD,sFAI0D;AAU1D,iDAA2D;AAE3D,sEAA8C;AAC9C,uDAAqE;AAMrE,MAAe,eAAgB,SAAQ,wBAAc;IACnD,YAAY,SAA0B,EAAE,gBAA2B;QACjE,KAAK,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IACrC,CAAC;IAQM,gBAAgB,CACrB,cAAqC,EACrC,gBAAkC;QAElC,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;QACpC,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC;QAG7B,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE,EAAE;YAClC,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;YACpD,OAAO,YAAY,CAAC;SACrB;QAED,IAAI,WAAW,GAAG,IAAA,gCAAc,EAAC,IAAI,CAAC,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;QAE9D,IAAI,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAA,EAAE;YACxB,OAAO,YAAY,CAAC;SACrB;QAED,WAAW,GAAG,IAAI,CAAC,uCAAuC,CACxD,OAAO,EACP,WAAW,CACZ,CAAC;QAEF,IAAI,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAA,EAAE;YACxB,OAAO,YAAY,CAAC;SACrB;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC5C,MAAM,cAAc,GAAmB;YACrC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,IAAI,CA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,CAAC,GAAG,CACjE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAChC,CAAC;QACF,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,GAC1D,eAAe,CAAC;QAElB,MAAM,aAAa,GAAG,IAAA,oCAAyB,EAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACtE,MAAM,WAAW,GAAG,CAAC,oBAAoB,EAAE,GAAG,aAAa,CAAC,CAAC;QAE7D,IAAA,qBAAW,EACT,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX;YACE,KAAK;YACL,QAAQ;YACR,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC;YACnC,SAAS,EAAE,SAAS;YACpB,WAAW;SACZ,CACF,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAE2B,kCAAO;AAAE,0CAAe"}
|
|
@@ -13,7 +13,6 @@ declare abstract class ContourSegmentationBaseTool extends ContourBaseTool {
|
|
|
13
13
|
}): any;
|
|
14
14
|
protected renderAnnotationInstance(renderContext: AnnotationRenderContext): boolean;
|
|
15
15
|
private _getContourSegmentationStyle;
|
|
16
|
-
private
|
|
17
|
-
private _unregisterContourSegmentationAnnotation;
|
|
16
|
+
private _getSegmentationRepresentation;
|
|
18
17
|
}
|
|
19
18
|
export { ContourSegmentationBaseTool as default, ContourSegmentationBaseTool };
|
|
@@ -10,6 +10,9 @@ const enums_1 = require("../../enums");
|
|
|
10
10
|
const ContourBaseTool_1 = __importDefault(require("./ContourBaseTool"));
|
|
11
11
|
const triggerSegmentationEvents_1 = require("../../stateManagement/segmentation/triggerSegmentationEvents");
|
|
12
12
|
const interpolation_1 = require("../../utilities/contours/interpolation");
|
|
13
|
+
const contourSegmentation_1 = require("../../utilities/contourSegmentation");
|
|
14
|
+
const segmentationState_1 = require("../../stateManagement/segmentation/segmentationState");
|
|
15
|
+
const utilities_1 = require("../../utilities");
|
|
13
16
|
class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
14
17
|
constructor(toolProps, defaultToolProps) {
|
|
15
18
|
var _a;
|
|
@@ -35,14 +38,13 @@ class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
|
35
38
|
if (segmentationType !== enums_1.SegmentationRepresentations.Contour) {
|
|
36
39
|
throw new Error(`A contour segmentation must be active`);
|
|
37
40
|
}
|
|
38
|
-
const { segmentationId
|
|
41
|
+
const { segmentationId } = activeSegmentationRepresentation;
|
|
39
42
|
const segmentIndex = segmentation_1.segmentIndex.getActiveSegmentIndex(segmentationId);
|
|
40
43
|
return core_1.utilities.deepMerge(contourAnnotation, {
|
|
41
44
|
data: {
|
|
42
45
|
segmentation: {
|
|
43
46
|
segmentationId,
|
|
44
47
|
segmentIndex,
|
|
45
|
-
segmentationRepresentationUID,
|
|
46
48
|
},
|
|
47
49
|
},
|
|
48
50
|
});
|
|
@@ -51,13 +53,13 @@ class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
|
51
53
|
const annotationUID = super.addAnnotation(annotation, element);
|
|
52
54
|
if (this.isContourSegmentationTool()) {
|
|
53
55
|
const contourSegAnnotation = annotation;
|
|
54
|
-
|
|
56
|
+
(0, contourSegmentation_1.addContourSegmentationAnnotation)(contourSegAnnotation);
|
|
55
57
|
}
|
|
56
58
|
return annotationUID;
|
|
57
59
|
}
|
|
58
60
|
cancelAnnotation(annotation) {
|
|
59
61
|
if (this.isContourSegmentationTool()) {
|
|
60
|
-
|
|
62
|
+
(0, contourSegmentation_1.removeContourSegmentationAnnotation)(annotation);
|
|
61
63
|
}
|
|
62
64
|
super.cancelAnnotation(annotation);
|
|
63
65
|
}
|
|
@@ -76,6 +78,8 @@ class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
|
76
78
|
if (invalidated && this.isContourSegmentationTool()) {
|
|
77
79
|
const { segmentationId } = (annotation).data.segmentation;
|
|
78
80
|
(0, triggerSegmentationEvents_1.triggerSegmentationDataModified)(segmentationId);
|
|
81
|
+
const toolGroupIds = (0, segmentationState_1.getToolGroupIdsWithSegmentation)(segmentationId);
|
|
82
|
+
(0, utilities_1.triggerAnnotationRenderForToolGroupIds)(toolGroupIds);
|
|
79
83
|
}
|
|
80
84
|
return renderResult;
|
|
81
85
|
}
|
|
@@ -83,8 +87,13 @@ class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
|
83
87
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
84
88
|
const { toolGroupId } = this;
|
|
85
89
|
const annotation = context.annotation;
|
|
86
|
-
const {
|
|
87
|
-
const
|
|
90
|
+
const { segmentationId, segmentIndex } = annotation.data.segmentation;
|
|
91
|
+
const segmentation = segmentation_1.state.getSegmentation(segmentationId);
|
|
92
|
+
const segmentationRepresentation = this._getSegmentationRepresentation(segmentationId);
|
|
93
|
+
if (!segmentationRepresentation) {
|
|
94
|
+
return {};
|
|
95
|
+
}
|
|
96
|
+
const { segmentationRepresentationUID } = segmentationRepresentation;
|
|
88
97
|
const { active } = segmentationRepresentation;
|
|
89
98
|
const { autoGenerated } = annotation;
|
|
90
99
|
const segmentsLocked = segmentation_1.segmentLocking.getLockedSegments(segmentationId);
|
|
@@ -119,6 +128,9 @@ class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
|
119
128
|
lineOpacity = (_s = mergedConfig.outlineOpacityInactive) !== null && _s !== void 0 ? _s : lineOpacity;
|
|
120
129
|
fillOpacity = (_t = mergedConfig.fillAlphaInactive) !== null && _t !== void 0 ? _t : fillOpacity;
|
|
121
130
|
}
|
|
131
|
+
if (segmentation.activeSegmentIndex === segmentIndex) {
|
|
132
|
+
lineWidth += mergedConfig.activeSegmentOutlineWidthDelta;
|
|
133
|
+
}
|
|
122
134
|
lineWidth = mergedConfig.renderOutline ? lineWidth : 0;
|
|
123
135
|
fillOpacity = mergedConfig.renderFill ? fillOpacity : 0;
|
|
124
136
|
const color = `rgba(${segmentColor[0]}, ${segmentColor[1]}, ${segmentColor[2]}, ${lineOpacity})`;
|
|
@@ -136,26 +148,18 @@ class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
|
136
148
|
locked: annotationLocked,
|
|
137
149
|
};
|
|
138
150
|
}
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
annotationsUIDsSet = new Set();
|
|
146
|
-
annotationUIDsMap.set(segmentIndex, annotationsUIDsSet);
|
|
151
|
+
_getSegmentationRepresentation(segmentationId) {
|
|
152
|
+
const segmentationRepresentations = segmentation_1.state.getSegmentationRepresentations(this.toolGroupId);
|
|
153
|
+
const validSegmentationRepresentations = segmentationRepresentations.filter((representation) => representation.segmentationId === segmentationId);
|
|
154
|
+
if (!validSegmentationRepresentations) {
|
|
155
|
+
console.warn(`No segmentation representation found for toolGroupId: ${this.toolGroupId}`);
|
|
156
|
+
return;
|
|
147
157
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const { segmentationId, segmentIndex } = annotation.data.segmentation;
|
|
152
|
-
const segmentation = segmentation_1.state.getSegmentation(segmentationId);
|
|
153
|
-
const { annotationUIDsMap } = segmentation.representationData.CONTOUR;
|
|
154
|
-
const annotationsUIDsSet = annotationUIDsMap.get(segmentIndex);
|
|
155
|
-
annotationsUIDsSet.delete(annotation.annotationUID);
|
|
156
|
-
if (!annotationsUIDsSet.size) {
|
|
157
|
-
annotationUIDsMap.delete(segmentIndex);
|
|
158
|
+
if (segmentation_1.state.getSegmentationRepresentations(this.toolGroupId)
|
|
159
|
+
.length > 1) {
|
|
160
|
+
console.warn('Multiple segmentation representations detected for this tool group. The first one will be used.');
|
|
158
161
|
}
|
|
162
|
+
return validSegmentationRepresentations[0];
|
|
159
163
|
}
|
|
160
164
|
}
|
|
161
165
|
exports.default = ContourSegmentationBaseTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContourSegmentationBaseTool.js","sourceRoot":"","sources":["../../../../src/tools/base/ContourSegmentationBaseTool.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAgD;AAQhD,qEAM4C;AAI5C,uCAA0D;AAC1D,wEAAgD;AAChD,4GAA+G;AAC/G,0EAA8E;
|
|
1
|
+
{"version":3,"file":"ContourSegmentationBaseTool.js","sourceRoot":"","sources":["../../../../src/tools/base/ContourSegmentationBaseTool.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAgD;AAQhD,qEAM4C;AAI5C,uCAA0D;AAC1D,wEAAgD;AAChD,4GAA+G;AAC/G,0EAA8E;AAC9E,6EAG6C;AAC7C,4FAAuG;AACvG,+CAAyE;AAMzE,MAAe,2BAA4B,SAAQ,yBAAe;IAChE,YAAY,SAA0B,EAAE,gBAA2B;;QACjE,KAAK,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;QACnC,IAAI,MAAA,IAAI,CAAC,aAAa,CAAC,aAAa,0CAAE,OAAO,EAAE;YAC7C,oCAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;SAClD;IACH,CAAC;IAYS,yBAAyB;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAES,gBAAgB,CAAC,GAAoC;QAC7D,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAC7B,MAAM,iBAAiB,GAAG,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAEtD,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE;YACrC,OAAO,iBAAiB,CAAC;SAC1B;QAED,MAAM,gCAAgC,GACpC,iCAAkB,CAAC,mCAAmC,CAAC,WAAW,CAAC,CAAC;QAEtE,IAAI,CAAC,gCAAgC,EAAE;YACrC,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;SACH;QAED,MAAM,EAAE,IAAI,EAAE,gBAAg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,YAAY,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC;QAEpF,OAAO;YACL,KAAK;YACL,SAAS;YACT,SAAS;YACT,WAAW;YACX,QAAQ;YACR,OAAO,EAAE;gBACP,KAAK;aACN;YACD,UAAU,EAAE,mBAAmB,IAAI,cAAc;YACjD,MAAM,EAAE,gBAAgB;SACzB,CAAC;IACJ,CAAC;IAEO,8BAA8B,CAAC,cAAc;QACnD,MAAM,2BAA2B,GAC/B,oBAAiB,CAAC,8BAA8B,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAErE,MAAM,gCAAgC,GAAG,2BAA2B,CAAC,MAAM,CACzE,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,cAAc,KAAK,cAAc,CACrE,CAAC;QAEF,IAAI,CAAC,gCAAgC,EAAE;YACrC,OAAO,CAAC,IAAI,CACV,yDAAyD,IAAI,CAAC,WAAW,EAAE,CAC5E,CAAC;YACF,OAAO;SACR;QAED,IACE,oBAAiB,CAAC,8BAA8B,CAAC,IAAI,CAAC,WAAW,CAAC;aAC/D,MAAM,GAAG,CAAC,EACb;YACA,OAAO,CAAC,IAAI,CACV,iGAAiG,CAClG,CAAC;SACH;QAED,OAAO,gCAAgC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;CACF;AAEuC,8CAAO;AAAE,kEAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contourConfig.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/contourConfig.ts"],"names":[],"mappings":";;AAEA,MAAM,oBAAoB,GAAkB;IAC1C,aAAa,EAAE,IAAI;IACnB,yBAAyB,EAAE,CAAC;IAC5B,kBAAkB,EAAE,CAAC;IACrB,oBAAoB,EAAE,CAAC;IACvB,cAAc,EAAE,CAAC;IACjB,sBAAsB,EAAE,IAAI;IAC5B,iBAAiB,EAAE,SAAS;IAC5B,mBAAmB,EAAE,SAAS;IAC9B,wBAAwB,EAAE,KAAK;IAC/B,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,GAAG;IACd,iBAAiB,EAAE,GAAG;IACtB,sBAAsB,EAAE,GAAG;CAC5B,CAAC;AAEF,SAAS,uBAAuB;IAC9B,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,kBAAe,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"contourConfig.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/contourConfig.ts"],"names":[],"mappings":";;AAEA,MAAM,oBAAoB,GAAkB;IAC1C,aAAa,EAAE,IAAI;IACnB,yBAAyB,EAAE,CAAC;IAC5B,kBAAkB,EAAE,CAAC;IACrB,oBAAoB,EAAE,CAAC;IACvB,cAAc,EAAE,CAAC;IACjB,sBAAsB,EAAE,IAAI;IAC5B,iBAAiB,EAAE,SAAS;IAC5B,mBAAmB,EAAE,SAAS;IAC9B,wBAAwB,EAAE,KAAK;IAC/B,8BAA8B,EAAE,CAAC;IACjC,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,GAAG;IACd,iBAAiB,EAAE,GAAG;IACtB,sBAAsB,EAAE,GAAG;CAC5B,CAAC;AAEF,SAAS,uBAAuB;IAC9B,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,kBAAe,uBAAuB,CAAC"}
|
|
@@ -39,9 +39,9 @@ const core_1 = require("@cornerstonejs/core");
|
|
|
39
39
|
const SegmentationRepresentations_1 = __importDefault(require("../../../enums/SegmentationRepresentations"));
|
|
40
40
|
const SegmentationState = __importStar(require("../../../stateManagement/segmentation/segmentationState"));
|
|
41
41
|
const ToolGroupManager_1 = require("../../../store/ToolGroupManager");
|
|
42
|
-
const
|
|
42
|
+
const addOrUpdateVTKContourSets_1 = require("./vtkContour/addOrUpdateVTKContourSets");
|
|
43
43
|
const removeContourFromElement_1 = __importDefault(require("./removeContourFromElement"));
|
|
44
|
-
const contourConfigCache_1 = require("./contourConfigCache");
|
|
44
|
+
const contourConfigCache_1 = require("./vtkContour/contourConfigCache");
|
|
45
45
|
function removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID, renderImmediate = false) {
|
|
46
46
|
_removeContourFromToolGroupViewports(toolGroupId, segmentationRepresentationUID);
|
|
47
47
|
SegmentationState.removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID);
|
|
@@ -58,15 +58,18 @@ function render(viewport, representationConfig, toolGroupConfig) {
|
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
59
|
const { segmentationId } = representationConfig;
|
|
60
60
|
const segmentation = SegmentationState.getSegmentation(segmentationId);
|
|
61
|
+
if (!segmentation) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
61
64
|
const contourData = segmentation.representationData[SegmentationRepresentations_1.default.Contour];
|
|
62
|
-
const { geometryIds } = contourData;
|
|
63
|
-
if (
|
|
65
|
+
const { geometryIds, annotationUIDsMap } = contourData;
|
|
66
|
+
if (!(geometryIds === null || geometryIds === void 0 ? void 0 : geometryIds.length) && !(annotationUIDsMap === null || annotationUIDsMap === void 0 ? void 0 : annotationUIDsMap.size)) {
|
|
64
67
|
return;
|
|
65
68
|
}
|
|
66
|
-
if (!(
|
|
69
|
+
if (!(viewport instanceof core_1.BaseVolumeViewport)) {
|
|
67
70
|
return;
|
|
68
71
|
}
|
|
69
|
-
(0,
|
|
72
|
+
(0, addOrUpdateVTKContourSets_1.addOrUpdateVTKContourSets)(viewport, geometryIds, representationConfig, toolGroupConfig);
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
75
|
function _removeContourFromToolGroupViewports(toolGroupId, segmentationRepresentationUID) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contourDisplay.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/contourDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"contourDisplay.js","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,WAAW,CAAE,MAAM,CAAA,IAAI,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,CAAA,EAAE;YACpD,OAAO;SACR;QAID,IAAI,CAAC,CAAC,QAAQ,YAAY,yBAAkB,CAAC,EAAE;YAG7C,OAAO;SACR;QAGD,IAAA,qDAAyB,EACvB,QAAQ,EACR,WAAW,EACX,oBAAoB,EACpB,eAAe,CAChB,CAAC;IAkEJ,CAAC;CAAA;AAED,SAAS,oCAAoC,CAC3C,WAAmB,EACnB,6BAAqC;IAErC,MAAM,SAAS,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC;IAE5C,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,8BAA8B,WAAW,iBAAiB,CAAC,CAAC;KAC7E;IAED,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IAEpC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;QACxC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,YAAY,CAAC;QACvD,MAAM,cAAc,GAAG,IAAA,6BAAsB,EAC3C,UAAU,EACV,iBAAiB,CAClB,CAAC;QACF,IAAA,kCAAwB,EACtB,cAAc,CAAC,QAAQ,CAAC,OAAO,EAC/B,6BAA6B,CAC9B,CAAC;KACH;AACH,CAAC;AAED,kBAAe;IACb,MAAM;IACN,gCAAgC;CACjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeContourFromElement.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/removeContourFromElement.ts"],"names":[],"mappings":";;AAAA,8CAAwD;AAaxD,SAAS,wBAAwB,CAC/B,OAAuB,EACvB,6BAAqC,EACrC,eAAe,GAAG,KAAK;IAEvB,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;IAClD,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IAEpC,MAAM,YAAY,GAAI,QAAkC,CAAC,SAAS,EAAE,CAAC;IAGrE,MAAM,iBAAiB,GAAG,YAAY;SACnC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CACf,GAAG,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAC9D;SACA,MAAM,CAAC,OAAO,CAAC,CAAC;IAGnB,QAAQ,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"removeContourFromElement.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/removeContourFromElement.ts"],"names":[],"mappings":";;AAAA,8CAAwD;AAaxD,SAAS,wBAAwB,CAC/B,OAAuB,EACvB,6BAAqC,EACrC,eAAe,GAAG,KAAK;IAEvB,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;IAClD,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IAEpC,MAAM,YAAY,GAAI,QAAkC,CAAC,SAAS,EAAE,CAAC;IAGrE,MAAM,iBAAiB,GAAG,YAAY;SACnC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CACf,GAAG,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAC9D;SACA,MAAM,CAAC,OAAO,CAAC,CAAC;IAGnB,QAAQ,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;AAG3C,CAAC;AAED,kBAAe,wBAAwB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Types } from '@cornerstonejs/core';
|
|
2
|
-
import { SegmentationRepresentationConfig, ToolGroupSpecificContourRepresentation } from '
|
|
2
|
+
import { SegmentationRepresentationConfig, ToolGroupSpecificContourRepresentation } from '../../../../types';
|
|
3
3
|
export declare function addContourSetsToElement(viewport: Types.IVolumeViewport, geometryIds: string[], contourRepresentation: ToolGroupSpecificContourRepresentation, contourRepresentationConfig: SegmentationRepresentationConfig, contourActorUID: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addContourSetsToElement.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/Contour/vtkContour/addContourSetsToElement.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAmD;AACnD,sFAAiE;AACjE,oGAA+E;AAC/E,iFAA4D;AAC5D,mFAA8D;AAE9D,mCAIiB;AAMjB,6DAAsE;AAEtE,SAAgB,uBAAuB,CACrC,QAA+B,EAC/B,WAAqB,EACrB,qBAA6D,EAC7D,2BAA6D,EAC7D,eAAuB;IAEvB,MAAM,EAAE,6BAA6B,EAAE,cAAc,EAAE,GACrD,qBAAqB,CAAC;IACxB,MAAM,cAAc,GAAG,wBAAiB,CAAC,WAAW,EAAE,CAAC;IAEvD,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;IACnC,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAC;IAErC,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACjC,MAAM,QAAQ,GAAG,YAAK,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAE/C,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO,CAAC,IAAI,CACV,oCAAoC,UAAU,oBAAoB,CACnE,CAAC;YACF,OAAO;SACR;QAED,MAAM,YAAY,GAAI,QAAQ,CAAC,IAA0B,CAAC,eAAe,EAAE,CAAC;QAE5E,IAAA,wBAAgB,EAAC,QAAQ,CAAC,CAAC;QAE3B,MAAM,qBAAqB,GAAG,IAAA,gCAAwB,EACpD,qBAAqB,EACrB,UAAU,EACV,YAAY,CACb,CAAC;QAEF,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC;QACjC,MAAM,QAAQ,GAAG,IAAA,mBAAW,EAAC,UAA+B,CAAC,CAAC;QAC9D,MA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,CAAC,WAAW,EAAE,CAAC;IACrC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,KAAK,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAGrD,IAAA,mCAAc,EACZ,6BAA6B,EAC7B,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAA,mCAAc,EAAC,6BAA6B,CAAC,EAAE;QAC/D,cAAc,EAAE,IAAI,GAAG,CAAC,cAAc,CAAC;QACvC,kBAAkB;QAClB,kBAAkB;KACnB,CAAC,CACH,CAAC;IAEF,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAE3B,QAAQ,CAAC,QAAQ,CAAC;QAChB,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,KAA+B;KACvC,CAAC,CAAC;IACH,QAAQ,CAAC,WAAW,EAAE,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,CAAC;AACpB,CAAC;AA9FD,0DA8FC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { SegmentationRepresentationConfig, ToolGroupSpecificContourRepresentation } from '../../../../types';
|
|
3
|
+
export declare function addOrUpdateVTKContourSets(viewport: Types.IVolumeViewport, geometryIds: string[], contourRepresentation: ToolGroupSpecificContourRepresentation, contourRepresentationConfig: SegmentationRepresentationConfig): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addOrUpdateVTKContourSets = void 0;
|
|
4
|
+
const addContourSetsToElement_1 = require("./addContourSetsToElement");
|
|
5
|
+
const updateVTKContourSets_1 = require("./updateVTKContourSets");
|
|
6
|
+
function addOrUpdateVTKContourSets(viewport, geometryIds, contourRepresentation, contourRepresentationConfig) {
|
|
7
|
+
const { segmentationRepresentationUID } = contourRepresentation;
|
|
8
|
+
const actorUID = `CONTOUR_${segmentationRepresentationUID}`;
|
|
9
|
+
const actor = viewport.getActor(actorUID);
|
|
10
|
+
const addOrUpdateFn = actor ? updateVTKContourSets_1.updateVTKContourSets : addContourSetsToElement_1.addContourSetsToElement;
|
|
11
|
+
addOrUpdateFn(viewport, geometryIds, contourRepresentation, contourRepresentationConfig, actorUID);
|
|
12
|
+
}
|
|
13
|
+
exports.addOrUpdateVTKContourSets = addOrUpdateVTKContourSets;
|
|
14
|
+
//# sourceMappingURL=addOrUpdateVTKContourSets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addOrUpdateVTKContourSets.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/Contour/vtkContour/addOrUpdateVTKContourSets.ts"],"names":[],"mappings":";;;AAMA,uEAAoE;AACpE,iEAA8D;AAE9D,SAAgB,yBAAyB,CACvC,QAA+B,EAC/B,WAAqB,EACrB,qBAA6D,EAC7D,2BAA6D;IAE7D,MAAM,EAAE,6BAA6B,EAAE,GAAG,qBAAqB,CAAC;IAChE,MAAM,QAAQ,GAAG,WAAW,6BAA6B,EAAE,CAAC;IAC5D,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE1C,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,2CAAoB,CAAC,CAAC,CAAC,iDAAuB,CAAC;IAC7E,aAAa,CACX,QAAQ,EACR,WAAW,EACX,qBAAqB,EACrB,2BAA2B,EAC3B,QAAQ,CACT,CAAC;AACJ,CAAC;AAlBD,8DAkBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contourConfigCache.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/Contour/vtkContour/contourConfigCache.ts"],"names":[],"mappings":";;;AAYA,MAAM,2CAA2C,GAAG,IAAI,GAAG,EAAE,CAAC;AAE9D,SAAgB,cAAc,CAC5B,6BAAqC;IAErC,OAAO,2CAA2C,CAAC,GAAG,CACpD,6BAA6B,CAC9B,CAAC;AACJ,CAAC;AAND,wCAMC;AAED,SAAgB,cAAc,CAC5B,6BAAqC,EACrC,MAAmB;IAEnB,2CAA2C,CAAC,GAAG,CAC7C,6BAA6B,EAC7B,MAAM,CACP,CAAC;AACJ,CAAC;AARD,wCAQC;AAED,SAAgB,iBAAiB,CAAC,6BAAqC;IACrE,2CAA2C,CAAC,MAAM,CAChD,6BAA6B,CAC9B,CAAC;AACJ,CAAC;AAJD,8CAIC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { SegmentationRepresentationConfig, ToolGroupSpecificContourRepresentation } from '../../../../types';
|
|
3
|
+
export declare function updateVTKContourSets(viewport: Types.IVolumeViewport, geometryIds: string[], contourRepresentation: ToolGroupSpecificContourRepresentation, contourRepresentationConfig: SegmentationRepresentationConfig, contourActorUID: string): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.updateVTKContourSets = void 0;
|
|
4
4
|
const core_1 = require("@cornerstonejs/core");
|
|
5
5
|
const contourConfigCache_1 = require("./contourConfigCache");
|
|
6
6
|
const utils_1 = require("./utils");
|
|
7
|
-
function
|
|
7
|
+
function updateVTKContourSets(viewport, geometryIds, contourRepresentation, contourRepresentationConfig, contourActorUID) {
|
|
8
8
|
const { segmentationRepresentationUID, segmentsHidden } = contourRepresentation;
|
|
9
9
|
const newContourConfig = contourRepresentationConfig.representations.CONTOUR;
|
|
10
10
|
const cachedConfig = (0, contourConfigCache_1.getConfigCache)(segmentationRepresentationUID);
|
|
@@ -94,5 +94,5 @@ function updateContourSets(viewport, geometryIds, contourRepresentation, contour
|
|
|
94
94
|
}
|
|
95
95
|
viewport.render();
|
|
96
96
|
}
|
|
97
|
-
exports.
|
|
98
|
-
//# sourceMappingURL=
|
|
97
|
+
exports.updateVTKContourSets = updateVTKContourSets;
|
|
98
|
+
//# sourceMappingURL=updateVTKContourSets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateVTKContourSets.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/Contour/vtkContour/updateVTKContourSets.ts"],"names":[],"mappings":";;;AAAA,8CAAmD;AAOnD,6DAAsE;AACtE,mCAAmD;AAEnD,SAAgB,oBAAoB,CAClC,QAA+B,EAC/B,WAAqB,EACrB,qBAA6D,EAC7D,2BAA6D,EAC7D,eAAuB;IAEvB,MAAM,EAAE,6BAA6B,EAAE,cAAc,EAAE,GACrD,qBAAqB,CAAC;IACxB,MAAM,gBAAgB,GAAG,2BAA2B,CAAC,eAAe,CAAC,OAAO,CAAC;IAC7E,MAAM,YAAY,GAAG,IAAA,mCAAc,EAAC,6BAA6B,CAAC,CAAC;IAEnE,MAAM,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAE5D,IAAI,CAAC,gBAAgB,EAAE;QACrB,OAAO,CAAC,IAAI,CACV,uCAAuC,eAAe,oBAAoB,CAC3E,CAAC;QACF,OAAO;KACR;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC;IAEnC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,kBAAkB,CAAC;IAEjE,IAAI,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,kBAAkB,MAAK,oBAAoB,EAAE;QAC5D,KAA6B;aAC3B,WAAW,EAAE;aACb,YAAY,CAAC,oBAAoB,CAAC,CAAC;QAEtC,IAAA,mCAAc,EACZ,6BAA6B,EAC7B,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,YAAY,EAAE;YAC9B,kBAAkB,EAAE,oBAAoB;SACzC,CAAC,CACH,CAAC;KACH;IAED,MAAM,MAAM,GAAI,KAA6B,CAAC,SAAS,EAAE,CAAC;IAC1D,MAAM,GAAG,GAAG,MAAM,CAAC,cAAc,EAAE,CAA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C,UAAU,GAAG,aAAa,CAAC,SAAS,GAAG,GAAG,CAAC;iBAC5C;gBAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;oBAC7B,iBAAiB,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC7C,iBAAiB,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;oBACjD,iBAAiB,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;oBACjD,iBAAiB,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;iBACpD;gBAED,gBAAgB,GAAG,IAAI,CAAC;aACzB;YAED,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,IAAI,gBAAgB,EAAE;YACpB,cAAc,CAAC,QAAQ,EAAE,CAAC;SAC3B;QAED,IAAA,mCAAc,EACZ,6BAA6B,EAC7B,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,YAAY,EAAE;YAC9B,cAAc,EAAE,IAAI,GAAG,CAAC,cAAc,CAAC;SACxC,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;KAC5B;IAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AACpB,CAAC;AAhJD,oDAgJC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Types } from '@cornerstonejs/core';
|
|
2
2
|
import vtkPolyData from '@kitware/vtk.js/Common/DataModel/PolyData';
|
|
3
|
-
import { ToolGroupSpecificContourRepresentation } from '
|
|
4
|
-
export declare function getSegmentSpecificConfig(contourRepresentation: ToolGroupSpecificContourRepresentation, segmentId: string, index: number): import("
|
|
3
|
+
import { ToolGroupSpecificContourRepresentation } from '../../../../types';
|
|
4
|
+
export declare function getSegmentSpecificConfig(contourRepresentation: ToolGroupSpecificContourRepresentation, segmentId: string, index: number): import("../../../../types/ContourTypes").ContourConfig;
|
|
5
5
|
export declare function validateGeometry(geometry: Types.IGeometry): void;
|
|
6
6
|
export declare function getPolyData(contourSet: Types.IContourSet): vtkPolyData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/Contour/vtkContour/utils.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAmD;AACnD,sFAAiE;AACjE,gFAA2D;AAC3D,yFAAoE;AAepE,SAAgB,wBAAwB,CACtC,qBAA6D,EAC7D,SAAiB,EACjB,KAAa;;IAEb,IAAI,qBAAqB,GACvB,MAAA,qBAAqB,CAAC,qBAAqB,0CAAG,SAAS,CAAC,CAAC;IAE3D,IAAI,CAAC,qBAAqB,EAAE;QAE1B,qBAAqB;YACnB,MAAA,qBAAqB,CAAC,qBAAqB,0CAAG,KAAK,CAAC,CAAC;KACxD;IAED,IAAI,CAAC,qBAAqB,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,qBAAqB,CAAC,OAAO,CAAC;AACvC,CAAC;AAnBD,4DAmBC;AAOD,SAAgB,gBAAgB,CAAC,QAAyB;IACxD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,oCAAoC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;KACpE;IAED,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAC;IAE/B,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAK,CAAC,YAAY,CAAC,OAAO,EAAE;QAChD,MAAM,IAAI,KAAK,CACb,iBAAiB,QAAQ,CAAC,IAAI,+BAA+B,CAC9D,CAAC;KACH;IAED,IAAI,CAAC,QAAQ,CAAC,IAAI,EA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AAC,MAAM,CAAC,CAAC;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExB,OAAO,OAAO,CAAC;AACjB,CAAC;AA1CD,kCA0CC"}
|
|
@@ -19,7 +19,7 @@ function addLabelmapToElement(element, labelMapData, segmentationRepresentationU
|
|
|
19
19
|
const visibility = true;
|
|
20
20
|
const immediateRender = false;
|
|
21
21
|
const suppressEvents = true;
|
|
22
|
-
if ((0, stackVolumeCheck_1.isVolumeSegmentation)(labelMapData)) {
|
|
22
|
+
if ((0, stackVolumeCheck_1.isVolumeSegmentation)(labelMapData, viewport)) {
|
|
23
23
|
const volumeInputs = [
|
|
24
24
|
{
|
|
25
25
|
volumeId: labelMapData.volumeId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addLabelmapToElement.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/addLabelmapToElement.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,8CAM6B;AAK7B,2FAA4F;AAW5F,SAAe,oBAAoB,CACjC,OAAuB,EACvB,YAAsC,EACtC,6BAAqC;;QAErC,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;QAClD,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;QACrD,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;QAKpC,MAAM,UAAU,GAAG,IAAI,CAAC;QACxB,MAAM,eAAe,GAAG,KAAK,CAAC;QAC9B,MAAM,cAAc,GAAG,IAAI,CAAC;QAE5B,IAAI,IAAA,uCAAoB,EAAC,YAAY,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"addLabelmapToElement.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/addLabelmapToElement.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,8CAM6B;AAK7B,2FAA4F;AAW5F,SAAe,oBAAoB,CACjC,OAAuB,EACvB,YAAsC,EACtC,6BAAqC;;QAErC,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;QAClD,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;QACrD,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;QAKpC,MAAM,UAAU,GAAG,IAAI,CAAC;QACxB,MAAM,eAAe,GAAG,KAAK,CAAC;QAC9B,MAAM,cAAc,GAAG,IAAI,CAAC;QAE5B,IAAI,IAAA,uCAAoB,EAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;YAKhD,MAAM,YAAY,GAAyB;gBACzC;oBACE,QAAQ,EAAE,YAAY,CAAC,QAAQ;oBAC/B,QAAQ,EAAE,6BAA6B;oBACvC,UAAU;oBACV,SAAS,EAAE,YAAK,CAAC,UAAU,CAAC,uBAAuB;iBACpD;aACF,CAAC;YAGF,MAAM,IAAA,4BAAqB,EACzB,eAAe,EACf,YAAY,EACZ,CAAC,UAAU,CAAC,EACZ,eAAe,EACf,cAAc,CACf,CAAC;SACH;aAAM;YAGL,MAAM,mBAAmB,GACvB,YACD,CAAC,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC;YAExD,MAAM,WAAW,GAAwB;gBACvC;oBACE,OAAO,EAAE,mBAAmB;oBAC5B,QAAQ,EAAE,6BAA6B;iBACxC;aACF,CAAC;YAGF,MAAM,IAAA,gCAAyB,EAC7B,eAAe,EACf,WAAW,EACX,CAAC,UAAU,CAAC,EACZ,eAAe,EACf,cAAc,CACf,CAAC;SACH;IACH,CAAC;CAAA;AAED,kBAAe,oBAAoB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import labelmapDisplay from './labelmapDisplay';
|
|
2
2
|
import labelmapConfig from './labelmapConfig';
|
|
3
|
-
|
|
3
|
+
import { validate as validateLabelmap, validatePublic as validateLabelmapPublic } from './validateLabelmap';
|
|
4
|
+
export { labelmapDisplay, labelmapConfig, validateLabelmap, validateLabelmapPublic, };
|
|
@@ -3,9 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.labelmapConfig = exports.labelmapDisplay = void 0;
|
|
6
|
+
exports.validateLabelmapPublic = exports.validateLabelmap = exports.labelmapConfig = exports.labelmapDisplay = void 0;
|
|
7
7
|
const labelmapDisplay_1 = __importDefault(require("./labelmapDisplay"));
|
|
8
8
|
exports.labelmapDisplay = labelmapDisplay_1.default;
|
|
9
9
|
const labelmapConfig_1 = __importDefault(require("./labelmapConfig"));
|
|
10
10
|
exports.labelmapConfig = labelmapConfig_1.default;
|
|
11
|
+
const validateLabelmap_1 = require("./validateLabelmap");
|
|
12
|
+
Object.defineProperty(exports, "validateLabelmap", { enumerable: true, get: function () { return validateLabelmap_1.validate; } });
|
|
13
|
+
Object.defineProperty(exports, "validateLabelmapPublic", { enumerable: true, get: function () { return validateLabelmap_1.validatePublic; } });
|
|
11
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/index.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAgD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/index.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAgD;AAQ9C,0BARK,yBAAe,CAQL;AAPjB,sEAA8C;AAQ5C,yBARK,wBAAc,CAQL;AAPhB,yDAG4B;AAK1B,iGAPY,2BAAgB,OAOZ;AAChB,uGAPkB,iCAAsB,OAOlB"}
|
|
@@ -45,6 +45,7 @@ const ToolGroupManager_1 = require("../../../store/ToolGroupManager");
|
|
|
45
45
|
const addLabelmapToElement_1 = __importDefault(require("./addLabelmapToElement"));
|
|
46
46
|
const removeLabelmapFromElement_1 = __importDefault(require("./removeLabelmapFromElement"));
|
|
47
47
|
const stackVolumeCheck_1 = require("../../segmentation/strategies/utils/stackVolumeCheck");
|
|
48
|
+
const segmentation_1 = require("../../../stateManagement/segmentation");
|
|
48
49
|
const MAX_NUMBER_COLORS = 255;
|
|
49
50
|
const labelMapConfigCache = new Map();
|
|
50
51
|
function getRepresentationRenderingConfig() {
|
|
@@ -57,6 +58,7 @@ function getRepresentationRenderingConfig() {
|
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
60
|
exports.getRepresentationRenderingConfig = getRepresentationRenderingConfig;
|
|
61
|
+
let polySegConversionInProgress = false;
|
|
60
62
|
function removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID, renderImmediate = false) {
|
|
61
63
|
_removeLabelmapFromToolGroupViewports(toolGroupId, segmentationRepresentationUID);
|
|
62
64
|
SegmentationState.removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID);
|
|
@@ -97,9 +99,25 @@ function render(viewport, representation, toolGroupConfig) {
|
|
|
97
99
|
console.warn('No segmentation found for segmentationId: ', segmentationId);
|
|
98
100
|
return;
|
|
99
101
|
}
|
|
100
|
-
|
|
102
|
+
let labelmapData = segmentation.representationData[SegmentationRepresentations_1.default.Labelmap];
|
|
101
103
|
let actorEntry = viewport.getActor(segmentationRepresentationUID);
|
|
102
|
-
if (
|
|
104
|
+
if (!actorEntry &&
|
|
105
|
+
segmentation_1.polySeg.canComputeRequestedRepresentation(segmentationRepresentationUID) &&
|
|
106
|
+
!polySegConversionInProgress) {
|
|
107
|
+
polySegConversionInProgress = true;
|
|
108
|
+
labelmapData = yield segmentation_1.polySeg.computeAndAddLabelmapRepresentation(segmentationId, {
|
|
109
|
+
segmentationRepresentationUID,
|
|
110
|
+
viewport,
|
|
111
|
+
});
|
|
112
|
+
if (!labelmapData) {
|
|
113
|
+
throw new Error(`No labelmap data found for segmentationId ${segmentationId}.`);
|
|
114
|
+
}
|
|
115
|
+
polySegConversionInProgress = false;
|
|
116
|
+
}
|
|
117
|
+
if (!labelmapData) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if ((0, stackVolumeCheck_1.isVolumeSegmentation)(labelmapData, viewport)) {
|
|
103
121
|
if (viewport instanceof core_1.StackViewport) {
|
|
104
122
|
return;
|
|
105
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labelmapDisplay.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/labelmapDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2GAAsF;AACtF,iHAA4F;AAE5F,8CAM6B;AAE7B,6GAAyE;AACzE,2GAA6F;AAC7F,sEAA+D;AAW/D,kFAA0D;
|
|
1
|
+
{"version":3,"file":"labelmapDisplay.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/labelmapDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2GAAsF;AACtF,iHAA4F;AAE5F,8CAM6B;AAE7B,6GAAyE;AACzE,2GAA6F;AAC7F,sEAA+D;AAW/D,kFAA0D;AAC1D,4FAAoE;AACpE,2FAA4F;AAC5F,wEAAgE;AAEhE,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAE,CAAC;AAEtC,SAAS,gCAAgC;IACvC,MAAM,IAAI,GAAG,+BAAwB,CAAC,WAAW,EAAE,CAAC;IACpD,MAAM,IAAI,GAAG,2BAAoB,CAAC,WAAW,EAAE,CAAC;IAChD,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,OAAO;QACL,IAAI;QACJ,IAAI;KACL,CAAC;AACJ,CAAC;AAmfC,4EAAgC;AAjflC,IAAI,2BAA2B,GAAG,KAAK,CAAC;AAUxC,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CAAC,KAAK,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAG3E,mBAAmB,CAAC,GAAG,CAAC,QAAQ,EAAE;QAChC,SAAS;QACT,UAAU;QACV,aAAa;QACb,YAAY;QACZ,YAAY,EAAE,YAAY,CAAC,KAAK,EAAE;QAClC,cAAc,EAAE,IAAI,GAAG,CAAC,cAAc,CAAC;KACxC,CAAC,CAAC;IAEH,OAAO;QACL,kBAAkB;QAClB,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED,SAAS,qCAAqC,CAC5C,WAAmB,EACnB,6BAAqC;IAErC,MAAM,SAAS,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC;IAE5C,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,8BAA8B,WAAW,iBAAiB,CAAC,CAAC;KAC7E;IAED,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IAEpC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;QACxC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,YAAY,CAAC;QACvD,MAAM,cAAc,GAAG,IAAA,6BAAsB,EAC3C,UAAU,EACV,iBAAiB,CAClB,CAAC;QACF,IAAA,mCAAyB,EACvB,cAAc,CAAC,QAAQ,CAAC,OAAO,EAC/B,6BAA6B,CAC9B,CAAC;KACH;AACH,CAAC;AAED,SAAe,sBAAsB,CACnC,QAAsD,EACtD,YAAsC,EACtC,6BAA6B;;QAE7B,MAAM,IAAA,8BAAoB,EACxB,QAAQ,CAAC,OAAO,EAChB,YAAY,EACZ,6BAA6B,CAC9B,CAAC;IACJ,CAAC;CAAA;AAED,kBAAe;IACb,gCAAgC;IAChC,MAAM;IACN,gCAAgC;CACjC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SegmentationPublicInput } from '../../../types/SegmentationStateTypes';
|
|
2
|
+
import { LabelmapSegmentationData } from '../../../types/LabelmapTypes';
|
|
3
|
+
export declare function validatePublic(segmentationInput: SegmentationPublicInput): void;
|
|
4
|
+
export declare function validate(segmentationRepresentationData: LabelmapSegmentationData): void;
|