@cornerstonejs/tools 1.53.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/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/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +6 -11
- 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 +2 -1
- package/dist/cjs/stateManagement/annotation/annotationState.js +6 -1
- package/dist/cjs/stateManagement/annotation/annotationState.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/tools/ScaleOverlayTool.js +2 -1
- package/dist/cjs/tools/ScaleOverlayTool.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 +1 -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/planarFreehandROITool/drawLoop.js +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.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/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/ContourSegmentationBaseTool.d.ts +1 -2
- package/dist/cjs/tools/base/ContourSegmentationBaseTool.js +24 -24
- package/dist/cjs/tools/base/ContourSegmentationBaseTool.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/ContourSegmentationAnnotation.d.ts +0 -1
- 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/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/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 +2 -2
- package/dist/cjs/utilities/contours/index.js +3 -3
- package/dist/cjs/utilities/contours/index.js.map +1 -1
- 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/index.d.ts +2 -1
- package/dist/cjs/utilities/math/polyline/index.js +3 -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/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/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/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +7 -12
- 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 +5 -1
- package/dist/esm/stateManagement/annotation/annotationState.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/tools/ScaleOverlayTool.js +2 -1
- package/dist/esm/tools/ScaleOverlayTool.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 +1 -2
- 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/planarFreehandROITool/drawLoop.js +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.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/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/ContourSegmentationBaseTool.js +24 -24
- package/dist/esm/tools/base/ContourSegmentationBaseTool.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/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/getDeduplicatedVTKPolyDataPoints.js +46 -0
- package/dist/esm/utilities/contours/getDeduplicatedVTKPolyDataPoints.js.map +1 -0
- package/dist/esm/utilities/contours/index.js +2 -2
- package/dist/esm/utilities/contours/index.js.map +1 -1
- 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/index.js +2 -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/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/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 +2 -1
- package/dist/types/stateManagement/annotation/annotationState.d.ts.map +1 -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/tools/ScaleOverlayTool.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/base/BaseTool.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/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/ContourSegmentationAnnotation.d.ts +0 -1
- package/dist/types/types/ContourSegmentationAnnotation.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/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/getDeduplicatedVTKPolyDataPoints.d.ts +12 -0
- package/dist/types/utilities/contours/getDeduplicatedVTKPolyDataPoints.d.ts.map +1 -0
- package/dist/types/utilities/contours/index.d.ts +2 -2
- package/dist/types/utilities/contours/index.d.ts.map +1 -1
- 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/index.d.ts +2 -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/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/enums/WorkerTypes.ts +16 -0
- package/src/enums/index.js +2 -0
- package/src/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.ts +10 -17
- 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 +6 -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/tools/ScaleOverlayTool.ts +4 -1
- package/src/tools/annotation/PlanarFreehandContourSegmentationTool.ts +1 -22
- package/src/tools/annotation/PlanarFreehandROITool.ts +2 -4
- package/src/tools/annotation/ProbeTool.ts +4 -0
- package/src/tools/annotation/SplineROITool.ts +1 -1
- package/src/tools/annotation/planarFreehandROITool/drawLoop.ts +2 -2
- package/src/tools/annotation/planarFreehandROITool/openContourEndEditLoop.ts +1 -1
- package/src/tools/base/AnnotationTool.ts +1 -1
- package/src/tools/base/BaseTool.ts +1 -6
- package/src/tools/base/ContourBaseTool.ts +1 -1
- package/src/tools/base/ContourSegmentationBaseTool.ts +45 -42
- 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/ContourSegmentationAnnotation.ts +0 -1
- package/src/types/LabelmapTypes.ts +7 -1
- package/src/types/PolySeg.ts +7 -0
- package/src/types/SegmentationStateTypes.ts +20 -4
- 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/getDeduplicatedVTKPolyDataPoints.ts +66 -0
- package/src/utilities/contours/index.ts +2 -2
- package/src/utilities/index.ts +4 -0
- package/src/utilities/math/polyline/containsPoint.ts +3 -1
- package/src/utilities/math/polyline/index.ts +2 -0
- package/src/utilities/math/polyline/isPointInsidePolyline3D.ts +56 -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
|
@@ -4,8 +4,6 @@ function areSameSegment(firstAnnotation, secondAnnotation) {
|
|
|
4
4
|
const { segmentation: firstSegmentation } = firstAnnotation.data;
|
|
5
5
|
const { segmentation: secondSegmentation } = secondAnnotation.data;
|
|
6
6
|
return (firstSegmentation.segmentationId === secondSegmentation.segmentationId &&
|
|
7
|
-
firstSegmentation.segmentationRepresentationUID ===
|
|
8
|
-
secondSegmentation.segmentationRepresentationUID &&
|
|
9
7
|
firstSegmentation.segmentIndex === secondSegmentation.segmentIndex);
|
|
10
8
|
}
|
|
11
9
|
exports.default = areSameSegment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"areSameSegment.js","sourceRoot":"","sources":["../../../../src/utilities/contourSegmentation/areSameSegment.ts"],"names":[],"mappings":";;AAUA,SAAwB,cAAc,CACpC,eAA8C,EAC9C,gBAA+C;IAE/C,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,GAAG,eAAe,CAAC,IAAI,CAAC;IACjE,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,GAAG,gBAAgB,CAAC,IAAI,CAAC;IAEnE,OAAO,CACL,iBAAiB,CAAC,cAAc,KAAK,kBAAkB,CAAC,cAAc;QACtE,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"areSameSegment.js","sourceRoot":"","sources":["../../../../src/utilities/contourSegmentation/areSameSegment.ts"],"names":[],"mappings":";;AAUA,SAAwB,cAAc,CACpC,eAA8C,EAC9C,gBAA+C;IAE/C,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,GAAG,eAAe,CAAC,IAAI,CAAC;IACjE,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,GAAG,gBAAgB,CAAC,IAAI,CAAC;IAEnE,OAAO,CACL,iBAAiB,CAAC,cAAc,KAAK,kBAAkB,CAAC,cAAc;QACtE,iBAAiB,CAAC,YAAY,KAAK,kBAAkB,CAAC,YAAY,CACnE,CAAC;AACJ,CAAC;AAXD,iCAWC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { default as areSameSegment } from './areSameSegment';
|
|
2
2
|
export { default as isContourSegmentationAnnotation } from './isContourSegmentationAnnotation';
|
|
3
|
+
export { addContourSegmentationAnnotation } from './addContourSegmentationAnnotation';
|
|
4
|
+
export { removeContourSegmentationAnnotation } from './removeContourSegmentationAnnotation';
|
|
@@ -3,9 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isContourSegmentationAnnotation = exports.areSameSegment = void 0;
|
|
6
|
+
exports.removeContourSegmentationAnnotation = exports.addContourSegmentationAnnotation = exports.isContourSegmentationAnnotation = exports.areSameSegment = void 0;
|
|
7
7
|
var areSameSegment_1 = require("./areSameSegment");
|
|
8
8
|
Object.defineProperty(exports, "areSameSegment", { enumerable: true, get: function () { return __importDefault(areSameSegment_1).default; } });
|
|
9
9
|
var isContourSegmentationAnnotation_1 = require("./isContourSegmentationAnnotation");
|
|
10
10
|
Object.defineProperty(exports, "isContourSegmentationAnnotation", { enumerable: true, get: function () { return __importDefault(isContourSegmentationAnnotation_1).default; } });
|
|
11
|
+
var addContourSegmentationAnnotation_1 = require("./addContourSegmentationAnnotation");
|
|
12
|
+
Object.defineProperty(exports, "addContourSegmentationAnnotation", { enumerable: true, get: function () { return addContourSegmentationAnnotation_1.addContourSegmentationAnnotation; } });
|
|
13
|
+
var removeContourSegmentationAnnotation_1 = require("./removeContourSegmentationAnnotation");
|
|
14
|
+
Object.defineProperty(exports, "removeContourSegmentationAnnotation", { enumerable: true, get: function () { return removeContourSegmentationAnnotation_1.removeContourSegmentationAnnotation; } });
|
|
11
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/contourSegmentation/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,qFAA+F;AAAtF,mKAAA,OAAO,OAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/contourSegmentation/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,qFAA+F;AAAtF,mKAAA,OAAO,OAAmC;AACnD,uFAAsF;AAA7E,oJAAA,gCAAgC,OAAA;AACzC,6FAA4F;AAAnF,0JAAA,mCAAmC,OAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeContourSegmentationAnnotation = void 0;
|
|
4
|
+
const segmentation_1 = require("../../stateManagement/segmentation");
|
|
5
|
+
function removeContourSegmentationAnnotation(annotation) {
|
|
6
|
+
if (!annotation.data.segmentation) {
|
|
7
|
+
throw new Error('removeContourSegmentationAnnotation: annotation does not have a segmentation data');
|
|
8
|
+
}
|
|
9
|
+
const { segmentationId, segmentIndex } = annotation.data.segmentation;
|
|
10
|
+
const segmentation = segmentation_1.state.getSegmentation(segmentationId);
|
|
11
|
+
const { annotationUIDsMap } = segmentation.representationData.CONTOUR;
|
|
12
|
+
const annotationsUIDsSet = annotationUIDsMap.get(segmentIndex);
|
|
13
|
+
annotationsUIDsSet.delete(annotation.annotationUID);
|
|
14
|
+
if (!annotationsUIDsSet.size) {
|
|
15
|
+
annotationUIDsMap.delete(segmentIndex);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.removeContourSegmentationAnnotation = removeContourSegmentationAnnotation;
|
|
19
|
+
//# sourceMappingURL=removeContourSegmentationAnnotation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeContourSegmentationAnnotation.js","sourceRoot":"","sources":["../../../../src/utilities/contourSegmentation/removeContourSegmentationAnnotation.ts"],"names":[],"mappings":";;;AAAA,qEAA2D;AAS3D,SAAgB,mCAAmC,CACjD,UAAyC;IAEzC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE;QACjC,MAAM,IAAI,KAAK,CACb,mFAAmF,CACpF,CAAC;KACH;IAED,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;IACtE,MAAM,YAAY,GAAG,oBAAK,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAC3D,MAAM,EAAE,iBAAiB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC;IACtE,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAE/D,kBAAkB,CAAC,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAGpD,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE;QAC5B,iBAAiB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;KACxC;AACH,CAAC;AApBD,kFAoBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectContourHoles.js","sourceRoot":"","sources":["../../../../src/utilities/contours/detectContourHoles.ts"],"names":[],"mappings":";;;AAmBA,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"detectContourHoles.js","sourceRoot":"","sources":["../../../../src/utilities/contours/detectContourHoles.ts"],"names":[],"mappings":";;;AAmBA,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;IAGlD,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACnB,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAEnB,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE;QACrE,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACvB,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtB,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACvB,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtB,MAAM,SAAS,GACb,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC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C,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;KACJ;SAAM;KAEN;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAvED,kDAuEC;AAED,kBAAe,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -8,7 +8,7 @@ const core_1 = require("@cornerstonejs/core");
|
|
|
8
8
|
const ImageMarchingSquares_1 = __importDefault(require("@kitware/vtk.js/Filters/General/ImageMarchingSquares"));
|
|
9
9
|
const DataArray_1 = __importDefault(require("@kitware/vtk.js/Common/Core/DataArray"));
|
|
10
10
|
const ImageData_1 = __importDefault(require("@kitware/vtk.js/Common/DataModel/ImageData"));
|
|
11
|
-
const
|
|
11
|
+
const contours_1 = require("../contours");
|
|
12
12
|
const contourFinder_1 = require("./contourFinder");
|
|
13
13
|
const SegmentationRepresentations_1 = __importDefault(require("../../enums/SegmentationRepresentations"));
|
|
14
14
|
const { Labelmap } = SegmentationRepresentations_1.default;
|
|
@@ -78,7 +78,7 @@ function generateContourSetsFromLabelmap({ segmentations }) {
|
|
|
78
78
|
mSquares.setContourValues(cValues);
|
|
79
79
|
mSquares.setMergePoints(false);
|
|
80
80
|
const msOutput = mSquares.getOutputData();
|
|
81
|
-
const reducedSet = (0,
|
|
81
|
+
const reducedSet = (0, contours_1.getDeduplicatedVTKPolyDataPoints)(msOutput);
|
|
82
82
|
if ((_a = reducedSet.points) === null || _a === void 0 ? void 0 : _a.length) {
|
|
83
83
|
const contours = (0, contourFinder_1.findContoursFromReducedSet)(reducedSet.lines);
|
|
84
84
|
sliceContours.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateContourSetsFromLabelmap.js","sourceRoot":"","sources":["../../../../src/utilities/contours/generateContourSetsFromLabelmap.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAgE;AAChE,gHAA2F;AAC3F,sFAAiE;AACjE,2FAAsE;AAEtE
|
|
1
|
+
{"version":3,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7
|
+
};
|
|
8
|
+
declare const _default: {
|
|
9
|
+
getDeduplicatedVTKPolyDataPoints: typeof getDeduplicatedVTKPolyDataPoints;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDeduplicatedVTKPolyDataPoints = void 0;
|
|
4
|
+
function getDeduplicatedVTKPolyDataPoints(polyData, bypass = false) {
|
|
5
|
+
const points = polyData.getPoints();
|
|
6
|
+
const lines = polyData.getLines();
|
|
7
|
+
const pointsArray = new Array(points.getNumberOfPoints())
|
|
8
|
+
.fill(0)
|
|
9
|
+
.map((_, i) => points.getPoint(i).slice());
|
|
10
|
+
const linesArray = new Array(lines.getNumberOfCells()).fill(0).map((_, i) => {
|
|
11
|
+
const cell = lines.getCell(i * 3).slice();
|
|
12
|
+
return { a: cell[0], b: cell[1] };
|
|
13
|
+
});
|
|
14
|
+
if (bypass) {
|
|
15
|
+
return { points: pointsArray, lines: linesArray };
|
|
16
|
+
}
|
|
17
|
+
const newPoints = [];
|
|
18
|
+
for (const [i, pt] of pointsArray.entries()) {
|
|
19
|
+
const index = newPoints.findIndex((point) => point[0] === pt[0] && point[1] === pt[1] && point[2] === pt[2]);
|
|
20
|
+
if (index >= 0) {
|
|
21
|
+
linesArray.map((line) => {
|
|
22
|
+
if (line.a === i) {
|
|
23
|
+
line.a = index;
|
|
24
|
+
}
|
|
25
|
+
if (line.b === i) {
|
|
26
|
+
line.b = index;
|
|
27
|
+
}
|
|
28
|
+
return line;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const newIndex = newPoints.length;
|
|
33
|
+
newPoints.push(pt);
|
|
34
|
+
linesArray.map((line) => {
|
|
35
|
+
if (line.a === i) {
|
|
36
|
+
line.a = newIndex;
|
|
37
|
+
}
|
|
38
|
+
if (line.b === i) {
|
|
39
|
+
line.b = newIndex;
|
|
40
|
+
}
|
|
41
|
+
return line;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const newLines = linesArray.filter((line) => line.a !== line.b);
|
|
46
|
+
return { points: newPoints, lines: newLines };
|
|
47
|
+
}
|
|
48
|
+
exports.getDeduplicatedVTKPolyDataPoints = getDeduplicatedVTKPolyDataPoints;
|
|
49
|
+
exports.default = { getDeduplicatedVTKPolyDataPoints };
|
|
50
|
+
//# sourceMappingURL=getDeduplicatedVTKPolyDataPoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDeduplicatedVTKPolyDataPoints.js","sourceRoot":"","sources":["../../../../src/utilities/contours/getDeduplicatedVTKPolyDataPoints.ts"],"names":[],"mappings":";;;AAOA,SAAgB,gCAAgC,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK;IACvE,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAIlC,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;SACtD,IAAI,CAAC,CAAC,CAAC;SACP,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IAE7C,MAAM,UAAU,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1E,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QAC1C,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC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ACD,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;SACJ;KACF;IAED,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC;IAEhE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAChD,CAAC;AAxDD,4EAwDC;AAED,kBAAe,EAAE,gCAAgC,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import areCoplanarContours from './areCoplanarContours';
|
|
2
2
|
import contourFinder from './contourFinder';
|
|
3
|
-
import
|
|
3
|
+
import { getDeduplicatedVTKPolyDataPoints } from './getDeduplicatedVTKPolyDataPoints';
|
|
4
4
|
import detectContourHoles from './detectContourHoles';
|
|
5
5
|
import { generateContourSetsFromLabelmap } from './generateContourSetsFromLabelmap';
|
|
6
6
|
import AnnotationToPointData from './AnnotationToPointData';
|
|
@@ -10,4 +10,4 @@ import updateContourPolyline from './updateContourPolyline';
|
|
|
10
10
|
import acceptAutogeneratedInterpolations from './interpolation/acceptAutogeneratedInterpolations';
|
|
11
11
|
import * as interpolation from './interpolation';
|
|
12
12
|
import findHandlePolylineIndex from './findHandlePolylineIndex';
|
|
13
|
-
export { areCoplanarContours, contourFinder,
|
|
13
|
+
export { areCoplanarContours, contourFinder, getDeduplicatedVTKPolyDataPoints, detectContourHoles, generateContourSetsFromLabelmap, AnnotationToPointData, getContourHolesDataWorld, getContourHolesDataCanvas, updateContourPolyline, interpolation, acceptAutogeneratedInterpolations, findHandlePolylineIndex, };
|
|
@@ -26,13 +26,13 @@ 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.findHandlePolylineIndex = exports.acceptAutogeneratedInterpolations = exports.interpolation = exports.updateContourPolyline = exports.getContourHolesDataCanvas = exports.getContourHolesDataWorld = exports.AnnotationToPointData = exports.generateContourSetsFromLabelmap = exports.detectContourHoles = exports.
|
|
29
|
+
exports.findHandlePolylineIndex = exports.acceptAutogeneratedInterpolations = exports.interpolation = exports.updateContourPolyline = exports.getContourHolesDataCanvas = exports.getContourHolesDataWorld = exports.AnnotationToPointData = exports.generateContourSetsFromLabelmap = exports.detectContourHoles = exports.getDeduplicatedVTKPolyDataPoints = exports.contourFinder = exports.areCoplanarContours = void 0;
|
|
30
30
|
const areCoplanarContours_1 = __importDefault(require("./areCoplanarContours"));
|
|
31
31
|
exports.areCoplanarContours = areCoplanarContours_1.default;
|
|
32
32
|
const contourFinder_1 = __importDefault(require("./contourFinder"));
|
|
33
33
|
exports.contourFinder = contourFinder_1.default;
|
|
34
|
-
const
|
|
35
|
-
exports
|
|
34
|
+
const getDeduplicatedVTKPolyDataPoints_1 = require("./getDeduplicatedVTKPolyDataPoints");
|
|
35
|
+
Object.defineProperty(exports, "getDeduplicatedVTKPolyDataPoints", { enumerable: true, get: function () { return getDeduplicatedVTKPolyDataPoints_1.getDeduplicatedVTKPolyDataPoints; } });
|
|
36
36
|
const detectContourHoles_1 = __importDefault(require("./detectContourHoles"));
|
|
37
37
|
exports.detectContourHoles = detectContourHoles_1.default;
|
|
38
38
|
const generateContourSetsFromLabelmap_1 = require("./generateContourSetsFromLabelmap");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/contours/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gFAAwD;AActD,8BAdK,6BAAmB,CAcL;AAbrB,oEAA4C;AAc1C,wBAdK,uBAAa,CAcL;AAbf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/contours/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gFAAwD;AActD,8BAdK,6BAAmB,CAcL;AAbrB,oEAA4C;AAc1C,wBAdK,uBAAa,CAcL;AAbf,yFAAsF;AAcpF,iHAdO,mEAAgC,OAcP;AAblC,8EAAsD;AAcpD,6BAdK,4BAAkB,CAcL;AAbpB,uFAAoF;AAclF,gHAdO,iEAA+B,OAcP;AAbjC,oFAA4D;AAc1D,gCAdK,+BAAqB,CAcL;AAbvB,0FAAkE;AAchE,mCAdK,kCAAwB,CAcL;AAb1B,4FAAoE;AAclE,oCAdK,mCAAyB,CAcL;AAb3B,oFAA4D;AAc1D,gCAdK,+BAAqB,CAcL;AAbvB,0HAAkG;AAehG,4CAfK,2CAAiC,CAeL;AAdnC,+DAAiD;AAa/C,sCAAa;AAZf,wFAAgE;AAc9D,kCAdK,iCAAuB,CAcL"}
|
|
@@ -7,6 +7,7 @@ import clip from './clip';
|
|
|
7
7
|
import calibrateImageSpacing from './calibrateImageSpacing';
|
|
8
8
|
import { getCalibratedLengthUnits, getCalibratedAreaUnits, getCalibratedScale } from './getCalibratedUnits';
|
|
9
9
|
import triggerAnnotationRenderForViewportIds from './triggerAnnotationRenderForViewportIds';
|
|
10
|
+
import triggerAnnotationRenderForToolGroupIds from './triggerAnnotationRenderForToolGroupIds';
|
|
10
11
|
import triggerAnnotationRender from './triggerAnnotationRender';
|
|
11
12
|
import jumpToSlice from './viewport/jumpToSlice';
|
|
12
13
|
import pointInShapeCallback from './pointInShapeCallback';
|
|
@@ -33,6 +34,7 @@ import * as touch from './touch';
|
|
|
33
34
|
import * as dynamicVolume from './dynamicVolume';
|
|
34
35
|
import * as polyDataUtils from './polyData/utils';
|
|
35
36
|
import * as voi from './voi';
|
|
37
|
+
import * as contourSegmentation from './contourSegmentation';
|
|
36
38
|
declare const roundNumber: typeof utilities.roundNumber;
|
|
37
39
|
import { triggerEvent } from '@cornerstonejs/core';
|
|
38
|
-
export { math, planar, viewportFilters, drawing, debounce, dynamicVolume, throttle, orientation, isObject, touch, triggerEvent, calibrateImageSpacing, getCalibratedLengthUnits, getCalibratedAreaUnits, getCalibratedScale, segmentation, contours, triggerAnnotationRenderForViewportIds, triggerAnnotationRender, pointInShapeCallback, getSphereBoundsInfo, getAnnotationNearPoint, getViewportForAnnotation, getAnnotationNearPointOnEnabledElement, jumpToSlice, pointInSurroundingSphereCallback, viewport, cine, clip, boundingBox, rectangleROITool, planarFreehandROITool, stackPrefetch, stackContextPrefetch, scroll, roundNumber, pointToString, polyDataUtils, voi, annotationFrameRange, };
|
|
40
|
+
export { math, planar, viewportFilters, drawing, debounce, dynamicVolume, throttle, orientation, isObject, touch, triggerEvent, calibrateImageSpacing, getCalibratedLengthUnits, getCalibratedAreaUnits, getCalibratedScale, segmentation, contours, triggerAnnotationRenderForViewportIds, triggerAnnotationRenderForToolGroupIds, triggerAnnotationRender, pointInShapeCallback, getSphereBoundsInfo, getAnnotationNearPoint, getViewportForAnnotation, getAnnotationNearPointOnEnabledElement, jumpToSlice, pointInSurroundingSphereCallback, viewport, cine, clip, boundingBox, rectangleROITool, planarFreehandROITool, stackPrefetch, stackContextPrefetch, scroll, roundNumber, pointToString, polyDataUtils, voi, annotationFrameRange, contourSegmentation, };
|
|
@@ -26,7 +26,7 @@ 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.annotationFrameRange = exports.voi = exports.polyDataUtils = exports.pointToString = exports.roundNumber = exports.scroll = exports.stackContextPrefetch = exports.stackPrefetch = exports.planarFreehandROITool = exports.rectangleROITool = exports.boundingBox = exports.clip = exports.cine = exports.viewport = exports.pointInSurroundingSphereCallback = exports.jumpToSlice = exports.getAnnotationNearPointOnEnabledElement = exports.getViewportForAnnotation = exports.getAnnotationNearPoint = exports.getSphereBoundsInfo = exports.pointInShapeCallback = exports.triggerAnnotationRender = exports.triggerAnnotationRenderForViewportIds = exports.contours = exports.segmentation = exports.getCalibratedScale = exports.getCalibratedAreaUnits = exports.getCalibratedLengthUnits = exports.calibrateImageSpacing = exports.triggerEvent = exports.touch = exports.isObject = exports.orientation = exports.throttle = exports.dynamicVolume = exports.debounce = exports.drawing = exports.viewportFilters = exports.planar = exports.math = void 0;
|
|
29
|
+
exports.contourSegmentation = exports.annotationFrameRange = exports.voi = exports.polyDataUtils = exports.pointToString = exports.roundNumber = exports.scroll = exports.stackContextPrefetch = exports.stackPrefetch = exports.planarFreehandROITool = exports.rectangleROITool = exports.boundingBox = exports.clip = exports.cine = exports.viewport = exports.pointInSurroundingSphereCallback = exports.jumpToSlice = exports.getAnnotationNearPointOnEnabledElement = exports.getViewportForAnnotation = exports.getAnnotationNearPoint = exports.getSphereBoundsInfo = exports.pointInShapeCallback = exports.triggerAnnotationRender = exports.triggerAnnotationRenderForToolGroupIds = exports.triggerAnnotationRenderForViewportIds = exports.contours = exports.segmentation = exports.getCalibratedScale = exports.getCalibratedAreaUnits = exports.getCalibratedLengthUnits = exports.calibrateImageSpacing = exports.triggerEvent = exports.touch = exports.isObject = exports.orientation = exports.throttle = exports.dynamicVolume = exports.debounce = exports.drawing = exports.viewportFilters = exports.planar = exports.math = void 0;
|
|
30
30
|
const core_1 = require("@cornerstonejs/core");
|
|
31
31
|
const getAnnotationNearPoint_1 = require("./getAnnotationNearPoint");
|
|
32
32
|
Object.defineProperty(exports, "getAnnotationNearPoint", { enumerable: true, get: function () { return getAnnotationNearPoint_1.getAnnotationNearPoint; } });
|
|
@@ -47,6 +47,8 @@ Object.defineProperty(exports, "getCalibratedAreaUnits", { enumerable: true, get
|
|
|
47
47
|
Object.defineProperty(exports, "getCalibratedScale", { enumerable: true, get: function () { return getCalibratedUnits_1.getCalibratedScale; } });
|
|
48
48
|
const triggerAnnotationRenderForViewportIds_1 = __importDefault(require("./triggerAnnotationRenderForViewportIds"));
|
|
49
49
|
exports.triggerAnnotationRenderForViewportIds = triggerAnnotationRenderForViewportIds_1.default;
|
|
50
|
+
const triggerAnnotationRenderForToolGroupIds_1 = __importDefault(require("./triggerAnnotationRenderForToolGroupIds"));
|
|
51
|
+
exports.triggerAnnotationRenderForToolGroupIds = triggerAnnotationRenderForToolGroupIds_1.default;
|
|
50
52
|
const triggerAnnotationRender_1 = __importDefault(require("./triggerAnnotationRender"));
|
|
51
53
|
exports.triggerAnnotationRender = triggerAnnotationRender_1.default;
|
|
52
54
|
const jumpToSlice_1 = __importDefault(require("./viewport/jumpToSlice"));
|
|
@@ -100,6 +102,8 @@ const polyDataUtils = __importStar(require("./polyData/utils"));
|
|
|
100
102
|
exports.polyDataUtils = polyDataUtils;
|
|
101
103
|
const voi = __importStar(require("./voi"));
|
|
102
104
|
exports.voi = voi;
|
|
105
|
+
const contourSegmentation = __importStar(require("./contourSegmentation"));
|
|
106
|
+
exports.contourSegmentation = contourSegmentation;
|
|
103
107
|
const roundNumber = core_1.utilities.roundNumber;
|
|
104
108
|
exports.roundNumber = roundNumber;
|
|
105
109
|
const core_2 = require("@cornerstonejs/core");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utilities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgD;AAEhD,qEAGkC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utilities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgD;AAEhD,qEAGkC;AA0EhC,uGA5EA,+CAAsB,OA4EA;AAEtB,uHA7EA,+DAAsC,OA6EA;AAzExC,0DAAkC;AAqDhC,mBArDK,kBAAQ,CAqDL;AApDV,0DAAkC;AAsDhC,mBAtDK,kBAAQ,CAsDL;AArDV,0DAAkC;AAuDhC,mBAvDK,kBAAQ,CAuDL;AAtDV,kDAA0B;AA2ExB,eA3EK,cAAI,CA2EL;AA1EN,oFAA4D;AAwD1D,gC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3B,kBAAG;AA/CL,2EAA6D;AAiD3D,kDAAmB;AA/CrB,MAAM,WAAW,GAAG,gBAAS,CAAC,WAAW,CAAC;AA0CxC,kCAAW;AAvCb,8CAAmD;AAajD,6FAbO,mBAAY,OAaP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containsPoint.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/containsPoint.ts"],"names":[],"mappings":";;;;;AACA,0DAAkC;
|
|
1
|
+
{"version":3,"file":"containsPoint.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/containsPoint.ts"],"names":[],"mappings":";;;;;AACA,0DAAkC;AAelC,SAAwB,aAAa,CACnC,QAAwB,EACxB,KAAmB,EACnB,MAAgB;IAEhB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC1C,IAAI,gBAAgB,GAAG,CAAC,CAAC;IAGzB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAA,kBAAQ,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC1E,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,eAAe,EAAE,CAAC,EAAE,EAAE;QACzC,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAIvB,MAAM,OAAO,GAAG,CAAC,KAAK,iBAAiB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACxD,MAAM,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;QAG7B,MAAM,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CAAC,CAAC,CAAC,CAAC,CAAC;SACxC;KACF;IAED,OAAO,CAAC,CAAC,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC;AAClC,CAAC;AAhDD,gCAgDC"}
|
|
@@ -17,4 +17,5 @@ import getSubPixelSpacingAndXYDirections from './getSubPixelSpacingAndXYDirectio
|
|
|
17
17
|
import pointsAreWithinCloseContourProximity from './pointsAreWithinCloseContourProximity';
|
|
18
18
|
import addCanvasPointsToArray from './addCanvasPointsToArray';
|
|
19
19
|
import pointCanProjectOnLine from './pointCanProjectOnLine';
|
|
20
|
-
|
|
20
|
+
import { isPointInsidePolyline3D } from './isPointInsidePolyline3D';
|
|
21
|
+
export { isClosed, containsPoint, containsPoints, getAABB, getArea, getSignedArea, getWindingDirection, getNormal3, getNormal2, intersectPolyline, getFirstLineSegmentIntersectionIndexes, getLineSegmentIntersectionsIndexes, getLineSegmentIntersectionsCoordinates, getClosestLineSegmentIntersection, getSubPixelSpacingAndXYDirections, pointsAreWithinCloseContourProximity, addCanvasPointsToArray, pointCanProjectOnLine, mergePolylines, subtractPolylines, isPointInsidePolyline3D, };
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.subtractPolylines = exports.mergePolylines = exports.pointCanProjectOnLine = exports.addCanvasPointsToArray = exports.pointsAreWithinCloseContourProximity = exports.getSubPixelSpacingAndXYDirections = exports.getClosestLineSegmentIntersection = exports.getLineSegmentIntersectionsCoordinates = exports.getLineSegmentIntersectionsIndexes = exports.getFirstLineSegmentIntersectionIndexes = exports.intersectPolyline = exports.getNormal2 = exports.getNormal3 = exports.getWindingDirection = exports.getSignedArea = exports.getArea = exports.getAABB = exports.containsPoints = exports.containsPoint = exports.isClosed = void 0;
|
|
6
|
+
exports.isPointInsidePolyline3D = exports.subtractPolylines = exports.mergePolylines = exports.pointCanProjectOnLine = exports.addCanvasPointsToArray = exports.pointsAreWithinCloseContourProximity = exports.getSubPixelSpacingAndXYDirections = exports.getClosestLineSegmentIntersection = exports.getLineSegmentIntersectionsCoordinates = exports.getLineSegmentIntersectionsIndexes = exports.getFirstLineSegmentIntersectionIndexes = exports.intersectPolyline = exports.getNormal2 = exports.getNormal3 = exports.getWindingDirection = exports.getSignedArea = exports.getArea = exports.getAABB = exports.containsPoints = exports.containsPoint = exports.isClosed = void 0;
|
|
7
7
|
const isClosed_1 = __importDefault(require("./isClosed"));
|
|
8
8
|
exports.isClosed = isClosed_1.default;
|
|
9
9
|
const containsPoint_1 = __importDefault(require("./containsPoint"));
|
|
@@ -43,4 +43,6 @@ const addCanvasPointsToArray_1 = __importDefault(require("./addCanvasPointsToArr
|
|
|
43
43
|
exports.addCanvasPointsToArray = addCanvasPointsToArray_1.default;
|
|
44
44
|
const pointCanProjectOnLine_1 = __importDefault(require("./pointCanProjectOnLine"));
|
|
45
45
|
exports.pointCanProjectOnLine = pointCanProjectOnLine_1.default;
|
|
46
|
+
const isPointInsidePolyline3D_1 = require("./isPointInsidePolyline3D");
|
|
47
|
+
Object.defineProperty(exports, "isPointInsidePolyline3D", { enumerable: true, get: function () { return isPointInsidePolyline3D_1.isPointInsidePolyline3D; } });
|
|
46
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAkC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAkC;AAsBhC,mBAtBK,kBAAQ,CAsBL;AArBV,oEAA4C;AAsB1C,wBAtBK,uBAAa,CAsBL;AArBf,sEAA8C;AAsB5C,yBAtBK,wBAAc,CAsBL;AArBhB,wDAAgC;AAsB9B,kBAtBK,iBAAO,CAsBL;AArBT,wDAAgC;AAsB9B,kBAtBK,iBAAO,CAsBL;AArBT,oEAA4C;AAsB1C,wBAtBK,uBAAa,CAsBL;AArBf,gFAAwD;AAsBtD,8BAtBK,6BAAmB,CAsBL;AArBrB,8DAAsC;AAsBpC,qBAtBK,oBAAU,CAsBL;AArBZ,8DAAsC;AAsBpC,qBAtBK,oBAAU,CAsBL;AArBZ,uDAAsE;AA+BpE,+FA/BO,gCAAc,OA+BP;AACd,kGAhCuB,mCAAiB,OAgCvB;AA/BnB,4EAAoD;AAqBlD,4BArBK,2BAAiB,CAqBL;AApBnB,sHAA8F;AAqB5F,iDArBK,gDAAsC,CAqBL;AApBxC,8GAAsF;AAqBpF,6CArBK,4CAAkC,CAqBL;AApBpC,sHAA8F;AAqB5F,iDArBK,gDAAsC,CAqBL;AApBxC,4GAAoF;AAqBlF,4CArBK,2CAAiC,CAqBL;AApBnC,4GAAoF;AAqBlF,4CArBK,2CAAiC,CAqBL;AApBnC,kHAA0F;AAqBxF,+CArBK,8CAAoC,CAqBL;AApBtC,sFAA8D;AAqB5D,iCArBK,gCAAsB,CAqBL;AApBxB,oFAA4D;AAqB1D,gCArBK,+BAAqB,CAqBL;AApBvB,uEAAoE;AAuBlE,wGAvBO,iDAAuB,OAuBP"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isPointInsidePolyline3D = void 0;
|
|
7
|
+
const containsPoint_1 = __importDefault(require("./containsPoint"));
|
|
8
|
+
function isPointInsidePolyline3D(point, polyline) {
|
|
9
|
+
let sharedDimensionIndex;
|
|
10
|
+
const testPoints = polyline.slice(0, 3);
|
|
11
|
+
for (let i = 0; i < 3; i++) {
|
|
12
|
+
if (testPoints.every((point, index, array) => point[i] === array[0][i])) {
|
|
13
|
+
sharedDimensionIndex = i;
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (sharedDimensionIndex === undefined) {
|
|
18
|
+
throw new Error('Cannot find a shared dimension index for polyline, probably oblique plane');
|
|
19
|
+
}
|
|
20
|
+
const points2D = [];
|
|
21
|
+
for (let i = 0; i < polyline.length; i++) {
|
|
22
|
+
points2D.push([
|
|
23
|
+
polyline[i][(sharedDimensionIndex + 1) % 3],
|
|
24
|
+
polyline[i][(sharedDimensionIndex + 2) % 3],
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
const point2D = [
|
|
28
|
+
point[(sharedDimensionIndex + 1) % 3],
|
|
29
|
+
point[(sharedDimensionIndex + 2) % 3],
|
|
30
|
+
];
|
|
31
|
+
return (0, containsPoint_1.default)(points2D, point2D);
|
|
32
|
+
}
|
|
33
|
+
exports.isPointInsidePolyline3D = isPointInsidePolyline3D;
|
|
34
|
+
//# sourceMappingURL=isPointInsidePolyline3D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPointInsidePolyline3D.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/isPointInsidePolyline3D.ts"],"names":[],"mappings":";;;;;;AACA,oEAA4C;AAa5C,SAAgB,uBAAuB,CACrC,KAAmB,EACnB,QAAwB;IAOxB,IAAI,oBAAoB,CAAC;IAEzB,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1B,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACvE,oBAAoB,GAAG,CAAC,CAAC;YACzB,MAAM;SACP;KACF;IAED,IAAI,oBAAoB,KAAK,SAAS,EAAE;QACtC,MAAM,IAAI,KAAK,CACb,2EAA2E,CAC5E,CAAC;KACH;IAGD,MAAM,QAAQ,GAAG,EAAoB,CAAC;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACxC,QAAQ,CAAC,IAAI,CAAC;YACZ,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YAC3C,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;SAC5C,CAAC,CAAC;KACJ;IAED,MAAM,OAAO,GAAG;QACd,KAAK,CAAC,CAAC,oBAAoB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACrC,KAAK,CAAC,CAAC,oBAAoB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;KACtB,CAAC;IAElB,OAAO,IAAA,uBAAa,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC;AAzCD,0DAyCC"}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const contours_1 = require("../contours");
|
|
7
7
|
const SegmentationRepresentations_1 = __importDefault(require("../../enums/SegmentationRepresentations"));
|
|
8
8
|
const findLargestBidirectional_1 = __importDefault(require("./findLargestBidirectional"));
|
|
9
|
-
const EPSILON = 1e-2;
|
|
10
9
|
const { Labelmap } = SegmentationRepresentations_1.default;
|
|
11
10
|
function contourAndFindLargestBidirectional(segmentation) {
|
|
12
11
|
const contours = (0, contours_1.generateContourSetsFromLabelmap)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contourAndFindLargestBidirectional.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/contourAndFindLargestBidirectional.ts"],"names":[],"mappings":";;;;;AAAA,0CAA8D;AAC9D,0GAAkF;AAClF,0FAAkE;AAElE,MAAM,
|
|
1
|
+
{"version":3,"file":"contourAndFindLargestBidirectional.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/contourAndFindLargestBidirectional.ts"],"names":[],"mappings":";;;;;AAAA,0CAA8D;AAC9D,0GAAkF;AAClF,0FAAkE;AAElE,MAAM,EAAE,QAAQ,EAAE,GAAG,qCAA2B,CAAC;AAYjD,SAAwB,kCAAkC,CAAC,YAAY;IACrE,MAAM,QAAQ,GAAG,IAAA,0CAA+B,EAAC;QAC/C,aAAa,EAAE,YAAY;KAC5B,CAAC,CAAC;IAEH,IAAI,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAA,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE;QAC1D,OAAO;KACR;IAED,MAAM,EACJ,kBAAkB,EAClB,QAAQ,GAAG;QACT,IAAI;QACJ,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE;KACrE,GACF,GAAG,YAAY,CAAC;IACjB,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAE/D,MAAM,YAAY,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACtD,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE;QACvB,OAAO;KACR;IACD,QAAQ,CAAC,YAAY,CAAC,CAAC,YAAY,GAAG,YAAY,CAAC;IACnD,OAAO,IAAA,kCAAwB,EAC7B,QAAQ,CAAC,CAAC,CAAC,EACX,WAAW,EACX,QAAQ,CAAC,YAAY,CAAC,CACvB,CAAC;AACJ,CAAC;AA5BD,qDA4BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getHoveredContourSegmentationAnnotation(segmentationId: any): number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHoveredContourSegmentationAnnotation = void 0;
|
|
4
|
+
const stateManagement_1 = require("../../stateManagement");
|
|
5
|
+
const segmentationState_1 = require("../../stateManagement/segmentation/segmentationState");
|
|
6
|
+
function getHoveredContourSegmentationAnnotation(segmentationId) {
|
|
7
|
+
const segmentation = (0, segmentationState_1.getSegmentation)(segmentationId);
|
|
8
|
+
const { annotationUIDsMap } = segmentation.representationData.CONTOUR;
|
|
9
|
+
for (const [segmentIndex, annotationUIDs] of annotationUIDsMap.entries()) {
|
|
10
|
+
const highlightedAnnotationUID = Array.from(annotationUIDs).find((annotationUID) => (0, stateManagement_1.getAnnotation)(annotationUID).highlighted);
|
|
11
|
+
if (highlightedAnnotationUID) {
|
|
12
|
+
return segmentIndex;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
exports.getHoveredContourSegmentationAnnotation = getHoveredContourSegmentationAnnotation;
|
|
18
|
+
//# sourceMappingURL=getHoveredContourSegmentationAnnotation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getHoveredContourSegmentationAnnotation.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/getHoveredContourSegmentationAnnotation.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,4FAAuF;AAQvF,SAAgB,uCAAuC,CAAC,cAAc;IACpE,MAAM,YAAY,GAAG,IAAA,mCAAe,EAAC,cAAc,CAAC,CAAC;IACrD,MAAM,EAAE,iBAAiB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC;IAEtE,KAAK,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,iBAAiB,CAAC,OAAO,EAAE,EAAE;QACxE,MAAM,wBAAwB,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,CAC9D,CAAC,aAAa,EAAE,EAAE,CAAC,IAAA,+BAAa,EAAC,aAAa,CAAC,CAAC,WAAW,CAC5D,CAAC;QAEF,IAAI,wBAAwB,EAAE;YAC5B,OAAO,YAAY,CAAC;SACrB;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAfD,0FAeC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
declare type Options = {
|
|
3
|
+
viewport?: Types.IViewport;
|
|
4
|
+
searchRadius?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function getSegmentAtLabelmapBorder(segmentationId: string, worldPoint: Types.Point3, { viewport, searchRadius }: Options): number;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSegmentAtLabelmapBorder = void 0;
|
|
4
|
+
const core_1 = require("@cornerstonejs/core");
|
|
5
|
+
const segmentationState_1 = require("../../stateManagement/segmentation/segmentationState");
|
|
6
|
+
const stackVolumeCheck_1 = require("../../tools/segmentation/strategies/utils/stackVolumeCheck");
|
|
7
|
+
function getSegmentAtLabelmapBorder(segmentationId, worldPoint, { viewport, searchRadius }) {
|
|
8
|
+
const segmentation = (0, segmentationState_1.getSegmentation)(segmentationId);
|
|
9
|
+
const labelmapData = segmentation.representationData.LABELMAP;
|
|
10
|
+
if ((0, stackVolumeCheck_1.isVolumeSegmentation)(labelmapData)) {
|
|
11
|
+
const { volumeId } = labelmapData;
|
|
12
|
+
const segmentationVolume = core_1.cache.getVolume(volumeId);
|
|
13
|
+
if (!segmentationVolume) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const imageData = segmentationVolume.imageData;
|
|
17
|
+
const segmentIndex = imageData.getScalarValueFromWorld(worldPoint);
|
|
18
|
+
const canvasPoint = viewport.worldToCanvas(worldPoint);
|
|
19
|
+
const onEdge = isSegmentOnEdgeCanvas(canvasPoint, segmentIndex, viewport, imageData, searchRadius);
|
|
20
|
+
return onEdge ? segmentIndex : undefined;
|
|
21
|
+
}
|
|
22
|
+
const { imageIdReferenceMap } = labelmapData;
|
|
23
|
+
const currentImageId = viewport.getCurrentImageId();
|
|
24
|
+
const segmentationImageId = imageIdReferenceMap.get(currentImageId);
|
|
25
|
+
const image = core_1.cache.getImage(segmentationImageId);
|
|
26
|
+
if (!image) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const segmentationRepresentations = (0, segmentationState_1.getSegmentationIdRepresentations)(segmentation.segmentationId);
|
|
30
|
+
const { segmentationRepresentationUID } = segmentationRepresentations[0];
|
|
31
|
+
const segmentationActor = viewport.getActor(segmentationRepresentationUID);
|
|
32
|
+
const imageData = segmentationActor === null || segmentationActor === void 0 ? void 0 : segmentationActor.actor.getMapper().getInputData();
|
|
33
|
+
const indexIJK = core_1.utilities.transformWorldToIndex(imageData, worldPoint);
|
|
34
|
+
const dimensions = imageData.getDimensions();
|
|
35
|
+
const voxelManager = core_1.utilities.VoxelManager.createVolumeVoxelManager(dimensions, imageData.getPointData().getScalars().getData());
|
|
36
|
+
const segmentIndex = voxelManager.getAtIJK(...indexIJK);
|
|
37
|
+
const onEdge = isSegmentOnEdgeIJK(indexIJK, dimensions, voxelManager, segmentIndex);
|
|
38
|
+
return onEdge ? segmentIndex : undefined;
|
|
39
|
+
}
|
|
40
|
+
exports.getSegmentAtLabelmapBorder = getSegmentAtLabelmapBorder;
|
|
41
|
+
function isSegmentOnEdge(getNeighborIndex, segmentIndex, searchRadius = 1) {
|
|
42
|
+
const neighborRange = Array.from({ length: 2 * searchRadius + 1 }, (_, i) => i - searchRadius);
|
|
43
|
+
for (const deltaI of neighborRange) {
|
|
44
|
+
for (const deltaJ of neighborRange) {
|
|
45
|
+
for (const deltaK of neighborRange) {
|
|
46
|
+
if (deltaI === 0 && deltaJ === 0 && deltaK === 0) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const neighborIndex = getNeighborIndex(deltaI, deltaJ, deltaK);
|
|
50
|
+
if (neighborIndex !== undefined && segmentIndex !== neighborIndex) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
function isSegmentOnEdgeIJK(indexIJK, dimensions, voxelManager, segmentIndex, searchRadius) {
|
|
59
|
+
const getNeighborIndex = (deltaI, deltaJ, deltaK) => {
|
|
60
|
+
const neighborIJK = [
|
|
61
|
+
indexIJK[0] + deltaI,
|
|
62
|
+
indexIJK[1] + deltaJ,
|
|
63
|
+
indexIJK[2] + deltaK,
|
|
64
|
+
];
|
|
65
|
+
return voxelManager.getAtIJK(...neighborIJK);
|
|
66
|
+
};
|
|
67
|
+
return isSegmentOnEdge(getNeighborIndex, segmentIndex, searchRadius);
|
|
68
|
+
}
|
|
69
|
+
function isSegmentOnEdgeCanvas(canvasPoint, segmentIndex, viewport, imageData, searchRadius) {
|
|
70
|
+
const getNeighborIndex = (deltaI, deltaJ) => {
|
|
71
|
+
const neighborCanvas = [canvasPoint[0] + deltaI, canvasPoint[1] + deltaJ];
|
|
72
|
+
const worldPoint = viewport.canvasToWorld(neighborCanvas);
|
|
73
|
+
return imageData.getScalarValueFromWorld(worldPoint);
|
|
74
|
+
};
|
|
75
|
+
return isSegmentOnEdge(getNeighborIndex, segmentIndex, searchRadius);
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=getSegmentAtLabelmapBorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSegmentAtLabelmapBorder.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/getSegmentAtLabelmapBorder.ts"],"names":[],"mappings":";;;AAAA,8CA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AY,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { SegmentationRepresentations } from '../../enums';
|
|
3
|
+
import { Segmentation } from '../../types';
|
|
4
|
+
declare type Options = {
|
|
5
|
+
representationType?: SegmentationRepresentations;
|
|
6
|
+
viewport?: Types.IViewport;
|
|
7
|
+
};
|
|
8
|
+
export declare function getSegmentAtWorldPoint(segmentationId: string, worldPoint: Types.Point3, options?: Options): number;
|
|
9
|
+
export declare function getSegmentAtWorldForLabelmap(segmentation: Segmentation, worldPoint: Types.Point3, { viewport }: Options): number | undefined;
|
|
10
|
+
export declare function getSegmentAtWorldForContour(segmentation: Segmentation, worldPoint: Types.Point3, { viewport }: Options): number;
|
|
11
|
+
export {};
|