@cornerstonejs/tools 1.53.0 → 1.54.1
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
|
@@ -39,9 +39,9 @@ const core_1 = require("@cornerstonejs/core");
|
|
|
39
39
|
const SegmentationRepresentations_1 = __importDefault(require("../../../enums/SegmentationRepresentations"));
|
|
40
40
|
const SegmentationState = __importStar(require("../../../stateManagement/segmentation/segmentationState"));
|
|
41
41
|
const ToolGroupManager_1 = require("../../../store/ToolGroupManager");
|
|
42
|
-
const
|
|
42
|
+
const addOrUpdateVTKContourSets_1 = require("./vtkContour/addOrUpdateVTKContourSets");
|
|
43
43
|
const removeContourFromElement_1 = __importDefault(require("./removeContourFromElement"));
|
|
44
|
-
const contourConfigCache_1 = require("./contourConfigCache");
|
|
44
|
+
const contourConfigCache_1 = require("./vtkContour/contourConfigCache");
|
|
45
45
|
function removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID, renderImmediate = false) {
|
|
46
46
|
_removeContourFromToolGroupViewports(toolGroupId, segmentationRepresentationUID);
|
|
47
47
|
SegmentationState.removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID);
|
|
@@ -58,15 +58,18 @@ function render(viewport, representationConfig, toolGroupConfig) {
|
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
59
|
const { segmentationId } = representationConfig;
|
|
60
60
|
const segmentation = SegmentationState.getSegmentation(segmentationId);
|
|
61
|
+
if (!segmentation) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
61
64
|
const contourData = segmentation.representationData[SegmentationRepresentations_1.default.Contour];
|
|
62
|
-
const { geometryIds } = contourData;
|
|
63
|
-
if (
|
|
65
|
+
const { geometryIds, annotationUIDsMap } = contourData;
|
|
66
|
+
if (!(geometryIds === null || geometryIds === void 0 ? void 0 : geometryIds.length) && !(annotationUIDsMap === null || annotationUIDsMap === void 0 ? void 0 : annotationUIDsMap.size)) {
|
|
64
67
|
return;
|
|
65
68
|
}
|
|
66
|
-
if (!(
|
|
69
|
+
if (!(viewport instanceof core_1.BaseVolumeViewport)) {
|
|
67
70
|
return;
|
|
68
71
|
}
|
|
69
|
-
(0,
|
|
72
|
+
(0, addOrUpdateVTKContourSets_1.addOrUpdateVTKContourSets)(viewport, geometryIds, representationConfig, toolGroupConfig);
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
75
|
function _removeContourFromToolGroupViewports(toolGroupId, segmentationRepresentationUID) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contourDisplay.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/contourDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"contourDisplay.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/contourDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAK6B;AAE7B,6GAAyE;AACzE,2GAA6F;AAC7F,sEAA+D;AAK/D,sFAAmF;AACnF,0FAAkE;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;QAGD,IAAA,qDAAyB,EACvB,QAAQ,EACR,WAAW,EACX,oBAAoB,EACpB,eAAe,CAChB,CAAC;IAkEJ,CAAC;CAAA;AAED,SAAS,oCAAoC,CAC3C,WAAmB,EACnB,6BAAqC;IAErC,MAAM,SAAS,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC;IAE5C,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,8BAA8B,WAAW,iBAAiB,CAAC,CAAC;KAC7E;IAED,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IAEpC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;QACxC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,YAAY,CAAC;QACvD,MAAM,cAAc,GAAG,IAAA,6BAAsB,EAC3C,UAAU,EACV,iBAAiB,CAClB,CAAC;QACF,IAAA,kCAAwB,EACtB,cAAc,CAAC,QAAQ,CAAC,OAAO,EAC/B,6BAA6B,CAC9B,CAAC;KACH;AACH,CAAC;AAED,kBAAe;IACb,MAAM;IACN,gCAAgC;CACjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeContourFromElement.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/removeContourFromElement.ts"],"names":[],"mappings":";;AAAA,8CAAwD;AAaxD,SAAS,wBAAwB,CAC/B,OAAuB,EACvB,6BAAqC,EACrC,eAAe,GAAG,KAAK;IAEvB,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;IAClD,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IAEpC,MAAM,YAAY,GAAI,QAAkC,CAAC,SAAS,EAAE,CAAC;IAGrE,MAAM,iBAAiB,GAAG,YAAY;SACnC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CACf,GAAG,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAC9D;SACA,MAAM,CAAC,OAAO,CAAC,CAAC;IAGnB,QAAQ,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"removeContourFromElement.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/removeContourFromElement.ts"],"names":[],"mappings":";;AAAA,8CAAwD;AAaxD,SAAS,wBAAwB,CAC/B,OAAuB,EACvB,6BAAqC,EACrC,eAAe,GAAG,KAAK;IAEvB,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;IAClD,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IAEpC,MAAM,YAAY,GAAI,QAAkC,CAAC,SAAS,EAAE,CAAC;IAGrE,MAAM,iBAAiB,GAAG,YAAY;SACnC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CACf,GAAG,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAC9D;SACA,MAAM,CAAC,OAAO,CAAC,CAAC;IAGnB,QAAQ,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;AAG3C,CAAC;AAED,kBAAe,wBAAwB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Types } from '@cornerstonejs/core';
|
|
2
|
-
import { SegmentationRepresentationConfig, ToolGroupSpecificContourRepresentation } from '
|
|
2
|
+
import { SegmentationRepresentationConfig, ToolGroupSpecificContourRepresentation } from '../../../../types';
|
|
3
3
|
export declare function addContourSetsToElement(viewport: Types.IVolumeViewport, geometryIds: string[], contourRepresentation: ToolGroupSpecificContourRepresentation, contourRepresentationConfig: SegmentationRepresentationConfig, contourActorUID: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addContourSetsToElement.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/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AAM,CAAC,EAAE,EAAE,IAAA,mCAAc,EAAC,6BAA6B,CAAC,EAAE;QAC/D,cAAc,EAAE,IAAI,GAAG,CAAC,cAAc,CAAC;QACvC,kBAAkB;QAClB,kBAAkB;KACnB,CAAC,CACH,CAAC;IAEF,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAE3B,QAAQ,CAAC,QAAQ,CAAC;QAChB,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,KAA+B;KACvC,CAAC,CAAC;IACH,QAAQ,CAAC,WAAW,EAAE,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,CAAC;AACpB,CAAC;AA9FD,0DA8FC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { SegmentationRepresentationConfig, ToolGroupSpecificContourRepresentation } from '../../../../types';
|
|
3
|
+
export declare function addOrUpdateVTKContourSets(viewport: Types.IVolumeViewport, geometryIds: string[], contourRepresentation: ToolGroupSpecificContourRepresentation, contourRepresentationConfig: SegmentationRepresentationConfig): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addOrUpdateVTKContourSets = void 0;
|
|
4
|
+
const addContourSetsToElement_1 = require("./addContourSetsToElement");
|
|
5
|
+
const updateVTKContourSets_1 = require("./updateVTKContourSets");
|
|
6
|
+
function addOrUpdateVTKContourSets(viewport, geometryIds, contourRepresentation, contourRepresentationConfig) {
|
|
7
|
+
const { segmentationRepresentationUID } = contourRepresentation;
|
|
8
|
+
const actorUID = `CONTOUR_${segmentationRepresentationUID}`;
|
|
9
|
+
const actor = viewport.getActor(actorUID);
|
|
10
|
+
const addOrUpdateFn = actor ? updateVTKContourSets_1.updateVTKContourSets : addContourSetsToElement_1.addContourSetsToElement;
|
|
11
|
+
addOrUpdateFn(viewport, geometryIds, contourRepresentation, contourRepresentationConfig, actorUID);
|
|
12
|
+
}
|
|
13
|
+
exports.addOrUpdateVTKContourSets = addOrUpdateVTKContourSets;
|
|
14
|
+
//# sourceMappingURL=addOrUpdateVTKContourSets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addOrUpdateVTKContourSets.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/Contour/vtkContour/addOrUpdateVTKContourSets.ts"],"names":[],"mappings":";;;AAMA,uEAAoE;AACpE,iEAA8D;AAE9D,SAAgB,yBAAyB,CACvC,QAA+B,EAC/B,WAAqB,EACrB,qBAA6D,EAC7D,2BAA6D;IAE7D,MAAM,EAAE,6BAA6B,EAAE,GAAG,qBAAqB,CAAC;IAChE,MAAM,QAAQ,GAAG,WAAW,6BAA6B,EAAE,CAAC;IAC5D,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE1C,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,2CAAoB,CAAC,CAAC,CAAC,iDAAuB,CAAC;IAC7E,aAAa,CACX,QAAQ,EACR,WAAW,EACX,qBAAqB,EACrB,2BAA2B,EAC3B,QAAQ,CACT,CAAC;AACJ,CAAC;AAlBD,8DAkBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contourConfigCache.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/Contour/vtkContour/contourConfigCache.ts"],"names":[],"mappings":";;;AAYA,MAAM,2CAA2C,GAAG,IAAI,GAAG,EAAE,CAAC;AAE9D,SAAgB,cAAc,CAC5B,6BAAqC;IAErC,OAAO,2CAA2C,CAAC,GAAG,CACpD,6BAA6B,CAC9B,CAAC;AACJ,CAAC;AAND,wCAMC;AAED,SAAgB,cAAc,CAC5B,6BAAqC,EACrC,MAAmB;IAEnB,2CAA2C,CAAC,GAAG,CAC7C,6BAA6B,EAC7B,MAAM,CACP,CAAC;AACJ,CAAC;AARD,wCAQC;AAED,SAAgB,iBAAiB,CAAC,6BAAqC;IACrE,2CAA2C,CAAC,MAAM,CAChD,6BAA6B,CAC9B,CAAC;AACJ,CAAC;AAJD,8CAIC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { SegmentationRepresentationConfig, ToolGroupSpecificContourRepresentation } from '../../../../types';
|
|
3
|
+
export declare function updateVTKContourSets(viewport: Types.IVolumeViewport, geometryIds: string[], contourRepresentation: ToolGroupSpecificContourRepresentation, contourRepresentationConfig: SegmentationRepresentationConfig, contourActorUID: string): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.updateVTKContourSets = void 0;
|
|
4
4
|
const core_1 = require("@cornerstonejs/core");
|
|
5
5
|
const contourConfigCache_1 = require("./contourConfigCache");
|
|
6
6
|
const utils_1 = require("./utils");
|
|
7
|
-
function
|
|
7
|
+
function updateVTKContourSets(viewport, geometryIds, contourRepresentation, contourRepresentationConfig, contourActorUID) {
|
|
8
8
|
const { segmentationRepresentationUID, segmentsHidden } = contourRepresentation;
|
|
9
9
|
const newContourConfig = contourRepresentationConfig.representations.CONTOUR;
|
|
10
10
|
const cachedConfig = (0, contourConfigCache_1.getConfigCache)(segmentationRepresentationUID);
|
|
@@ -94,5 +94,5 @@ function updateContourSets(viewport, geometryIds, contourRepresentation, contour
|
|
|
94
94
|
}
|
|
95
95
|
viewport.render();
|
|
96
96
|
}
|
|
97
|
-
exports.
|
|
98
|
-
//# sourceMappingURL=
|
|
97
|
+
exports.updateVTKContourSets = updateVTKContourSets;
|
|
98
|
+
//# sourceMappingURL=updateVTKContourSets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateVTKContourSets.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/Contour/vtkContour/updateVTKContourSets.ts"],"names":[],"mappings":";;;AAAA,8C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AC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC7C,iBAAiB,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;oBACjD,iBAAiB,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;oBACjD,iBAAiB,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;iBACpD;gBAED,gBAAgB,GAAG,IAAI,CAAC;aACzB;YAED,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,IAAI,gBAAgB,EAAE;YACpB,cAAc,CAAC,QAAQ,EAAE,CAAC;SAC3B;QAED,IAAA,mCAAc,EACZ,6BAA6B,EAC7B,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,YAAY,EAAE;YAC9B,cAAc,EAAE,IAAI,GAAG,CAAC,cAAc,CAAC;SACxC,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;KAC5B;IAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AACpB,CAAC;AAhJD,oDAgJC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Types } from '@cornerstonejs/core';
|
|
2
2
|
import vtkPolyData from '@kitware/vtk.js/Common/DataModel/PolyData';
|
|
3
|
-
import { ToolGroupSpecificContourRepresentation } from '
|
|
4
|
-
export declare function getSegmentSpecificConfig(contourRepresentation: ToolGroupSpecificContourRepresentation, segmentId: string, index: number): import("
|
|
3
|
+
import { ToolGroupSpecificContourRepresentation } from '../../../../types';
|
|
4
|
+
export declare function getSegmentSpecificConfig(contourRepresentation: ToolGroupSpecificContourRepresentation, segmentId: string, index: number): import("../../../../types/ContourTypes").ContourConfig;
|
|
5
5
|
export declare function validateGeometry(geometry: Types.IGeometry): void;
|
|
6
6
|
export declare function getPolyData(contourSet: Types.IContourSet): vtkPolyData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/tools/displayTools/Contour/vtkContour/utils.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAmD;AACnD,sFAAiE;AACjE,gFAA2D;AAC3D,yFAAoE;AAepE,SAAgB,wBAAwB,CACtC,qBAA6D,EAC7D,SAAiB,EACjB,KAAa;;IAEb,IAAI,qBAAqB,GACvB,MAAA,qBAAqB,CAAC,qBAAqB,0CAAG,SAAS,CAAC,CAAC;IAE3D,IAAI,CAAC,qBAAqB,EAAE;QAE1B,qBAAqB;YACnB,MAAA,qBAAqB,CAAC,qBAAqB,0CAAG,KAAK,CAAC,CAAC;KACxD;IAED,IAAI,CAAC,qBAAqB,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,qBAAqB,CAAC,OAAO,CAAC;AACvC,CAAC;AAnBD,4DAmBC;AAOD,SAAgB,gBAAgB,CAAC,QAAyB;IACxD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,oCAAoC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;KACpE;IAED,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAC;IAE/B,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAK,CAAC,YAAY,CAAC,OAAO,EAAE;QAChD,MAAM,IAAI,KAAK,CACb,iBAAiB,QAAQ,CAAC,IAAI,+BAA+B,CAC9D,CAAC;KACH;IAED,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;QAClB,OAAO,CAAC,IAAI,CACV,oCAAoC,UAAU,oBAAoB,CACnE,CAAC;QACF,OAAO;KACR;AACH,CAAC;AAnBD,4CAmBC;AAUD,SAAgB,WAAW,CAAC,UAA6B;IACvD,MAAM,UAAU,GAAG,EAAE,CAAC;IAEtB,MAAM,MAAM,G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
|
const visibility = true;
|
|
20
20
|
const immediateRender = false;
|
|
21
21
|
const suppressEvents = true;
|
|
22
|
-
if ((0, stackVolumeCheck_1.isVolumeSegmentation)(labelMapData)) {
|
|
22
|
+
if ((0, stackVolumeCheck_1.isVolumeSegmentation)(labelMapData, viewport)) {
|
|
23
23
|
const volumeInputs = [
|
|
24
24
|
{
|
|
25
25
|
volumeId: labelMapData.volumeId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addLabelmapToElement.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/addLabelmapToElement.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,8CAM6B;AAK7B,2FAA4F;AAW5F,SAAe,oBAAoB,CACjC,OAAuB,EACvB,YAAsC,EACtC,6BAAqC;;QAErC,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;QAClD,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;QACrD,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;QAKpC,MAAM,UAAU,GAAG,IAAI,CAAC;QACxB,MAAM,eAAe,GAAG,KAAK,CAAC;QAC9B,MAAM,cAAc,GAAG,IAAI,CAAC;QAE5B,IAAI,IAAA,uCAAoB,EAAC,YAAY,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"addLabelmapToElement.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/addLabelmapToElement.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,8CAM6B;AAK7B,2FAA4F;AAW5F,SAAe,oBAAoB,CACjC,OAAuB,EACvB,YAAsC,EACtC,6BAAqC;;QAErC,MAAM,cAAc,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,CAAC;QAClD,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;QACrD,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;QAKpC,MAAM,UAAU,GAAG,IAAI,CAAC;QACxB,MAAM,eAAe,GAAG,KAAK,CAAC;QAC9B,MAAM,cAAc,GAAG,IAAI,CAAC;QAE5B,IAAI,IAAA,uCAAoB,EAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;YAKhD,MAAM,YAAY,GAAyB;gBACzC;oBACE,QAAQ,EAAE,YAAY,CAAC,QAAQ;oBAC/B,QAAQ,EAAE,6BAA6B;oBACvC,UAAU;oBACV,SAAS,EAAE,YAAK,CAAC,UAAU,CAAC,uBAAuB;iBACpD;aACF,CAAC;YAGF,MAAM,IAAA,4BAAqB,EACzB,eAAe,EACf,YAAY,EACZ,CAAC,UAAU,CAAC,EACZ,eAAe,EACf,cAAc,CACf,CAAC;SACH;aAAM;YAGL,MAAM,mBAAmB,GACvB,YACD,CAAC,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC;YAExD,MAAM,WAAW,GAAwB;gBACvC;oBACE,OAAO,EAAE,mBAAmB;oBAC5B,QAAQ,EAAE,6BAA6B;iBACxC;aACF,CAAC;YAGF,MAAM,IAAA,gCAAyB,EAC7B,eAAe,EACf,WAAW,EACX,CAAC,UAAU,CAAC,EACZ,eAAe,EACf,cAAc,CACf,CAAC;SACH;IACH,CAAC;CAAA;AAED,kBAAe,oBAAoB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import labelmapDisplay from './labelmapDisplay';
|
|
2
2
|
import labelmapConfig from './labelmapConfig';
|
|
3
|
-
|
|
3
|
+
import { validate as validateLabelmap, validatePublic as validateLabelmapPublic } from './validateLabelmap';
|
|
4
|
+
export { labelmapDisplay, labelmapConfig, validateLabelmap, validateLabelmapPublic, };
|
|
@@ -3,9 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.labelmapConfig = exports.labelmapDisplay = void 0;
|
|
6
|
+
exports.validateLabelmapPublic = exports.validateLabelmap = exports.labelmapConfig = exports.labelmapDisplay = void 0;
|
|
7
7
|
const labelmapDisplay_1 = __importDefault(require("./labelmapDisplay"));
|
|
8
8
|
exports.labelmapDisplay = labelmapDisplay_1.default;
|
|
9
9
|
const labelmapConfig_1 = __importDefault(require("./labelmapConfig"));
|
|
10
10
|
exports.labelmapConfig = labelmapConfig_1.default;
|
|
11
|
+
const validateLabelmap_1 = require("./validateLabelmap");
|
|
12
|
+
Object.defineProperty(exports, "validateLabelmap", { enumerable: true, get: function () { return validateLabelmap_1.validate; } });
|
|
13
|
+
Object.defineProperty(exports, "validateLabelmapPublic", { enumerable: true, get: function () { return validateLabelmap_1.validatePublic; } });
|
|
11
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/index.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAgD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/index.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAgD;AAQ9C,0BARK,yBAAe,CAQL;AAPjB,sEAA8C;AAQ5C,yBARK,wBAAc,CAQL;AAPhB,yDAG4B;AAK1B,iGAPY,2BAAgB,OAOZ;AAChB,uGAPkB,iCAAsB,OAOlB"}
|
|
@@ -45,6 +45,7 @@ const ToolGroupManager_1 = require("../../../store/ToolGroupManager");
|
|
|
45
45
|
const addLabelmapToElement_1 = __importDefault(require("./addLabelmapToElement"));
|
|
46
46
|
const removeLabelmapFromElement_1 = __importDefault(require("./removeLabelmapFromElement"));
|
|
47
47
|
const stackVolumeCheck_1 = require("../../segmentation/strategies/utils/stackVolumeCheck");
|
|
48
|
+
const segmentation_1 = require("../../../stateManagement/segmentation");
|
|
48
49
|
const MAX_NUMBER_COLORS = 255;
|
|
49
50
|
const labelMapConfigCache = new Map();
|
|
50
51
|
function getRepresentationRenderingConfig() {
|
|
@@ -57,6 +58,7 @@ function getRepresentationRenderingConfig() {
|
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
60
|
exports.getRepresentationRenderingConfig = getRepresentationRenderingConfig;
|
|
61
|
+
let polySegConversionInProgress = false;
|
|
60
62
|
function removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID, renderImmediate = false) {
|
|
61
63
|
_removeLabelmapFromToolGroupViewports(toolGroupId, segmentationRepresentationUID);
|
|
62
64
|
SegmentationState.removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID);
|
|
@@ -97,9 +99,25 @@ function render(viewport, representation, toolGroupConfig) {
|
|
|
97
99
|
console.warn('No segmentation found for segmentationId: ', segmentationId);
|
|
98
100
|
return;
|
|
99
101
|
}
|
|
100
|
-
|
|
102
|
+
let labelmapData = segmentation.representationData[SegmentationRepresentations_1.default.Labelmap];
|
|
101
103
|
let actorEntry = viewport.getActor(segmentationRepresentationUID);
|
|
102
|
-
if (
|
|
104
|
+
if (!actorEntry &&
|
|
105
|
+
segmentation_1.polySeg.canComputeRequestedRepresentation(segmentationRepresentationUID) &&
|
|
106
|
+
!polySegConversionInProgress) {
|
|
107
|
+
polySegConversionInProgress = true;
|
|
108
|
+
labelmapData = yield segmentation_1.polySeg.computeAndAddLabelmapRepresentation(segmentationId, {
|
|
109
|
+
segmentationRepresentationUID,
|
|
110
|
+
viewport,
|
|
111
|
+
});
|
|
112
|
+
if (!labelmapData) {
|
|
113
|
+
throw new Error(`No labelmap data found for segmentationId ${segmentationId}.`);
|
|
114
|
+
}
|
|
115
|
+
polySegConversionInProgress = false;
|
|
116
|
+
}
|
|
117
|
+
if (!labelmapData) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if ((0, stackVolumeCheck_1.isVolumeSegmentation)(labelmapData, viewport)) {
|
|
103
121
|
if (viewport instanceof core_1.StackViewport) {
|
|
104
122
|
return;
|
|
105
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labelmapDisplay.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/labelmapDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2GAAsF;AACtF,iHAA4F;AAE5F,8CAM6B;AAE7B,6GAAyE;AACzE,2GAA6F;AAC7F,sEAA+D;AAW/D,kFAA0D;
|
|
1
|
+
{"version":3,"file":"labelmapDisplay.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/labelmapDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2GAAsF;AACtF,iHAA4F;AAE5F,8CAM6B;AAE7B,6GAAyE;AACzE,2GAA6F;AAC7F,sEAA+D;AAW/D,kFAA0D;AAC1D,4FAAoE;AACpE,2FAA4F;AAC5F,wEAAgE;AAEhE,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAE,CAAC;AAEtC,SAAS,gCAAgC;IACvC,MAAM,IAAI,GAAG,+BAAwB,CAAC,WAAW,EAAE,CAAC;IACpD,MAAM,IAAI,GAAG,2BAAoB,CAAC,WAAW,EAAE,CAAC;IAChD,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,OAAO;QACL,IAAI;QACJ,IAAI;KACL,CAAC;AACJ,CAAC;AAmfC,4EAAgC;AAjflC,IAAI,2BAA2B,GAAG,KAAK,CAAC;AAUxC,SAAS,gCAAgC,CACvC,WAAmB,EACnB,6BAAqC,EACrC,eAAe,GAAG,KAAK;IAEvB,qCAAqC,CACnC,WAAW,EACX,6BAA6B,CAC9B,CAAC;IACF,iBAAiB,CAAC,gCAAgC,CAChD,WAAW,EACX,6BAA6B,CAC9B,CAAC;IAEF,IAAI,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,EAAE,IAAI,GAAG,CAAC,cAAc,CAAC;KACxC,CAAC,CAAC;IAEH,OAAO;QACL,kBAAkB;QAClB,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED,SAAS,qCAAqC,CAC5C,WAAmB,EACnB,6BAAqC;IAErC,MAAM,SAAS,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC;IAE5C,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,8BAA8B,WAAW,iBAAiB,CAAC,CAAC;KAC7E;IAED,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IAEpC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;QACxC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,YAAY,CAAC;QACvD,MAAM,cAAc,GAAG,IAAA,6BAAsB,EAC3C,UAAU,EACV,iBAAiB,CAClB,CAAC;QACF,IAAA,mCAAyB,EACvB,cAAc,CAAC,QAAQ,CAAC,OAAO,EAC/B,6BAA6B,CAC9B,CAAC;KACH;AACH,CAAC;AAED,SAAe,sBAAsB,CACnC,QAAsD,EACtD,YAAsC,EACtC,6BAA6B;;QAE7B,MAAM,IAAA,8BAAoB,EACxB,QAAQ,CAAC,OAAO,EAChB,YAAY,EACZ,6BAA6B,CAC9B,CAAC;IACJ,CAAC;CAAA;AAED,kBAAe;IACb,gCAAgC;IAChC,MAAM;IACN,gCAAgC;CACjC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SegmentationPublicInput } from '../../../types/SegmentationStateTypes';
|
|
2
|
+
import { LabelmapSegmentationData } from '../../../types/LabelmapTypes';
|
|
3
|
+
export declare function validatePublic(segmentationInput: SegmentationPublicInput): void;
|
|
4
|
+
export declare function validate(segmentationRepresentationData: LabelmapSegmentationData): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validate = exports.validatePublic = void 0;
|
|
4
|
+
const core_1 = require("@cornerstonejs/core");
|
|
5
|
+
function validateRepresentationData(segmentationRepresentationData) {
|
|
6
|
+
if ('volumeId' in segmentationRepresentationData) {
|
|
7
|
+
segmentationRepresentationData =
|
|
8
|
+
segmentationRepresentationData;
|
|
9
|
+
const cachedVolume = core_1.cache.getVolume(segmentationRepresentationData.volumeId);
|
|
10
|
+
if (!cachedVolume) {
|
|
11
|
+
throw new Error(`volumeId of ${segmentationRepresentationData.volumeId} not found in cache, you should load and cache volume before adding segmentation`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
else if ('imageIdReferenceMap' in segmentationRepresentationData) {
|
|
15
|
+
segmentationRepresentationData =
|
|
16
|
+
segmentationRepresentationData;
|
|
17
|
+
if (!segmentationRepresentationData.imageIdReferenceMap) {
|
|
18
|
+
throw new Error('The segmentationInput.representationData.imageIdReferenceMap is undefined, please provide a valid representationData.imageIdReferenceMap');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
throw new Error('The segmentationInput.representationData is undefined, please provide a valid representationData');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function validatePublic(segmentationInput) {
|
|
26
|
+
if (!segmentationInput.representation.data) {
|
|
27
|
+
throw new Error('The segmentationInput.representationData.data is undefined, please provide a valid representationData.data');
|
|
28
|
+
}
|
|
29
|
+
const representationData = segmentationInput.representation
|
|
30
|
+
.data;
|
|
31
|
+
validateRepresentationData(representationData);
|
|
32
|
+
}
|
|
33
|
+
exports.validatePublic = validatePublic;
|
|
34
|
+
function validate(segmentationRepresentationData) {
|
|
35
|
+
validateRepresentationData(segmentationRepresentationData);
|
|
36
|
+
}
|
|
37
|
+
exports.validate = validate;
|
|
38
|
+
//# sourceMappingURL=validateLabelmap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateLabelmap.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Labelmap/validateLabelmap.ts"],"names":[],"mappings":";;;AAAA,8CAA4C;AAQ5C,SAAS,0BAA0B,CACjC,8BAAwD;IAExD,IAAI,UAAU,IAAI,8BAA8B,EAAE;QAChD,8BAA8B;YAC5B,8BAAgE,CAAC;QAEnE,MAAM,YAAY,GAAG,YAAK,CAAC,SAAS,CAClC,8BAA8B,CAAC,QAAQ,CACxC,CAAC;QAEF,IAAI,CAAC,YAAY,EAAE;YACjB,MAAM,IAAI,KAAK,CACb,eAAe,8BAA8B,CAAC,QAAQ,kFAAkF,CACzI,CAAC;SACH;KACF;SAAM,IAAI,qBAAqB,IAAI,8BAA8B,EAAE;QAClE,8BAA8B;YAC5B,8BAA+D,CAAC;QAElE,IAAI,CAAC,8BAA8B,CAAC,mBAAmB,EAAE;YACvD,MAAM,IAAI,KAAK,CACb,0IAA0I,CAC3I,CAAC;SACH;KACF;SAAM;QACL,MAAM,IAAI,KAAK,CACb,kGAAkG,CACnG,CAAC;KACH;AACH,CAAC;AAQD,SAAgB,cAAc,CAC5B,iBAA0C;IAE1C,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,IAAI,EAAE;QAC1C,MAAM,IAAI,KAAK,CACb,4GAA4G,CAC7G,CAAC;KACH;IAED,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,cAAc;SACxD,IAAgC,CAAC;IAEpC,0BAA0B,CAAC,kBAAkB,CAAC,CAAC;AACjD,CAAC;AAbD,wCAaC;AAOD,SAAgB,QAAQ,CACtB,8BAAwD;IAExD,0BAA0B,CAAC,8BAA8B,CAAC,CAAC;AAC7D,CAAC;AAJD,4BAIC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = require("@cornerstonejs/core");
|
|
7
|
+
const Mapper_1 = __importDefault(require("@kitware/vtk.js/Rendering/Core/Mapper"));
|
|
8
|
+
const Actor_1 = __importDefault(require("@kitware/vtk.js/Rendering/Core/Actor"));
|
|
9
|
+
const ClipClosedSurface_1 = __importDefault(require("@kitware/vtk.js/Filters/General/ClipClosedSurface"));
|
|
10
|
+
const PolyData_1 = __importDefault(require("@kitware/vtk.js/Common/DataModel/PolyData"));
|
|
11
|
+
const CellArray_1 = __importDefault(require("@kitware/vtk.js/Common/Core/CellArray"));
|
|
12
|
+
const surfaceDisplay_1 = require("./surfaceDisplay");
|
|
13
|
+
function addOrUpdateSurfaceToElement(element, surface, segmentationRepresentationUID) {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
const actorUID = (0, surfaceDisplay_1.getSurfaceActorUID)(segmentationRepresentationUID, surface.id);
|
|
16
|
+
const enabledElement = (0, core_1.getEnabledElement)(element);
|
|
17
|
+
const { viewport } = enabledElement;
|
|
18
|
+
const surfaceActor = (_a = viewport.getActor(actorUID)) === null || _a === void 0 ? void 0 : _a.actor;
|
|
19
|
+
if (surfaceActor) {
|
|
20
|
+
const surfaceMapper = surfaceActor.getMapper();
|
|
21
|
+
const currentPolyData = surfaceMapper.getInputData();
|
|
22
|
+
const newPoints = surface.getPoints();
|
|
23
|
+
const newPolys = surface.getPolys();
|
|
24
|
+
const currentPoints = currentPolyData.getPoints().getData();
|
|
25
|
+
const currentPolys = currentPolyData.getPolys().getData();
|
|
26
|
+
if (newPoints.length === currentPoints.length &&
|
|
27
|
+
newPolys.length === currentPolys.length) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const polyData = PolyData_1.default.newInstance();
|
|
31
|
+
polyData.getPoints().setData(newPoints, 3);
|
|
32
|
+
const triangles = CellArray_1.default.newInstance({
|
|
33
|
+
values: Float32Array.from(newPolys),
|
|
34
|
+
});
|
|
35
|
+
polyData.setPolys(triangles);
|
|
36
|
+
surfaceMapper.setInputData(polyData);
|
|
37
|
+
surfaceMapper.modified();
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
viewport.getRenderer().resetCameraClippingRange();
|
|
40
|
+
}, 0);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const points = surface.getPoints();
|
|
44
|
+
const polys = surface.getPolys();
|
|
45
|
+
const color = surface.getColor();
|
|
46
|
+
const surfacePolyData = PolyData_1.default.newInstance();
|
|
47
|
+
surfacePolyData.getPoints().setData(points, 3);
|
|
48
|
+
const triangles = CellArray_1.default.newInstance({
|
|
49
|
+
values: Float32Array.from(polys),
|
|
50
|
+
});
|
|
51
|
+
surfacePolyData.setPolys(triangles);
|
|
52
|
+
const mapper = Mapper_1.default.newInstance({});
|
|
53
|
+
let clippingFilter;
|
|
54
|
+
if (!(viewport instanceof core_1.VolumeViewport3D)) {
|
|
55
|
+
clippingFilter = ClipClosedSurface_1.default.newInstance({
|
|
56
|
+
clippingPlanes: [],
|
|
57
|
+
activePlaneId: 2,
|
|
58
|
+
passPointData: false,
|
|
59
|
+
});
|
|
60
|
+
clippingFilter.setInputData(surfacePolyData);
|
|
61
|
+
clippingFilter.setGenerateOutline(true);
|
|
62
|
+
clippingFilter.setGenerateFaces(false);
|
|
63
|
+
clippingFilter.update();
|
|
64
|
+
const filteredData = clippingFilter.getOutputData();
|
|
65
|
+
mapper.setInputData(filteredData);
|
|
66
|
+
const evt = {
|
|
67
|
+
detail: {
|
|
68
|
+
actorEntry: {
|
|
69
|
+
actor: {
|
|
70
|
+
getMapper: () => mapper,
|
|
71
|
+
},
|
|
72
|
+
clippingFilter,
|
|
73
|
+
uid: actorUID,
|
|
74
|
+
},
|
|
75
|
+
vtkPlanes: (_b = viewport.getClippingPlanesForActor) === null || _b === void 0 ? void 0 : _b.call(viewport),
|
|
76
|
+
viewport,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
updateSurfacePlanes(evt);
|
|
80
|
+
element.addEventListener(core_1.Enums.Events.CLIPPING_PLANES_UPDATED, updateSurfacePlanes);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
mapper.setInputData(surfacePolyData);
|
|
84
|
+
}
|
|
85
|
+
const actor = Actor_1.default.newInstance();
|
|
86
|
+
actor.setMapper(mapper);
|
|
87
|
+
actor.getProperty().setColor(color[0] / 255, color[1] / 255, color[2] / 255);
|
|
88
|
+
actor.getProperty().setLineWidth(2);
|
|
89
|
+
viewport.addActor({
|
|
90
|
+
actor,
|
|
91
|
+
uid: actorUID,
|
|
92
|
+
clippingFilter,
|
|
93
|
+
});
|
|
94
|
+
viewport.resetCamera();
|
|
95
|
+
setTimeout(() => {
|
|
96
|
+
viewport.getRenderer().resetCameraClippingRange();
|
|
97
|
+
}, 0);
|
|
98
|
+
}
|
|
99
|
+
function updateSurfacePlanes(evt) {
|
|
100
|
+
const { actorEntry, vtkPlanes, viewport } = evt.detail;
|
|
101
|
+
if (!(actorEntry === null || actorEntry === void 0 ? void 0 : actorEntry.clippingFilter)) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const sliceIndex = viewport.getSliceIndex();
|
|
105
|
+
const mapper = actorEntry.actor.getMapper();
|
|
106
|
+
const { viewPlaneNormal } = viewport.getCamera();
|
|
107
|
+
const cacheId = (0, surfaceDisplay_1.generateCacheId)(viewport, viewPlaneNormal, sliceIndex);
|
|
108
|
+
const polyData = (0, surfaceDisplay_1.getOrCreatePolyData)(actorEntry, cacheId, vtkPlanes);
|
|
109
|
+
mapper.setInputData(polyData);
|
|
110
|
+
}
|
|
111
|
+
exports.default = addOrUpdateSurfaceToElement;
|
|
112
|
+
//# sourceMappingURL=addOrUpdateSurfaceToElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addOrUpdateSurfaceToElement.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Surface/addOrUpdateSurfaceToElement.ts"],"names":[],"mappings":";;;;;AAAA,8CAI6B;AAE7B,mFAA8D;AAC9D,iFAA4D;AAC5D,0GAAqF;AACrF,yFAAoE;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C,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,cAAc,CAAA,EAAE;QAC/B,OAAO;KACR;IACD,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC;IAC5C,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5C,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;IACjD,MAAM,OAAO,GAAG,IAAA,gCAAe,EAAC,QAAQ,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAG,IAAA,oCAAmB,EAAC,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IACrE,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,kBAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const defaultSurfaceConfig = {
|
|
4
|
+
renderFill: true,
|
|
5
|
+
fillAlpha: 1,
|
|
6
|
+
};
|
|
7
|
+
function getDefaultSurfaceConfig() {
|
|
8
|
+
return defaultSurfaceConfig;
|
|
9
|
+
}
|
|
10
|
+
exports.default = getDefaultSurfaceConfig;
|
|
11
|
+
//# sourceMappingURL=surfaceConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceConfig.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Surface/surfaceConfig.ts"],"names":[],"mappings":";;AAEA,MAAM,oBAAoB,GAA2B;IACnD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,CAAC;CACb,CAAC;AAEF,SAAS,uBAAuB;IAC9B,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,kBAAe,uBAAuB,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Types } from '@cornerstonejs/core';
|
|
2
2
|
import { SegmentationRepresentationConfig, ToolGroupSpecificRepresentation } from '../../../types/SegmentationStateTypes';
|
|
3
|
+
declare const polyDataCache: Map<any, any>;
|
|
3
4
|
declare function removeSegmentationRepresentation(toolGroupId: string, segmentationRepresentationUID: string, renderImmediate?: boolean): void;
|
|
4
5
|
declare function render(viewport: Types.IVolumeViewport, representation: ToolGroupSpecificRepresentation, toolGroupConfig: SegmentationRepresentationConfig): Promise<void>;
|
|
6
|
+
export declare function getSurfaceActorUID(segmentationRepresentationUID: string, surfaceId: string): string;
|
|
7
|
+
export declare function generateCacheId(viewport: any, viewPlaneNormal: any, sliceIndex: any): string;
|
|
8
|
+
export declare function getOrCreatePolyData(actorEntry: any, cacheId: any, vtkPlanes: any): any;
|
|
9
|
+
export declare function updatePolyDataCache(actorUID: any, cacheId: any, polyDataResult: any): void;
|
|
10
|
+
export declare function getSortedPlanesInfo(viewport: any): any;
|
|
5
11
|
declare const _default: {
|
|
6
12
|
render: typeof render;
|
|
7
13
|
removeSegmentationRepresentation: typeof removeSegmentationRepresentation;
|
|
8
14
|
};
|
|
9
15
|
export default _default;
|
|
16
|
+
export { render, removeSegmentationRepresentation, polyDataCache };
|