@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
|
@@ -41,24 +41,17 @@ const SegmentationConfig = __importStar(require("./config/segmentationConfig"));
|
|
|
41
41
|
const segmentationState_1 = require("./segmentationState");
|
|
42
42
|
const getRepresentationSpecificConfig_1 = require("./helpers/getRepresentationSpecificConfig");
|
|
43
43
|
const COLOR_LUT_1 = __importDefault(require("../../constants/COLOR_LUT"));
|
|
44
|
+
const ToolGroupManager_1 = require("../../store/ToolGroupManager");
|
|
45
|
+
const utilities_1 = require("../../utilities");
|
|
46
|
+
const enums_1 = require("../../enums");
|
|
44
47
|
function addSegmentationRepresentation(toolGroupId, representationInput, toolGroupSpecificConfig) {
|
|
48
|
+
var _a;
|
|
45
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
50
|
const { segmentationId, options = {} } = representationInput;
|
|
47
|
-
const segmentationRepresentationUID =
|
|
51
|
+
const segmentationRepresentationUID = ((_a = representationInput.options) === null || _a === void 0 ? void 0 : _a.segmentationRepresentationUID) ||
|
|
52
|
+
core_1.utilities.uuidv4();
|
|
48
53
|
const segmentsHidden = new Set();
|
|
49
|
-
const
|
|
50
|
-
let colorLUTIndexToUse;
|
|
51
|
-
if (typeof colorLUTOrIndexInput === 'number') {
|
|
52
|
-
colorLUTIndexToUse = colorLUTOrIndexInput;
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
const nextIndex = (0, segmentationState_1.getNextColorLUTIndex)();
|
|
56
|
-
const colorLUTToAdd = Array.isArray(colorLUTOrIndexInput)
|
|
57
|
-
? colorLUTOrIndexInput
|
|
58
|
-
: COLOR_LUT_1.default;
|
|
59
|
-
(0, segmentationState_1.addColorLUT)(colorLUTToAdd, nextIndex);
|
|
60
|
-
colorLUTIndexToUse = nextIndex;
|
|
61
|
-
}
|
|
54
|
+
const colorLUTIndexToUse = getColorLUTIndex(options);
|
|
62
55
|
const toolGroupSpecificRepresentation = {
|
|
63
56
|
segmentationId,
|
|
64
57
|
segmentationRepresentationUID,
|
|
@@ -69,6 +62,7 @@ function addSegmentationRepresentation(toolGroupId, representationInput, toolGro
|
|
|
69
62
|
segmentationRepresentationSpecificConfig: {},
|
|
70
63
|
segmentSpecificConfig: {},
|
|
71
64
|
config: (0, getRepresentationSpecificConfig_1.getRepresentationSpecificConfig)(representationInput),
|
|
65
|
+
polySeg: options.polySeg,
|
|
72
66
|
};
|
|
73
67
|
if (toolGroupSpecificConfig) {
|
|
74
68
|
const currentToolGroupConfig = SegmentationConfig.getToolGroupSpecificConfig(toolGroupId);
|
|
@@ -79,8 +73,32 @@ function addSegmentationRepresentation(toolGroupId, representationInput, toolGro
|
|
|
79
73
|
});
|
|
80
74
|
}
|
|
81
75
|
(0, segmentationState_1.addSegmentationRepresentation)(toolGroupId, toolGroupSpecificRepresentation);
|
|
76
|
+
if (representationInput.type === enums_1.SegmentationRepresentations.Contour) {
|
|
77
|
+
(0, ToolGroupManager_1.getToolGroup)(toolGroupId)
|
|
78
|
+
.getViewportsInfo()
|
|
79
|
+
.forEach(({ viewportId, renderingEngineId }) => {
|
|
80
|
+
const renderingEngine = (0, core_1.getRenderingEngine)(renderingEngineId);
|
|
81
|
+
(0, utilities_1.triggerAnnotationRenderForViewportIds)(renderingEngine, [viewportId]);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
82
84
|
return segmentationRepresentationUID;
|
|
83
85
|
});
|
|
84
86
|
}
|
|
85
87
|
exports.addSegmentationRepresentation = addSegmentationRepresentation;
|
|
88
|
+
function getColorLUTIndex(options = {}) {
|
|
89
|
+
const colorLUTOrIndexInput = options.colorLUTOrIndex;
|
|
90
|
+
let colorLUTIndexToUse;
|
|
91
|
+
if (typeof colorLUTOrIndexInput === 'number') {
|
|
92
|
+
colorLUTIndexToUse = colorLUTOrIndexInput;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const nextIndex = (0, segmentationState_1.getNextColorLUTIndex)();
|
|
96
|
+
const colorLUTToAdd = Array.isArray(colorLUTOrIndexInput)
|
|
97
|
+
? colorLUTOrIndexInput
|
|
98
|
+
: COLOR_LUT_1.default;
|
|
99
|
+
(0, segmentationState_1.addColorLUT)(colorLUTToAdd, nextIndex);
|
|
100
|
+
colorLUTIndexToUse = nextIndex;
|
|
101
|
+
}
|
|
102
|
+
return colorLUTIndexToUse;
|
|
103
|
+
}
|
|
86
104
|
//# sourceMappingURL=addSegmentationRepresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addSegmentationRepresentation.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/addSegmentationRepresentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"addSegmentationRepresentation.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/addSegmentationRepresentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAoE;AAQpE,gFAAkE;AAClE,2DAI6B;AAC7B,+FAA4F;AAC5F,0EAA8D;AAC9D,mEAA4D;AAC5D,+CAAwE;AACxE,uCAA0D;AAE1D,SAAe,6BAA6B,CAC1C,WAAmB,EACnB,mBAA8C,EAC9C,uBAA0D;;;QAE1D,MAAM,EAAE,cAAc,EAAE,OAAO,GAAG,EAAsC,EAAE,GACxE,mBAAmB,CAAC;QAEtB,MAAM,6BAA6B,GACjC,CAAA,MAAA,mBAAmB,CAAC,OAAO,0CAAE,6BAA6B;YAC1D,gBAAS,CAAC,MAAM,EAAE,CAAC;QAIrB,MAAM,cAAc,GAAG,IAAI,GAAG,EAAiB,CAAC;QAEhD,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAErD,MAAM,+BAA+B,GAAoC;YACvE,cAAc;YACd,6BAA6B;YAC7B,IAAI,EAAE,mBAAmB,CAAC,IAAI;YAC9B,cAAc;YACd,aAAa,EAAE,kBAAkB;YACjC,MAAM,EAAE,IAAI;YACZ,wCAAwC,EAAE,EAAE;YAC5C,qBAAqB,EAAE,EAAE;YACzB,MAAM,EAAE,IAAA,iEAA+B,EAAC,mBAAmB,CAAC;YAC5D,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB,CAAC;QAGF,IAAI,uBAAuB,EAAE;YAI3B,MAAM,sBAAsB,GAC1B,kBAAkB,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC;YAE7D,MAAM,YAAY,GAAG,gBAAS,CAAC,SAAS,CACtC,sBAAsB,EACtB,uBAAuB,CACxB,CAAC;YAEF,kBAAkB,CAAC,0BAA0B,CAAC,WAAW,EAAE;gBACzD,2BAA2B,EACzB,YAAY,CAAC,2BAA2B,IAAI,IAAI;gBAClD,eAAe,oBACV,YAAY,CAAC,eAAe,CAChC;aACF,CAAC,CAAC;SACJ;QAED,IAAA,iDAAoC,EAClC,WAAW,EACX,+BAA+B,CAChC,CAAC;QAEF,IAAI,mBAAmB,CAAC,IAAI,KAAK,mCAA2B,CAAC,OAAO,EAAE;YACpE,IAAA,+BAAY,EAAC,WAAW,CAAC;iBACtB,gBAAgB,EAAE;iBAClB,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,EAAE;gBAC7C,MAAM,eAAe,GAAG,IAAA,yBAAkB,EAAC,iBAAiB,CAAC,CAAC;gBAC9D,IAAA,iDAAqC,EAAC,eAAe,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YACvE,CAAC,CAAC,CAAC;SACN;QAED,OAAO,6BAA6B,CAAC;;CACtC;AAmBQ,sEAA6B;AAjBtC,SAAS,gBAAgB,CAAC,UAAU,EAAsC;IACxE,MAAM,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IACrD,IAAI,kBAAkB,CAAC;IAEvB,IAAI,OAAO,oBAAoB,KAAK,QAAQ,EAAE;QAC5C,kBAAkB,GAAG,oBAAoB,CAAC;KAC3C;SAAM;QACL,MAAM,SAAS,GAAG,IAAA,wCAAoB,GAAE,CAAC;QACzC,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC;YACvD,CAAC,CAAC,oBAAoB;YACtB,CAAC,CAAC,mBAAqB,CAAC;QAC1B,IAAA,+BAAW,EAAC,aAA+B,EAAE,SAAS,CAAC,CAAC;QACxD,kBAAkB,GAAG,SAAS,CAAC;KAChC;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
|
|
@@ -22,61 +22,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
exports.getSegmentVisibility = exports.setSegmentsVisibility = exports.setSegmentVisibility = exports.getSegmentationVisibility = exports.setSegmentationVisibility = void 0;
|
|
30
|
-
const core_1 = require("@cornerstonejs/core");
|
|
31
27
|
const SegmentationState = __importStar(require("../../../stateManagement/segmentation/segmentationState"));
|
|
32
28
|
const segmentationState_1 = require("../../../stateManagement/segmentation/segmentationState");
|
|
29
|
+
const segmentation_1 = require("../../../utilities/segmentation");
|
|
33
30
|
const triggerSegmentationEvents_1 = require("../triggerSegmentationEvents");
|
|
34
|
-
const SegmentationRepresentations_1 = __importDefault(require("../../../enums/SegmentationRepresentations"));
|
|
35
|
-
const stackVolumeCheck_1 = require("../../../tools/segmentation/strategies/utils/stackVolumeCheck");
|
|
36
|
-
function getUniqueSegmentIndices(segmentationId) {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
const segmentation = SegmentationState.getSegmentation(segmentationId);
|
|
39
|
-
if (segmentation.type === SegmentationRepresentations_1.default.Labelmap) {
|
|
40
|
-
const labelmapData = segmentation.representationData[SegmentationRepresentations_1.default.Labelmap];
|
|
41
|
-
const keySet = {};
|
|
42
|
-
if ((0, stackVolumeCheck_1.isVolumeSegmentation)(labelmapData)) {
|
|
43
|
-
const volume = core_1.cache.getVolume(segmentationId);
|
|
44
|
-
const scalarData = volume.getScalarData();
|
|
45
|
-
for (let i = 0; i < scalarData.length; i++) {
|
|
46
|
-
const segmentIndex = scalarData[i];
|
|
47
|
-
if (segmentIndex !== 0 && !keySet[segmentIndex]) {
|
|
48
|
-
keySet[segmentIndex] = true;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
labelmapData.imageIdReferenceMap.forEach((segmentationImageId) => {
|
|
54
|
-
const image = core_1.cache.getImage(segmentationImageId);
|
|
55
|
-
const scalarData = image.getPixelData();
|
|
56
|
-
for (let i = 0; i < scalarData.length; i++) {
|
|
57
|
-
const segmentIndex = scalarData[i];
|
|
58
|
-
if (segmentIndex !== 0 && !keySet[segmentIndex]) {
|
|
59
|
-
keySet[segmentIndex] = true;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
return Object.keys(keySet).map((it) => parseInt(it, 10));
|
|
65
|
-
}
|
|
66
|
-
else if (segmentation.type === SegmentationRepresentations_1.default.Contour) {
|
|
67
|
-
const annotationUIDsMap = (_a = segmentation.representationData.CONTOUR) === null || _a === void 0 ? void 0 : _a.annotationUIDsMap;
|
|
68
|
-
const indices = new Set(annotationUIDsMap.keys());
|
|
69
|
-
const geometryIds = (_b = segmentation.representationData.CONTOUR) === null || _b === void 0 ? void 0 : _b.geometryIds;
|
|
70
|
-
if (!geometryIds) {
|
|
71
|
-
throw new Error(`No geometryIds found for segmentationId ${segmentationId}`);
|
|
72
|
-
}
|
|
73
|
-
geometryIds.forEach((geometryId) => {
|
|
74
|
-
const geometry = core_1.cache.getGeometry(geometryId);
|
|
75
|
-
indices.add(geometry.data.getSegmentIndex());
|
|
76
|
-
});
|
|
77
|
-
return Array.from(indices.values()).sort();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
31
|
function setSegmentationVisibility(toolGroupId, segmentationRepresentationUID, visibility) {
|
|
81
32
|
const toolGroupSegmentationRepresentations = (0, segmentationState_1.getSegmentationRepresentations)(toolGroupId);
|
|
82
33
|
if (!toolGroupSegmentationRepresentations) {
|
|
@@ -88,7 +39,7 @@ function setSegmentationVisibility(toolGroupId, segmentationRepresentationUID, v
|
|
|
88
39
|
return;
|
|
89
40
|
}
|
|
90
41
|
const { segmentsHidden, segmentationId } = representation;
|
|
91
|
-
const indices = getUniqueSegmentIndices(segmentationId);
|
|
42
|
+
const indices = (0, segmentation_1.getUniqueSegmentIndices)(segmentationId);
|
|
92
43
|
if (visibility) {
|
|
93
44
|
segmentsHidden.clear();
|
|
94
45
|
}
|
|
@@ -108,7 +59,7 @@ function getSegmentationVisibility(toolGroupId, segmentationRepresentationUID) {
|
|
|
108
59
|
return;
|
|
109
60
|
}
|
|
110
61
|
const { segmentsHidden, segmentationId } = representation;
|
|
111
|
-
const indices = getUniqueSegmentIndices(segmentationId);
|
|
62
|
+
const indices = (0, segmentation_1.getUniqueSegmentIndices)(segmentationId);
|
|
112
63
|
const indicesSet = new Set(indices);
|
|
113
64
|
segmentsHidden.forEach((segmentIndex) => indicesSet.delete(segmentIndex));
|
|
114
65
|
return !!indicesSet.size;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentationVisibility.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/segmentationVisibility.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"segmentationVisibility.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/config/segmentationVisibility.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
declare function computeVolumeSegmentationFromStack({ imageIdReferenceMap, options, }: {
|
|
2
|
+
imageIdReferenceMap: Map<string, string>;
|
|
3
|
+
options?: {
|
|
4
|
+
volumeId?: string;
|
|
5
|
+
};
|
|
6
|
+
}): Promise<{
|
|
7
|
+
volumeId: string;
|
|
8
|
+
}>;
|
|
1
9
|
declare function convertStackToVolumeSegmentation({ segmentationId, options, }: {
|
|
2
10
|
segmentationId: string;
|
|
3
11
|
options?: {
|
|
4
12
|
toolGroupId: string;
|
|
5
13
|
volumeId?: string;
|
|
6
|
-
newSegmentationId?: string;
|
|
7
14
|
removeOriginal?: boolean;
|
|
8
15
|
};
|
|
9
16
|
}): Promise<void>;
|
|
10
|
-
export { convertStackToVolumeSegmentation };
|
|
17
|
+
export { convertStackToVolumeSegmentation, computeVolumeSegmentationFromStack };
|
|
@@ -12,54 +12,71 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.convertStackToVolumeSegmentation = void 0;
|
|
15
|
+
exports.computeVolumeSegmentationFromStack = exports.convertStackToVolumeSegmentation = void 0;
|
|
16
16
|
const core_1 = require("@cornerstonejs/core");
|
|
17
17
|
const enums_1 = require("../../enums");
|
|
18
|
-
const addSegmentations_1 = __importDefault(require("./addSegmentations"));
|
|
19
18
|
const addSegmentationRepresentations_1 = __importDefault(require("./addSegmentationRepresentations"));
|
|
20
19
|
const segmentation_1 = require("../../utilities/segmentation");
|
|
21
20
|
const segmentationState_1 = require("./segmentationState");
|
|
22
21
|
const triggerSegmentationEvents_1 = require("./triggerSegmentationEvents");
|
|
23
|
-
function
|
|
24
|
-
var _a
|
|
22
|
+
function computeVolumeSegmentationFromStack({ imageIdReferenceMap, options, }) {
|
|
23
|
+
var _a;
|
|
25
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const segmentation = (0, segmentationState_1.getSegmentation)(segmentationId);
|
|
27
|
-
const { toolGroupId } = options;
|
|
28
|
-
const data = segmentation.representationData
|
|
29
|
-
.LABELMAP;
|
|
30
|
-
const imageIdReferenceMap = data.imageIdReferenceMap;
|
|
31
25
|
const segmentationImageIds = Array.from(imageIdReferenceMap.values());
|
|
32
26
|
const additionalDetails = {
|
|
33
27
|
imageIdReferenceMap,
|
|
34
28
|
};
|
|
35
|
-
const volumeId = options === null || options === void 0 ? void 0 : options.volumeId;
|
|
29
|
+
const volumeId = (_a = options === null || options === void 0 ? void 0 : options.volumeId) !== null && _a !== void 0 ? _a : core_1.utilities.uuidv4();
|
|
36
30
|
yield core_1.volumeLoader.createAndCacheVolumeFromImages(volumeId, segmentationImageIds, {
|
|
37
31
|
additionalDetails,
|
|
38
32
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
return { volumeId };
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
exports.computeVolumeSegmentationFromStack = computeVolumeSegmentationFromStack;
|
|
37
|
+
function convertStackToVolumeSegmentation({ segmentationId, options, }) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const segmentation = (0, segmentationState_1.getSegmentation)(segmentationId);
|
|
40
|
+
const data = segmentation.representationData
|
|
41
|
+
.LABELMAP;
|
|
42
|
+
const { volumeId } = yield computeVolumeSegmentationFromStack({
|
|
43
|
+
imageIdReferenceMap: data.imageIdReferenceMap,
|
|
44
|
+
options,
|
|
45
|
+
});
|
|
46
|
+
yield updateSegmentationState({
|
|
47
|
+
segmentationId,
|
|
48
|
+
toolGroupId: options.toolGroupId,
|
|
49
|
+
options,
|
|
50
|
+
volumeId,
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
exports.convertStackToVolumeSegmentation = convertStackToVolumeSegmentation;
|
|
55
|
+
function updateSegmentationState({ segmentationId, toolGroupId, volumeId, options, }) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const segmentation = (0, segmentationState_1.getSegmentation)(segmentationId);
|
|
58
|
+
if (options === null || options === void 0 ? void 0 : options.removeOriginal) {
|
|
59
|
+
const data = segmentation.representationData
|
|
60
|
+
.LABELMAP;
|
|
61
|
+
const imageIdReferenceMap = data.imageIdReferenceMap;
|
|
62
|
+
Array.from(imageIdReferenceMap.values()).forEach((imageId) => {
|
|
63
|
+
core_1.cache.removeImageLoadObject(imageId);
|
|
64
|
+
});
|
|
65
|
+
segmentation.representationData.LABELMAP = {
|
|
66
|
+
volumeId,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
segmentation.representationData.LABELMAP = Object.assign(Object.assign({}, segmentation.representationData.LABELMAP), { volumeId });
|
|
42
71
|
}
|
|
43
|
-
yield (0, addSegmentations_1.default)([
|
|
44
|
-
{
|
|
45
|
-
segmentationId: newSegmentationId,
|
|
46
|
-
representation: {
|
|
47
|
-
type: enums_1.SegmentationRepresentations.Labelmap,
|
|
48
|
-
data: {
|
|
49
|
-
volumeId,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
]);
|
|
54
72
|
yield (0, addSegmentationRepresentations_1.default)(toolGroupId, [
|
|
55
73
|
{
|
|
56
|
-
segmentationId
|
|
74
|
+
segmentationId,
|
|
57
75
|
type: enums_1.SegmentationRepresentations.Labelmap,
|
|
58
76
|
},
|
|
59
77
|
]);
|
|
60
78
|
(0, segmentation_1.triggerSegmentationRender)(toolGroupId);
|
|
61
|
-
core_1.eventTarget.addEventListenerOnce(enums_1.Events.SEGMENTATION_RENDERED, () => (0, triggerSegmentationEvents_1.triggerSegmentationDataModified)(
|
|
79
|
+
core_1.eventTarget.addEventListenerOnce(enums_1.Events.SEGMENTATION_RENDERED, () => (0, triggerSegmentationEvents_1.triggerSegmentationDataModified)(segmentationId));
|
|
62
80
|
});
|
|
63
81
|
}
|
|
64
|
-
exports.convertStackToVolumeSegmentation = convertStackToVolumeSegmentation;
|
|
65
82
|
//# sourceMappingURL=convertStackToVolumeSegmentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertStackToVolumeSegmentation.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/convertStackToVolumeSegmentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"convertStackToVolumeSegmentation.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/convertStackToVolumeSegmentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAK6B;AAC7B,uCAAkE;AAClE,sGAA8E;AAC9E,+DAAyE;AACzE,2DAAsD;AAEtD,2EAA8E;AAE9E,SAAe,kCAAkC,CAAC,EAChD,mBAAmB,EACnB,OAAO,GAMR;;;QACC,MAAM,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;QAEtE,MAAM,iBAAiB,GAAG;YACxB,mBAAmB;SACpB,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,gBAAO,CAAC,MAAM,EAAE,CAAC;QAEvD,MAAM,mBAAY,CAAC,8BAA8B,CAC/C,QAAQ,EACR,oBAAoB,EACpB;YACE,iBAAiB;SAClB,CACF,CAAC;QAEF,OAAO,EAAE,QAAQ,EAAE,CAAC;;CACrB;AA+F0C,gFAAkC;AAhF7E,SAAe,gCAAgC,CAAC,EAC9C,cAAc,EACd,OAAO,GAQR;;QACC,MAAM,YAAY,GAAG,IAAA,mCAAe,EAAC,cAAc,CAAC,CAAC;QAErD,MAAM,IAAI,GAAG,YAAY,CAAC,kBAAkB;aACzC,QAAyC,CAAC;QAE7C,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,kCAAkC,CAAC;YAC5D,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,OAAO;SACR,CAAC,CAAC;QAEH,MAAM,uBAAuB,CAAC;YAC5B,cAAc;YACd,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,OAAO;YACP,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;CAAA;AAqDQ,4EAAgC;AAlDzC,SAAe,uBAAuB,CAAC,EACrC,cAAc,EACd,WAAW,EACX,QAAQ,EACR,OAAO,GAQR;;QACC,MAAM,YAAY,GAAG,IAAA,mCAAe,EAAC,cAAc,CAAC,CAAC;QAErD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,EAAE;YAC3B,MAAM,IAAI,GAAG,YAAY,CAAC,kBAAkB;iBACzC,QAAyC,CAAC;YAE7C,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC;YAErD,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC3D,YAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;YAEH,YAAY,CAAC,kBAAkB,CAAC,QAAQ,GAAG;gBACzC,QAAQ;aACT,CAAC;SACH;aAAM;YACL,YAAY,CAAC,kBAAkB,CAAC,QAAQ,mCACnC,YAAY,CAAC,kBAAkB,CAAC,QAAQ,KAC3C,QAAQ,GACT,CAAC;SACH;QAED,MAAM,IAAA,wCAA8B,EAAC,WAAW,EAAE;YAChD;gBACE,cAAc;gBACd,IAAI,EAAE,mCAA2B,CAAC,QAAQ;aAC3C;SACF,CAAC,CAAC;QAEH,IAAA,wCAAyB,EAAC,WAAW,CAAC,CAAC;QAGvC,kBAAW,CAAC,oBAAoB,CAAC,cAAM,CAAC,qBAAqB,EAAE,GAAG,EAAE,CAClE,IAAA,2DAA+B,EAAC,cAAc,CAAC,CAChD,CAAC;IACJ,CAAC;CAAA"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export declare function computeStackSegmentationFromVolume({ volumeId, }: {
|
|
2
|
+
volumeId: string;
|
|
3
|
+
}): Promise<{
|
|
4
|
+
imageIdReferenceMap: Map<string, string>;
|
|
5
|
+
}>;
|
|
1
6
|
export declare function convertVolumeToStackSegmentation({ segmentationId, options, }: {
|
|
2
7
|
segmentationId: string;
|
|
3
8
|
options?: {
|
|
@@ -6,3 +11,11 @@ export declare function convertVolumeToStackSegmentation({ segmentationId, optio
|
|
|
6
11
|
removeOriginal?: boolean;
|
|
7
12
|
};
|
|
8
13
|
}): Promise<void>;
|
|
14
|
+
export declare function updateStackSegmentationState({ segmentationId, toolGroupId, imageIdReferenceMap, options, }: {
|
|
15
|
+
segmentationId: string;
|
|
16
|
+
toolGroupId: string;
|
|
17
|
+
imageIdReferenceMap: Map<any, any>;
|
|
18
|
+
options?: {
|
|
19
|
+
removeOriginal?: boolean;
|
|
20
|
+
};
|
|
21
|
+
}): Promise<void>;
|
|
@@ -12,59 +12,85 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.convertVolumeToStackSegmentation = void 0;
|
|
15
|
+
exports.updateStackSegmentationState = exports.convertVolumeToStackSegmentation = exports.computeStackSegmentationFromVolume = void 0;
|
|
16
16
|
const core_1 = require("@cornerstonejs/core");
|
|
17
17
|
const enums_1 = require("../../enums");
|
|
18
|
-
const addSegmentations_1 = __importDefault(require("./addSegmentations"));
|
|
19
18
|
const addSegmentationRepresentations_1 = __importDefault(require("./addSegmentationRepresentations"));
|
|
20
19
|
const segmentation_1 = require("../../utilities/segmentation");
|
|
21
20
|
const segmentationState_1 = require("./segmentationState");
|
|
22
21
|
const triggerSegmentationEvents_1 = require("./triggerSegmentationEvents");
|
|
22
|
+
function computeStackSegmentationFromVolume({ volumeId, }) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const segmentationVolume = core_1.cache.getVolume(volumeId);
|
|
25
|
+
const hasCachedImages = segmentationVolume.imageCacheOffsetMap.size > 0;
|
|
26
|
+
let isAllImagesCached = false;
|
|
27
|
+
if (hasCachedImages) {
|
|
28
|
+
isAllImagesCached = segmentationVolume.imageIds.every((imageId) => core_1.cache.getImage(imageId));
|
|
29
|
+
}
|
|
30
|
+
const renderingEngine = (0, core_1.getRenderingEngines)()[0];
|
|
31
|
+
const volumeUsedInOtherViewports = renderingEngine
|
|
32
|
+
.getVolumeViewports()
|
|
33
|
+
.find((vp) => vp.hasVolumeId(volumeId));
|
|
34
|
+
segmentationVolume.decache(!volumeUsedInOtherViewports && isAllImagesCached);
|
|
35
|
+
const imageIdReferenceMap = _getImageIdReferenceMapForStackSegmentation(segmentationVolume);
|
|
36
|
+
return { imageIdReferenceMap };
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
exports.computeStackSegmentationFromVolume = computeStackSegmentationFromVolume;
|
|
23
40
|
function convertVolumeToStackSegmentation({ segmentationId, options, }) {
|
|
24
|
-
var _a, _b;
|
|
25
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
42
|
const segmentation = (0, segmentationState_1.getSegmentation)(segmentationId);
|
|
27
|
-
const { toolGroupId } = options;
|
|
28
43
|
const data = segmentation.representationData
|
|
29
44
|
.LABELMAP;
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
45
|
+
const { imageIdReferenceMap } = yield computeStackSegmentationFromVolume({
|
|
46
|
+
volumeId: data.volumeId,
|
|
47
|
+
});
|
|
48
|
+
yield updateStackSegmentationState({
|
|
49
|
+
segmentationId,
|
|
50
|
+
toolGroupId: options.toolGroupId,
|
|
51
|
+
imageIdReferenceMap,
|
|
52
|
+
options,
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
exports.convertVolumeToStackSegmentation = convertVolumeToStackSegmentation;
|
|
57
|
+
function updateStackSegmentationState({ segmentationId, toolGroupId, imageIdReferenceMap, options, }) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const segmentation = (0, segmentationState_1.getSegmentation)(segmentationId);
|
|
60
|
+
if (options === null || options === void 0 ? void 0 : options.removeOriginal) {
|
|
61
|
+
const data = segmentation.representationData
|
|
62
|
+
.LABELMAP;
|
|
63
|
+
if (core_1.cache.getVolume(data.volumeId)) {
|
|
64
|
+
core_1.cache.removeVolumeLoadObject(data.volumeId);
|
|
65
|
+
}
|
|
66
|
+
segmentation.representationData.LABELMAP = {
|
|
67
|
+
imageIdReferenceMap,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
segmentation.representationData.LABELMAP = Object.assign(Object.assign({}, segmentation.representationData.LABELMAP), { imageIdReferenceMap });
|
|
35
72
|
}
|
|
36
|
-
yield (0, addSegmentations_1.default)([
|
|
37
|
-
{
|
|
38
|
-
segmentationId: newSegmentationId,
|
|
39
|
-
representation: {
|
|
40
|
-
type: enums_1.SegmentationRepresentations.Labelmap,
|
|
41
|
-
data: {
|
|
42
|
-
imageIdReferenceMap,
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
]);
|
|
47
73
|
yield (0, addSegmentationRepresentations_1.default)(toolGroupId, [
|
|
48
74
|
{
|
|
49
|
-
segmentationId
|
|
75
|
+
segmentationId,
|
|
50
76
|
type: enums_1.SegmentationRepresentations.Labelmap,
|
|
51
77
|
},
|
|
52
78
|
]);
|
|
53
79
|
(0, segmentation_1.triggerSegmentationRender)(toolGroupId);
|
|
54
|
-
core_1.eventTarget.addEventListenerOnce(enums_1.Events.SEGMENTATION_RENDERED, () => (0, triggerSegmentationEvents_1.triggerSegmentationDataModified)(
|
|
80
|
+
core_1.eventTarget.addEventListenerOnce(enums_1.Events.SEGMENTATION_RENDERED, () => (0, triggerSegmentationEvents_1.triggerSegmentationDataModified)(segmentationId));
|
|
55
81
|
});
|
|
56
82
|
}
|
|
57
|
-
exports.
|
|
83
|
+
exports.updateStackSegmentationState = updateStackSegmentationState;
|
|
58
84
|
function _getImageIdReferenceMapForStackSegmentation(segmentationVolume) {
|
|
59
85
|
var _a, _b, _c, _d;
|
|
60
|
-
const segmentationImageIds = segmentationVolume.imageIds;
|
|
61
86
|
if ((_a = segmentationVolume.additionalDetails) === null || _a === void 0 ? void 0 : _a.imageIdReferenceMap) {
|
|
62
87
|
return segmentationVolume.additionalDetails.imageIdReferenceMap;
|
|
63
88
|
}
|
|
64
89
|
else if (((_b = segmentationVolume.referencedImageIds) === null || _b === void 0 ? void 0 : _b.length) &&
|
|
65
90
|
!segmentationVolume.referencedImageIds[0].startsWith('derived')) {
|
|
66
91
|
const referencedImageIds = segmentationVolume.referencedImageIds;
|
|
67
|
-
|
|
92
|
+
const segmentationImageIds = segmentationVolume.imageIds;
|
|
93
|
+
return (0, segmentation_1.createImageIdReferenceMap)(referencedImageIds, [...segmentationImageIds].reverse());
|
|
68
94
|
}
|
|
69
95
|
else {
|
|
70
96
|
const referencedVolumeId = segmentationVolume.referencedVolumeId;
|
|
@@ -86,7 +112,7 @@ function _getImageIdReferenceMapForStackSegmentation(segmentationVolume) {
|
|
|
86
112
|
segmentationImageIdsToUse =
|
|
87
113
|
segmentationVolume.convertToImageSlicesAndCache();
|
|
88
114
|
}
|
|
89
|
-
return (0, segmentation_1.createImageIdReferenceMap)(referencedImageIds, segmentationImageIdsToUse);
|
|
115
|
+
return (0, segmentation_1.createImageIdReferenceMap)(referencedImageIds, [...segmentationImageIdsToUse].reverse());
|
|
90
116
|
}
|
|
91
117
|
}
|
|
92
118
|
//# sourceMappingURL=convertVolumeToStackSegmentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertVolumeToStackSegmentation.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/convertVolumeToStackSegmentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAK6B;AAC7B,uCAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"convertVolumeToStackSegmentation.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/convertVolumeToStackSegmentation.ts"],"names":[],"mappings":"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"}
|
|
@@ -22,26 +22,23 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const Enums = __importStar(require("../../../enums"));
|
|
30
|
-
const
|
|
27
|
+
const validateLabelmap_1 = require("../../../tools/displayTools/Labelmap/validateLabelmap");
|
|
31
28
|
function validateSegmentationInput(segmentationInputArray) {
|
|
32
|
-
if (!segmentationInputArray ||
|
|
33
|
-
throw new Error('The segmentationInputArray is undefined or empty array');
|
|
29
|
+
if (!segmentationInputArray || segmentationInputArray.length === 0) {
|
|
30
|
+
throw new Error('The segmentationInputArray is undefined or an empty array');
|
|
34
31
|
}
|
|
35
32
|
segmentationInputArray.forEach((segmentationInput) => {
|
|
36
33
|
if (segmentationInput.segmentationId === undefined) {
|
|
37
|
-
throw new Error('
|
|
34
|
+
throw new Error('Undefined segmentationInput.segmentationId. Please provide a valid segmentationId');
|
|
38
35
|
}
|
|
39
36
|
if (segmentationInput.representation === undefined) {
|
|
40
|
-
throw new Error('
|
|
37
|
+
throw new Error('Undefined segmentationInput.representation. Please provide a valid representation');
|
|
41
38
|
}
|
|
42
39
|
if (segmentationInput.representation.type ===
|
|
43
40
|
Enums.SegmentationRepresentations.Labelmap) {
|
|
44
|
-
(0,
|
|
41
|
+
(0, validateLabelmap_1.validatePublic)(segmentationInput);
|
|
45
42
|
}
|
|
46
43
|
});
|
|
47
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateSegmentationInput.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/helpers/validateSegmentationInput.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validateSegmentationInput.js","sourceRoot":"","sources":["../../../../../src/stateManagement/segmentation/helpers/validateSegmentationInput.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,4FAAiH;AAYjH,SAAS,yBAAyB,CAChC,sBAAiD;IAEjD,IAAI,CAAC,sBAAsB,IAAI,sBAAsB,CAAC,MAAM,KAAK,CAAC,EAAE;QAClE,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAC;KACH;IAED,sBAAsB,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,EAAE;QACnD,IAAI,iBAAiB,CAAC,cAAc,KAAK,SAAS,EAAE;YAClD,MAAM,IAAI,KAAK,CACb,mFAAmF,CACpF,CAAC;SACH;QAED,IAAI,iBAAiB,CAAC,cAAc,KAAK,SAAS,EAAE;YAClD,MAAM,IAAI,KAAK,CACb,mFAAmF,CACpF,CAAC;SACH;QAED,IACE,iBAAiB,CAAC,cAAc,CAAC,IAAI;YACrC,KAAK,CAAC,2BAA2B,CAAC,QAAQ,EAC1C;YACA,IAAA,iCAAsB,EAAC,iBAAiB,CAAC,CAAC;SAC3C;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kBAAe,yBAAyB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import removeSegmentationsFromToolGroup from './removeSegmentationsFromToolGroup';
|
|
2
2
|
import addSegmentations from './addSegmentations';
|
|
3
3
|
import addSegmentationRepresentations from './addSegmentationRepresentations';
|
|
4
|
+
import addRepresentationData from './addRepresentationData';
|
|
4
5
|
import { convertStackToVolumeSegmentation } from './convertStackToVolumeSegmentation';
|
|
5
6
|
import { convertVolumeToStackSegmentation } from './convertVolumeToStackSegmentation';
|
|
6
7
|
import * as activeSegmentation from './activeSegmentation';
|
|
@@ -9,4 +10,5 @@ import * as state from './segmentationState';
|
|
|
9
10
|
import * as config from './config';
|
|
10
11
|
import * as segmentIndex from './segmentIndex';
|
|
11
12
|
import * as triggerSegmentationEvents from './triggerSegmentationEvents';
|
|
12
|
-
|
|
13
|
+
import * as polySegManager from './polySeg';
|
|
14
|
+
export { addSegmentations, addSegmentationRepresentations, removeSegmentationsFromToolGroup, addRepresentationData, state, activeSegmentation, segmentLocking, config, segmentIndex, triggerSegmentationEvents, convertStackToVolumeSegmentation, convertVolumeToStackSegmentation, polySegManager as polySeg, };
|
|
@@ -26,13 +26,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.convertVolumeToStackSegmentation = exports.convertStackToVolumeSegmentation = exports.triggerSegmentationEvents = exports.segmentIndex = exports.config = exports.segmentLocking = exports.
|
|
29
|
+
exports.polySeg = exports.convertVolumeToStackSegmentation = exports.convertStackToVolumeSegmentation = exports.triggerSegmentationEvents = exports.segmentIndex = exports.config = exports.segmentLocking = exports.activeSegmentation = exports.state = exports.addRepresentationData = exports.removeSegmentationsFromToolGroup = exports.addSegmentationRepresentations = exports.addSegmentations = void 0;
|
|
30
30
|
const removeSegmentationsFromToolGroup_1 = __importDefault(require("./removeSegmentationsFromToolGroup"));
|
|
31
31
|
exports.removeSegmentationsFromToolGroup = removeSegmentationsFromToolGroup_1.default;
|
|
32
32
|
const addSegmentations_1 = __importDefault(require("./addSegmentations"));
|
|
33
33
|
exports.addSegmentations = addSegmentations_1.default;
|
|
34
34
|
const addSegmentationRepresentations_1 = __importDefault(require("./addSegmentationRepresentations"));
|
|
35
35
|
exports.addSegmentationRepresentations = addSegmentationRepresentations_1.default;
|
|
36
|
+
const addRepresentationData_1 = __importDefault(require("./addRepresentationData"));
|
|
37
|
+
exports.addRepresentationData = addRepresentationData_1.default;
|
|
36
38
|
const convertStackToVolumeSegmentation_1 = require("./convertStackToVolumeSegmentation");
|
|
37
39
|
Object.defineProperty(exports, "convertStackToVolumeSegmentation", { enumerable: true, get: function () { return convertStackToVolumeSegmentation_1.convertStackToVolumeSegmentation; } });
|
|
38
40
|
const convertVolumeToStackSegmentation_1 = require("./convertVolumeToStackSegmentation");
|
|
@@ -49,4 +51,6 @@ const segmentIndex = __importStar(require("./segmentIndex"));
|
|
|
49
51
|
exports.segmentIndex = segmentIndex;
|
|
50
52
|
const triggerSegmentationEvents = __importStar(require("./triggerSegmentationEvents"));
|
|
51
53
|
exports.triggerSegmentationEvents = triggerSegmentationEvents;
|
|
54
|
+
const polySegManager = __importStar(require("./polySeg"));
|
|
55
|
+
exports.polySeg = polySegManager;
|
|
52
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0GAAkF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/stateManagement/segmentation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0GAAkF;AAoBhF,2CApBK,0CAAgC,CAoBL;AAnBlC,0EAAkD;AAiBhD,2BAjBK,0BAAgB,CAiBL;AAhBlB,sGAA8E;AAiB5E,yCAjBK,wCAA8B,CAiBL;AAhBhC,oFAA4D;AAkB1D,gCAlBK,+BAAqB,CAkBL;AAjBvB,yFAAsF;AAyBpF,iHAzBO,mEAAgC,OAyBP;AAxBlC,yFAAsF;AAyBpF,iHAzBO,mEAAgC,OAyBP;AAtBlC,yEAA2D;AAgBzD,gDAAkB;AAfpB,iEAAmD;AAgBjD,wCAAc;AAfhB,2DAA6C;AAa3C,sBAAK;AAZP,iDAAmC;AAejC,wBAAM;AAdR,6DAA+C;AAe7C,oCAAY;AAdd,uFAAyE;AAevE,8DAAyB;AAd3B,0DAA4C;AAiBxB,iCAAO"}
|
package/dist/cjs/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeAndAddContourRepresentation = void 0;
|
|
4
|
+
function computeAndAddContourRepresentation(segmentationId, options = {}) {
|
|
5
|
+
throw new Error('Not implemented yet');
|
|
6
|
+
}
|
|
7
|
+
exports.computeAndAddContourRepresentation = computeAndAddContourRepresentation;
|
|
8
|
+
//# sourceMappingURL=computeAndAddContourRepresentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeAndAddContourRepresentation.js","sourceRoot":"","sources":["../../../../../../src/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.ts"],"names":[],"mappings":";;;AAWA,SAAgB,kCAAkC,CAChD,cAAsB,EACtB,UAAoC,EAAE;IAEtC,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AALD,gFAKC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeAndAddLabelmapRepresentation = void 0;
|
|
4
|
+
const enums_1 = require("../../../../enums");
|
|
5
|
+
const computeAndAddRepresentation_1 = require("../computeAndAddRepresentation");
|
|
6
|
+
const labelmapComputationStrategies_1 = require("./labelmapComputationStrategies");
|
|
7
|
+
function computeAndAddLabelmapRepresentation(segmentationId, options = {}) {
|
|
8
|
+
return (0, computeAndAddRepresentation_1.computeAndAddRepresentation)(segmentationId, enums_1.SegmentationRepresentations.Labelmap, () => (0, labelmapComputationStrategies_1.computeLabelmapData)(segmentationId, options), () => { });
|
|
9
|
+
}
|
|
10
|
+
exports.computeAndAddLabelmapRepresentation = computeAndAddLabelmapRepresentation;
|
|
11
|
+
//# sourceMappingURL=computeAndAddLabelmapRepresentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeAndAddLabelmapRepresentation.js","sourceRoot":"","sources":["../../../../../../src/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.ts"],"names":[],"mappings":";;;AAAA,6CAAgE;AAChE,gFAA6E;AAC7E,mFAAsE;AAYtE,SAAgB,mCAAmC,CACjD,cAAsB,EACtB,UAAoC,EAAE;IAEtC,OAAO,IAAA,yDAA2B,EAChC,cAAc,EACd,mCAA2B,CAAC,QAAQ,EACpC,GAAG,EAAE,CAAC,IAAA,mDAAmB,EAAC,cAAc,EAAE,OAAO,CAAC,EAClD,GAAG,EAAE,GAAE,CAAC,CACT,CAAC;AACJ,CAAC;AAVD,kFAUC"}
|