@cornerstonejs/tools 1.48.2 → 1.49.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/AnnotationStyleStates.d.ts +2 -1
- package/dist/cjs/enums/AnnotationStyleStates.js +1 -0
- package/dist/cjs/enums/AnnotationStyleStates.js.map +1 -1
- package/dist/cjs/enums/ChangeTypes.d.ts +8 -0
- package/dist/cjs/enums/ChangeTypes.js +12 -0
- package/dist/cjs/enums/ChangeTypes.js.map +1 -0
- package/dist/cjs/enums/Events.d.ts +2 -0
- package/dist/cjs/enums/Events.js +2 -0
- package/dist/cjs/enums/Events.js.map +1 -1
- package/dist/cjs/enums/index.d.ts +2 -1
- package/dist/cjs/enums/index.js +3 -1
- package/dist/cjs/enums/index.js.map +1 -1
- package/dist/cjs/eventDispatchers/annotationInterpolationEventDispatcher.d.ts +5 -0
- package/dist/cjs/eventDispatchers/annotationInterpolationEventDispatcher.js +23 -0
- package/dist/cjs/eventDispatchers/annotationInterpolationEventDispatcher.js.map +1 -0
- package/dist/cjs/eventDispatchers/index.d.ts +2 -1
- package/dist/cjs/eventDispatchers/index.js +3 -1
- package/dist/cjs/eventDispatchers/index.js.map +1 -1
- package/dist/cjs/init.js +3 -0
- package/dist/cjs/init.js.map +1 -1
- package/dist/cjs/stateManagement/annotation/config/getState.js +3 -0
- package/dist/cjs/stateManagement/annotation/config/getState.js.map +1 -1
- package/dist/cjs/tools/annotation/LivewireContourTool.d.ts +1 -1
- package/dist/cjs/tools/annotation/LivewireContourTool.js +1 -1
- package/dist/cjs/tools/annotation/LivewireContourTool.js.map +1 -1
- package/dist/cjs/tools/annotation/PlanarFreehandContourSegmentationTool.js +1 -0
- package/dist/cjs/tools/annotation/PlanarFreehandContourSegmentationTool.js.map +1 -1
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.d.ts +2 -2
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.js +9 -4
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/SplineROITool.d.ts +4 -1
- package/dist/cjs/tools/annotation/SplineROITool.js +51 -20
- package/dist/cjs/tools/annotation/SplineROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +12 -3
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js +9 -5
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js +3 -3
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
- package/dist/cjs/tools/base/ContourBaseTool.js +4 -0
- package/dist/cjs/tools/base/ContourBaseTool.js.map +1 -1
- package/dist/cjs/tools/base/ContourSegmentationBaseTool.js +21 -9
- package/dist/cjs/tools/base/ContourSegmentationBaseTool.js.map +1 -1
- package/dist/cjs/tools/displayTools/Contour/contourConfig.js +8 -3
- package/dist/cjs/tools/displayTools/Contour/contourConfig.js.map +1 -1
- package/dist/cjs/tools/displayTools/Contour/contourDisplay.js +0 -1
- package/dist/cjs/tools/displayTools/Contour/contourDisplay.js.map +1 -1
- package/dist/cjs/types/AnnotationStyle.d.ts +2 -2
- package/dist/cjs/types/AnnotationTypes.d.ts +1 -0
- package/dist/cjs/types/ContourSegmentationAnnotation.d.ts +1 -0
- package/dist/cjs/types/ContourTypes.d.ts +3 -0
- package/dist/cjs/types/EventTypes.d.ts +19 -1
- package/dist/cjs/types/InterpolationTypes.d.ts +18 -0
- package/dist/cjs/types/InterpolationTypes.js +3 -0
- package/dist/cjs/types/InterpolationTypes.js.map +1 -0
- package/dist/cjs/types/ToolSpecificAnnotationTypes.d.ts +14 -0
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/cjs/utilities/contours/PointsArray.d.ts +29 -0
- package/dist/cjs/utilities/contours/PointsArray.js +104 -0
- package/dist/cjs/utilities/contours/PointsArray.js.map +1 -0
- package/dist/cjs/utilities/contours/index.d.ts +3 -1
- package/dist/cjs/utilities/contours/index.js +28 -1
- package/dist/cjs/utilities/contours/index.js.map +1 -1
- package/dist/cjs/utilities/contours/interpolation/acceptAutogeneratedInterpolations.d.ts +3 -0
- package/dist/cjs/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js +11 -0
- package/dist/cjs/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js.map +1 -0
- package/dist/cjs/utilities/contours/interpolation/createPolylineToolData.d.ts +2 -0
- package/dist/cjs/utilities/contours/interpolation/createPolylineToolData.js +39 -0
- package/dist/cjs/utilities/contours/interpolation/createPolylineToolData.js.map +1 -0
- package/dist/cjs/utilities/contours/interpolation/findAnnotationForInterpolation.d.ts +7 -0
- package/dist/cjs/utilities/contours/interpolation/findAnnotationForInterpolation.js +107 -0
- package/dist/cjs/utilities/contours/interpolation/findAnnotationForInterpolation.js.map +1 -0
- package/dist/cjs/utilities/contours/interpolation/getInterpolationData.d.ts +7 -0
- package/dist/cjs/utilities/contours/interpolation/getInterpolationData.js +30 -0
- package/dist/cjs/utilities/contours/interpolation/getInterpolationData.js.map +1 -0
- package/dist/cjs/utilities/contours/interpolation/getInterpolationDataCollection.d.ts +4 -0
- package/dist/cjs/utilities/contours/interpolation/getInterpolationDataCollection.js +21 -0
- package/dist/cjs/utilities/contours/interpolation/getInterpolationDataCollection.js.map +1 -0
- package/dist/cjs/utilities/contours/interpolation/index.d.ts +2 -0
- package/dist/cjs/utilities/contours/interpolation/index.js +9 -0
- package/dist/cjs/utilities/contours/interpolation/index.js.map +1 -0
- package/dist/cjs/utilities/contours/interpolation/interpolate.d.ts +3 -0
- package/dist/cjs/utilities/contours/interpolation/interpolate.js +343 -0
- package/dist/cjs/utilities/contours/interpolation/interpolate.js.map +1 -0
- package/dist/cjs/utilities/contours/reverseIfAntiClockwise.d.ts +2 -0
- package/dist/cjs/utilities/contours/reverseIfAntiClockwise.js +34 -0
- package/dist/cjs/utilities/contours/reverseIfAntiClockwise.js.map +1 -0
- package/dist/cjs/utilities/getViewportForAnnotation.d.ts +2 -0
- package/dist/cjs/utilities/getViewportForAnnotation.js +19 -0
- package/dist/cjs/utilities/getViewportForAnnotation.js.map +1 -0
- package/dist/cjs/utilities/index.d.ts +2 -1
- package/dist/cjs/utilities/index.js +3 -1
- package/dist/cjs/utilities/index.js.map +1 -1
- package/dist/cjs/utilities/planar/filterAnnotationsForDisplay.js +2 -1
- package/dist/cjs/utilities/planar/filterAnnotationsForDisplay.js.map +1 -1
- package/dist/cjs/utilities/planarFreehandROITool/index.d.ts +3 -3
- package/dist/cjs/utilities/planarFreehandROITool/index.js +4 -4
- package/dist/cjs/utilities/planarFreehandROITool/index.js.map +1 -1
- package/dist/cjs/utilities/planarFreehandROITool/smoothAnnotation.d.ts +3 -0
- package/dist/cjs/utilities/planarFreehandROITool/{interpolateAnnotation.js → smoothAnnotation.js} +5 -5
- package/dist/cjs/utilities/planarFreehandROITool/smoothAnnotation.js.map +1 -0
- package/dist/cjs/utilities/planarFreehandROITool/{interpolatePoints.d.ts → smoothPoints.d.ts} +1 -1
- package/dist/cjs/utilities/planarFreehandROITool/{interpolatePoints.js → smoothPoints.js} +11 -8
- package/dist/cjs/utilities/planarFreehandROITool/smoothPoints.js.map +1 -0
- package/dist/cjs/utilities/polyData/utils.d.ts +2 -1
- package/dist/cjs/utilities/polyData/utils.js +4 -2
- package/dist/cjs/utilities/polyData/utils.js.map +1 -1
- package/dist/cjs/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts +11 -0
- package/dist/cjs/utilities/segmentation/InterpolationManager/InterpolationManager.js +159 -0
- package/dist/cjs/utilities/segmentation/InterpolationManager/InterpolationManager.js.map +1 -0
- package/dist/cjs/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.d.ts +2 -0
- package/dist/cjs/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.js +96 -0
- package/dist/cjs/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.js.map +1 -0
- package/dist/cjs/utilities/triggerAnnotationRenderForViewportIds.js +7 -2
- package/dist/cjs/utilities/triggerAnnotationRenderForViewportIds.js.map +1 -1
- package/dist/esm/enums/AnnotationStyleStates.js +1 -0
- package/dist/esm/enums/AnnotationStyleStates.js.map +1 -1
- package/dist/esm/enums/ChangeTypes.js +10 -0
- package/dist/esm/enums/ChangeTypes.js.map +1 -0
- package/dist/esm/enums/Events.js +2 -0
- package/dist/esm/enums/Events.js.map +1 -1
- package/dist/esm/enums/index.js +2 -1
- package/dist/esm/enums/index.js.map +1 -1
- package/dist/esm/eventDispatchers/annotationInterpolationEventDispatcher.js +18 -0
- package/dist/esm/eventDispatchers/annotationInterpolationEventDispatcher.js.map +1 -0
- package/dist/esm/eventDispatchers/index.js +2 -1
- package/dist/esm/eventDispatchers/index.js.map +1 -1
- package/dist/esm/init.js +3 -0
- package/dist/esm/init.js.map +1 -1
- package/dist/esm/stateManagement/annotation/config/getState.js +3 -0
- package/dist/esm/stateManagement/annotation/config/getState.js.map +1 -1
- package/dist/esm/tools/annotation/LivewireContourTool.js +2 -2
- package/dist/esm/tools/annotation/LivewireContourTool.js.map +1 -1
- package/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.js +1 -0
- package/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.js.map +1 -1
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js +9 -4
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js.map +1 -1
- package/dist/esm/tools/annotation/SplineROITool.js +49 -21
- package/dist/esm/tools/annotation/SplineROITool.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +11 -2
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +8 -4
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +2 -2
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
- package/dist/esm/tools/base/ContourBaseTool.js +4 -0
- package/dist/esm/tools/base/ContourBaseTool.js.map +1 -1
- package/dist/esm/tools/base/ContourSegmentationBaseTool.js +12 -1
- package/dist/esm/tools/base/ContourSegmentationBaseTool.js.map +1 -1
- package/dist/esm/tools/displayTools/Contour/contourConfig.js +8 -3
- package/dist/esm/tools/displayTools/Contour/contourConfig.js.map +1 -1
- package/dist/esm/tools/displayTools/Contour/contourDisplay.js +0 -1
- package/dist/esm/tools/displayTools/Contour/contourDisplay.js.map +1 -1
- package/dist/esm/types/InterpolationTypes.js +2 -0
- package/dist/esm/types/InterpolationTypes.js.map +1 -0
- package/dist/esm/utilities/contours/PointsArray.js +98 -0
- package/dist/esm/utilities/contours/PointsArray.js.map +1 -0
- package/dist/esm/utilities/contours/index.js +3 -1
- package/dist/esm/utilities/contours/index.js.map +1 -1
- package/dist/esm/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js +5 -0
- package/dist/esm/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js.map +1 -0
- package/dist/esm/utilities/contours/interpolation/createPolylineToolData.js +36 -0
- package/dist/esm/utilities/contours/interpolation/createPolylineToolData.js.map +1 -0
- package/dist/esm/utilities/contours/interpolation/findAnnotationForInterpolation.js +102 -0
- package/dist/esm/utilities/contours/interpolation/findAnnotationForInterpolation.js.map +1 -0
- package/dist/esm/utilities/contours/interpolation/getInterpolationData.js +27 -0
- package/dist/esm/utilities/contours/interpolation/getInterpolationData.js.map +1 -0
- package/dist/esm/utilities/contours/interpolation/getInterpolationDataCollection.js +15 -0
- package/dist/esm/utilities/contours/interpolation/getInterpolationDataCollection.js.map +1 -0
- package/dist/esm/utilities/contours/interpolation/index.js +3 -0
- package/dist/esm/utilities/contours/interpolation/index.js.map +1 -0
- package/dist/esm/utilities/contours/interpolation/interpolate.js +314 -0
- package/dist/esm/utilities/contours/interpolation/interpolate.js.map +1 -0
- package/dist/esm/utilities/contours/reverseIfAntiClockwise.js +31 -0
- package/dist/esm/utilities/contours/reverseIfAntiClockwise.js.map +1 -0
- package/dist/esm/utilities/getViewportForAnnotation.js +16 -0
- package/dist/esm/utilities/getViewportForAnnotation.js.map +1 -0
- package/dist/esm/utilities/index.js +2 -1
- package/dist/esm/utilities/index.js.map +1 -1
- package/dist/esm/utilities/planar/filterAnnotationsForDisplay.js +1 -1
- package/dist/esm/utilities/planar/filterAnnotationsForDisplay.js.map +1 -1
- package/dist/esm/utilities/planarFreehandROITool/index.js +3 -3
- package/dist/esm/utilities/planarFreehandROITool/index.js.map +1 -1
- package/dist/esm/utilities/planarFreehandROITool/{interpolateAnnotation.js → smoothAnnotation.js} +4 -4
- package/dist/esm/utilities/planarFreehandROITool/smoothAnnotation.js.map +1 -0
- package/dist/esm/utilities/planarFreehandROITool/{interpolatePoints.js → smoothPoints.js} +9 -6
- package/dist/esm/utilities/planarFreehandROITool/smoothPoints.js.map +1 -0
- package/dist/esm/utilities/polyData/utils.js +4 -2
- package/dist/esm/utilities/polyData/utils.js.map +1 -1
- package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.js +150 -0
- package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.js.map +1 -0
- package/dist/esm/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.js +67 -0
- package/dist/esm/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.js.map +1 -0
- package/dist/esm/utilities/triggerAnnotationRenderForViewportIds.js +7 -2
- package/dist/esm/utilities/triggerAnnotationRenderForViewportIds.js.map +1 -1
- package/dist/types/enums/AnnotationStyleStates.d.ts +2 -1
- package/dist/types/enums/AnnotationStyleStates.d.ts.map +1 -1
- package/dist/types/enums/ChangeTypes.d.ts +9 -0
- package/dist/types/enums/ChangeTypes.d.ts.map +1 -0
- package/dist/types/enums/Events.d.ts +2 -0
- package/dist/types/enums/Events.d.ts.map +1 -1
- package/dist/types/enums/index.d.ts +2 -1
- package/dist/types/eventDispatchers/annotationInterpolationEventDispatcher.d.ts +6 -0
- package/dist/types/eventDispatchers/annotationInterpolationEventDispatcher.d.ts.map +1 -0
- package/dist/types/eventDispatchers/index.d.ts +2 -1
- package/dist/types/init.d.ts.map +1 -1
- package/dist/types/stateManagement/annotation/config/getState.d.ts.map +1 -1
- package/dist/types/tools/annotation/LivewireContourTool.d.ts +1 -1
- package/dist/types/tools/annotation/LivewireContourTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/PlanarFreehandContourSegmentationTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/PlanarFreehandROITool.d.ts +2 -2
- package/dist/types/tools/annotation/PlanarFreehandROITool.d.ts.map +1 -1
- package/dist/types/tools/annotation/SplineROITool.d.ts +4 -1
- package/dist/types/tools/annotation/SplineROITool.d.ts.map +1 -1
- package/dist/types/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts.map +1 -1
- package/dist/types/tools/annotation/planarFreehandROITool/drawLoop.d.ts.map +1 -1
- package/dist/types/tools/base/ContourBaseTool.d.ts.map +1 -1
- package/dist/types/tools/base/ContourSegmentationBaseTool.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Contour/contourConfig.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Contour/contourDisplay.d.ts.map +1 -1
- package/dist/types/types/AnnotationStyle.d.ts +2 -2
- package/dist/types/types/AnnotationStyle.d.ts.map +1 -1
- package/dist/types/types/AnnotationTypes.d.ts +1 -0
- package/dist/types/types/AnnotationTypes.d.ts.map +1 -1
- package/dist/types/types/ContourSegmentationAnnotation.d.ts +1 -0
- package/dist/types/types/ContourSegmentationAnnotation.d.ts.map +1 -1
- package/dist/types/types/ContourTypes.d.ts +3 -0
- package/dist/types/types/ContourTypes.d.ts.map +1 -1
- package/dist/types/types/EventTypes.d.ts +19 -1
- package/dist/types/types/EventTypes.d.ts.map +1 -1
- package/dist/types/types/InterpolationTypes.d.ts +19 -0
- package/dist/types/types/InterpolationTypes.d.ts.map +1 -0
- package/dist/types/types/ToolSpecificAnnotationTypes.d.ts +14 -0
- package/dist/types/types/ToolSpecificAnnotationTypes.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/contours/PointsArray.d.ts +30 -0
- package/dist/types/utilities/contours/PointsArray.d.ts.map +1 -0
- package/dist/types/utilities/contours/index.d.ts +3 -1
- package/dist/types/utilities/contours/index.d.ts.map +1 -1
- package/dist/types/utilities/contours/interpolation/acceptAutogeneratedInterpolations.d.ts +4 -0
- package/dist/types/utilities/contours/interpolation/acceptAutogeneratedInterpolations.d.ts.map +1 -0
- package/dist/types/utilities/contours/interpolation/createPolylineToolData.d.ts +3 -0
- package/dist/types/utilities/contours/interpolation/createPolylineToolData.d.ts.map +1 -0
- package/dist/types/utilities/contours/interpolation/findAnnotationForInterpolation.d.ts +8 -0
- package/dist/types/utilities/contours/interpolation/findAnnotationForInterpolation.d.ts.map +1 -0
- package/dist/types/utilities/contours/interpolation/getInterpolationData.d.ts +8 -0
- package/dist/types/utilities/contours/interpolation/getInterpolationData.d.ts.map +1 -0
- package/dist/types/utilities/contours/interpolation/getInterpolationDataCollection.d.ts +5 -0
- package/dist/types/utilities/contours/interpolation/getInterpolationDataCollection.d.ts.map +1 -0
- package/dist/types/utilities/contours/interpolation/index.d.ts +3 -0
- package/dist/types/utilities/contours/interpolation/index.d.ts.map +1 -0
- package/dist/types/utilities/contours/interpolation/interpolate.d.ts +4 -0
- package/dist/types/utilities/contours/interpolation/interpolate.d.ts.map +1 -0
- package/dist/types/utilities/contours/reverseIfAntiClockwise.d.ts +3 -0
- package/dist/types/utilities/contours/reverseIfAntiClockwise.d.ts.map +1 -0
- package/dist/types/utilities/getViewportForAnnotation.d.ts +3 -0
- package/dist/types/utilities/getViewportForAnnotation.d.ts.map +1 -0
- package/dist/types/utilities/index.d.ts +2 -1
- package/dist/types/utilities/index.d.ts.map +1 -1
- package/dist/types/utilities/planar/filterAnnotationsForDisplay.d.ts.map +1 -1
- package/dist/types/utilities/planarFreehandROITool/index.d.ts +3 -3
- package/dist/types/utilities/planarFreehandROITool/index.d.ts.map +1 -1
- package/dist/types/utilities/planarFreehandROITool/smoothAnnotation.d.ts +4 -0
- package/dist/types/utilities/planarFreehandROITool/smoothAnnotation.d.ts.map +1 -0
- package/dist/types/utilities/planarFreehandROITool/{interpolatePoints.d.ts → smoothPoints.d.ts} +2 -2
- package/dist/types/utilities/planarFreehandROITool/smoothPoints.d.ts.map +1 -0
- package/dist/types/utilities/polyData/utils.d.ts +2 -1
- package/dist/types/utilities/polyData/utils.d.ts.map +1 -1
- package/dist/types/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts +12 -0
- package/dist/types/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts.map +1 -0
- package/dist/types/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.d.ts +3 -0
- package/dist/types/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.d.ts.map +1 -0
- package/dist/types/utilities/triggerAnnotationRenderForViewportIds.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
- package/src/enums/AnnotationStyleStates.ts +3 -0
- package/src/enums/ChangeTypes.ts +32 -0
- package/src/enums/Events.ts +16 -0
- package/src/enums/index.js +2 -0
- package/src/eventDispatchers/annotationInterpolationEventDispatcher.ts +42 -0
- package/src/eventDispatchers/index.js +2 -0
- package/src/init.ts +3 -0
- package/src/stateManagement/annotation/config/getState.ts +16 -2
- package/src/tools/annotation/LivewireContourTool.ts +3 -8
- package/src/tools/annotation/PlanarFreehandContourSegmentationTool.ts +6 -0
- package/src/tools/annotation/PlanarFreehandROITool.ts +47 -25
- package/src/tools/annotation/SplineROITool.ts +80 -28
- package/src/tools/annotation/planarFreehandROITool/closedContourEditLoop.ts +15 -3
- package/src/tools/annotation/planarFreehandROITool/drawLoop.ts +10 -6
- package/src/tools/annotation/planarFreehandROITool/openContourEditLoop.ts +3 -3
- package/src/tools/base/ContourBaseTool.ts +4 -0
- package/src/tools/base/ContourSegmentationBaseTool.ts +11 -1
- package/src/tools/displayTools/Contour/contourConfig.ts +8 -3
- package/src/tools/displayTools/Contour/contourDisplay.ts +1 -3
- package/src/types/AnnotationStyle.ts +3 -1
- package/src/types/AnnotationTypes.ts +2 -0
- package/src/types/ContourSegmentationAnnotation.ts +1 -0
- package/src/types/ContourTypes.ts +8 -0
- package/src/types/EventTypes.ts +43 -0
- package/src/types/InterpolationTypes.ts +42 -0
- package/src/types/ToolSpecificAnnotationTypes.ts +15 -0
- package/src/types/index.ts +6 -0
- package/src/utilities/contours/PointsArray.ts +165 -0
- package/src/utilities/contours/index.ts +4 -1
- package/src/utilities/contours/interpolation/acceptAutogeneratedInterpolations.ts +16 -0
- package/src/utilities/contours/interpolation/createPolylineToolData.ts +56 -0
- package/src/utilities/contours/interpolation/findAnnotationForInterpolation.ts +225 -0
- package/src/utilities/contours/interpolation/getInterpolationData.ts +75 -0
- package/src/utilities/contours/interpolation/getInterpolationDataCollection.ts +31 -0
- package/src/utilities/contours/interpolation/index.ts +3 -0
- package/src/utilities/contours/interpolation/interpolate.ts +695 -0
- package/src/utilities/contours/reverseIfAntiClockwise.ts +50 -0
- package/src/utilities/getViewportForAnnotation.ts +29 -0
- package/src/utilities/index.ts +2 -0
- package/src/utilities/livewire/LivewireScissors.ts +1 -1
- package/src/utilities/planar/filterAnnotationsForDisplay.ts +6 -1
- package/src/utilities/planarFreehandROITool/index.ts +3 -3
- package/src/utilities/planarFreehandROITool/{interpolateAnnotation.ts → smoothAnnotation.ts} +5 -3
- package/src/utilities/planarFreehandROITool/{interpolatePoints.ts → smoothPoints.ts} +12 -6
- package/src/utilities/polyData/utils.ts +12 -5
- package/src/utilities/segmentation/InterpolationManager/InterpolationManager.ts +207 -0
- package/src/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.ts +97 -0
- package/src/utilities/triggerAnnotationRenderForViewportIds.ts +7 -2
- package/dist/cjs/utilities/planarFreehandROITool/interpolateAnnotation.d.ts +0 -3
- package/dist/cjs/utilities/planarFreehandROITool/interpolateAnnotation.js.map +0 -1
- package/dist/cjs/utilities/planarFreehandROITool/interpolatePoints.js.map +0 -1
- package/dist/esm/utilities/planarFreehandROITool/interpolateAnnotation.js.map +0 -1
- package/dist/esm/utilities/planarFreehandROITool/interpolatePoints.js.map +0 -1
- package/dist/types/utilities/planarFreehandROITool/interpolateAnnotation.d.ts +0 -4
- package/dist/types/utilities/planarFreehandROITool/interpolateAnnotation.d.ts.map +0 -1
- package/dist/types/utilities/planarFreehandROITool/interpolatePoints.d.ts.map +0 -1
|
@@ -8,9 +8,14 @@ const core_1 = require("@cornerstonejs/core");
|
|
|
8
8
|
const segmentation_1 = require("../../stateManagement/segmentation");
|
|
9
9
|
const enums_1 = require("../../enums");
|
|
10
10
|
const ContourBaseTool_1 = __importDefault(require("./ContourBaseTool"));
|
|
11
|
+
const interpolation_1 = require("../../utilities/contours/interpolation");
|
|
11
12
|
class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
12
13
|
constructor(toolProps, defaultToolProps) {
|
|
14
|
+
var _a;
|
|
13
15
|
super(toolProps, defaultToolProps);
|
|
16
|
+
if ((_a = this.configuration.interpolation) === null || _a === void 0 ? void 0 : _a.enabled) {
|
|
17
|
+
interpolation_1.InterpolationManager.addTool(this.getToolName());
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
isContourSegmentationTool() {
|
|
16
21
|
return true;
|
|
@@ -63,12 +68,13 @@ class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
|
63
68
|
return core_1.utilities.deepMerge(annotationStyle, contourSegmentationStyle);
|
|
64
69
|
}
|
|
65
70
|
_getContourSegmentationStyle(context) {
|
|
66
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
71
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
67
72
|
const { toolGroupId } = this;
|
|
68
73
|
const annotation = context.annotation;
|
|
69
74
|
const { segmentationRepresentationUID, segmentationId, segmentIndex } = annotation.data.segmentation;
|
|
70
75
|
const segmentationRepresentation = segmentation_1.state.getSegmentationRepresentationByUID(toolGroupId, segmentationRepresentationUID);
|
|
71
76
|
const { active } = segmentationRepresentation;
|
|
77
|
+
const { autoGenerated } = annotation;
|
|
72
78
|
const segmentsLocked = segmentation_1.segmentLocking.getLockedSegments(segmentationId);
|
|
73
79
|
const annotationLocked = segmentsLocked.includes(segmentIndex);
|
|
74
80
|
const segmentColor = segmentation_1.config.color.getColorForSegmentIndex(toolGroupId, segmentationRepresentationUID, segmentIndex);
|
|
@@ -83,17 +89,23 @@ class ContourSegmentationBaseTool extends ContourBaseTool_1.default {
|
|
|
83
89
|
let lineDash = undefined;
|
|
84
90
|
let lineOpacity = 1;
|
|
85
91
|
let fillOpacity = 0;
|
|
86
|
-
if (
|
|
87
|
-
lineWidth = (_g = mergedConfig.
|
|
88
|
-
lineDash = (_h = mergedConfig.
|
|
92
|
+
if (autoGenerated) {
|
|
93
|
+
lineWidth = (_g = mergedConfig.outlineWidthAutoGenerated) !== null && _g !== void 0 ? _g : lineWidth;
|
|
94
|
+
lineDash = (_h = mergedConfig.outlineDashAutoGenerated) !== null && _h !== void 0 ? _h : lineDash;
|
|
89
95
|
lineOpacity = (_j = mergedConfig.outlineOpacity) !== null && _j !== void 0 ? _j : lineOpacity;
|
|
90
|
-
fillOpacity = (_k = mergedConfig.
|
|
96
|
+
fillOpacity = (_k = mergedConfig.fillAlphaAutoGenerated) !== null && _k !== void 0 ? _k : fillOpacity;
|
|
97
|
+
}
|
|
98
|
+
else if (active) {
|
|
99
|
+
lineWidth = (_l = mergedConfig.outlineWidthActive) !== null && _l !== void 0 ? _l : lineWidth;
|
|
100
|
+
lineDash = (_m = mergedConfig.outlineDashActive) !== null && _m !== void 0 ? _m : lineDash;
|
|
101
|
+
lineOpacity = (_o = mergedConfig.outlineOpacity) !== null && _o !== void 0 ? _o : lineOpacity;
|
|
102
|
+
fillOpacity = (_p = mergedConfig.fillAlpha) !== null && _p !== void 0 ? _p : fillOpacity;
|
|
91
103
|
}
|
|
92
104
|
else {
|
|
93
|
-
lineWidth = (
|
|
94
|
-
lineDash = (
|
|
95
|
-
lineOpacity = (
|
|
96
|
-
fillOpacity = (
|
|
105
|
+
lineWidth = (_q = mergedConfig.outlineWidthInactive) !== null && _q !== void 0 ? _q : lineWidth;
|
|
106
|
+
lineDash = (_r = mergedConfig.outlineDashInactive) !== null && _r !== void 0 ? _r : lineDash;
|
|
107
|
+
lineOpacity = (_s = mergedConfig.outlineOpacityInactive) !== null && _s !== void 0 ? _s : lineOpacity;
|
|
108
|
+
fillOpacity = (_t = mergedConfig.fillAlphaInactive) !== null && _t !== void 0 ? _t : fillOpacity;
|
|
97
109
|
}
|
|
98
110
|
lineWidth = mergedConfig.renderOutline ? lineWidth : 0;
|
|
99
111
|
fillOpacity = mergedConfig.renderFill ? fillOpacity : 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContourSegmentationBaseTool.js","sourceRoot":"","sources":["../../../../src/tools/base/ContourSegmentationBaseTool.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAgD;AAOhD,qEAM4C;AAG5C,uCAA0D;AAC1D,wEAAgD;
|
|
1
|
+
{"version":3,"file":"ContourSegmentationBaseTool.js","sourceRoot":"","sources":["../../../../src/tools/base/ContourSegmentationBaseTool.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAgD;AAOhD,qEAM4C;AAG5C,uCAA0D;AAC1D,wEAAgD;AAChD,0EAA8E;AAM9E,MAAe,2BAA4B,SAAQ,yBAAe;IAChE,YAAY,SAA0B,EAAE,gBAA2B;;QACjE,KAAK,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;QACnC,IAAI,MAAA,IAAI,CAAC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@@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const defaultContourConfig = {
|
|
4
4
|
renderOutline: true,
|
|
5
|
+
outlineWidthAutoGenerated: 3,
|
|
5
6
|
outlineWidthActive: 2,
|
|
6
|
-
outlineWidthInactive:
|
|
7
|
+
outlineWidthInactive: 1,
|
|
7
8
|
outlineOpacity: 1,
|
|
8
9
|
outlineOpacityInactive: 0.85,
|
|
10
|
+
outlineDashActive: undefined,
|
|
11
|
+
outlineDashInactive: undefined,
|
|
12
|
+
outlineDashAutoGenerated: '5,3',
|
|
9
13
|
renderFill: true,
|
|
10
|
-
fillAlpha:
|
|
11
|
-
fillAlphaInactive: 0,
|
|
14
|
+
fillAlpha: 0.5,
|
|
15
|
+
fillAlphaInactive: 0.3,
|
|
16
|
+
fillAlphaAutoGenerated: 0.3,
|
|
12
17
|
};
|
|
13
18
|
function getDefaultContourConfig() {
|
|
14
19
|
return defaultContourConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contourConfig.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/contourConfig.ts"],"names":[],"mappings":";;AAEA,MAAM,oBAAoB,GAAkB;IAC1C,aAAa,EAAE,IAAI;IACnB,kBAAkB,EAAE,CAAC;IACrB,oBAAoB,EAAE,CAAC;IACvB,cAAc,EAAE,CAAC;IACjB,sBAAsB,EAAE,IAAI;IAC5B,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"contourConfig.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/contourConfig.ts"],"names":[],"mappings":";;AAEA,MAAM,oBAAoB,GAAkB;IAC1C,aAAa,EAAE,IAAI;IACnB,yBAAyB,EAAE,CAAC;IAC5B,kBAAkB,EAAE,CAAC;IACrB,oBAAoB,EAAE,CAAC;IACvB,cAAc,EAAE,CAAC;IACjB,sBAAsB,EAAE,IAAI;IAC5B,iBAAiB,EAAE,SAAS;IAC5B,mBAAmB,EAAE,SAAS;IAC9B,wBAAwB,EAAE,KAAK;IAC/B,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,GAAG;IACd,iBAAiB,EAAE,GAAG;IACtB,sBAAsB,EAAE,GAAG;CAC5B,CAAC;AAEF,SAAS,uBAAuB;IAC9B,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,kBAAe,uBAAuB,CAAC"}
|
|
@@ -64,7 +64,6 @@ function render(viewport, representationConfig, toolGroupConfig) {
|
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
if (!(geometryIds === null || geometryIds === void 0 ? void 0 : geometryIds.length)) {
|
|
67
|
-
console.warn(`No contours found for segmentationId ${segmentationId}. Skipping render.`);
|
|
68
67
|
return;
|
|
69
68
|
}
|
|
70
69
|
(0, addOrUpdateContourSets_1.addOrUpdateContourSets)(viewport, geometryIds, representationConfig, toolGroupConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contourDisplay.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/contourDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAI6B;AAE7B,6GAAyE;AACzE,2GAA6F;AAC7F,sEAA+D;AAK/D,qEAAkE;AAClE,0FAAkE;AAClE,6DAAyD;AAYzD,SAAS,gCAAgC,CACvC,WAAmB,EACnB,6BAAqC,EACrC,eAAe,GAAG,KAAK;IAEvB,oCAAoC,CAClC,WAAW,EACX,6BAA6B,CAC9B,CAAC;IACF,iBAAiB,CAAC,gCAAgC,CAChD,WAAW,EACX,6BAA6B,CAC9B,CAAC;IAEF,IAAA,sCAAiB,EAAC,6BAA6B,CAAC,CAAC;IAEjD,IAAI,eAAe,EAAE;QACnB,MAAM,aAAa,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACnE,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,EAAE;YAC1D,MAAM,cAAc,GAAG,IAAA,6BAAsB,EAC3C,UAAU,EACV,iBAAiB,CAClB,CAAC;YACF,cAAc,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACnC,CAAC,CAAC,CAAC;KACJ;AACH,CAAC;AAQD,SAAe,MAAM,CACnB,QAA+B,EAC/B,oBAAqD,EACrD,eAAiD;;QAEjD,MAAM,EAAE,cAAc,EAAE,GAAG,oBAAoB,CAAC;QAChD,MAAM,YAAY,GAAG,iBAAiB,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;QACvE,MAAM,WAAW,GAAG,YAAY,CAAC,kBAAkB,CAAC,qCAAe,CAAC,OAAO,CAAC,CAAC;QAC7E,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;QAIpC,IAAI,QAAQ,YAAY,oBAAa,EAAE;YACrC,OAAO;SACR;QAED,IAAI,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAA,EAAE;
|
|
1
|
+
{"version":3,"file":"contourDisplay.js","sourceRoot":"","sources":["../../../../../src/tools/displayTools/Contour/contourDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAI6B;AAE7B,6GAAyE;AACzE,2GAA6F;AAC7F,sEAA+D;AAK/D,qEAAkE;AAClE,0FAAkE;AAClE,6DAAyD;AAYzD,SAAS,gCAAgC,CACvC,WAAmB,EACnB,6BAAqC,EACrC,eAAe,GAAG,KAAK;IAEvB,oCAAoC,CAClC,WAAW,EACX,6BAA6B,CAC9B,CAAC;IACF,iBAAiB,CAAC,gCAAgC,CAChD,WAAW,EACX,6BAA6B,CAC9B,CAAC;IAEF,IAAA,sCAAiB,EAAC,6BAA6B,CAAC,CAAC;IAEjD,IAAI,eAAe,EAAE;QACnB,MAAM,aAAa,GAAG,IAAA,+BAAY,EAAC,WAAW,CAAC,CAAC,gBAAgB,E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B,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,6 +1,6 @@
|
|
|
1
1
|
declare type Modes = '' | 'Active' | 'Passive' | 'Enabled';
|
|
2
|
-
declare type States = '' | 'Highlighted' | 'Selected' | 'Locked';
|
|
3
|
-
declare type Properties = 'color' | 'lineWidth' | 'lineDash' | 'textBoxFontFamily' | 'textBoxFontSize' | 'textBoxColor' | 'textBoxBackground' | 'textBoxLinkLineWidth' | 'textBoxLinkLineDash';
|
|
2
|
+
declare type States = '' | 'Highlighted' | 'Selected' | 'Locked' | 'AutoGenerated';
|
|
3
|
+
declare type Properties = 'color' | 'colorAutoGenerated' | 'lineWidth' | 'lineWidthAutoGenerated' | 'lineDash' | 'textBoxFontFamily' | 'textBoxFontSize' | 'textBoxColor' | 'textBoxBackground' | 'textBoxLinkLineWidth' | 'textBoxLinkLineDash';
|
|
4
4
|
export declare type AnnotationStyle = {
|
|
5
5
|
[key in `${Properties}${States}${Modes}`]?: string;
|
|
6
6
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
export declare type ContourConfig = {
|
|
2
|
+
outlineWidthAutoGenerated?: number;
|
|
2
3
|
outlineWidthActive?: number;
|
|
3
4
|
outlineWidthInactive?: number;
|
|
4
5
|
outlineOpacity?: number;
|
|
5
6
|
outlineOpacityInactive?: number;
|
|
6
7
|
outlineDashActive?: string;
|
|
7
8
|
outlineDashInactive?: string;
|
|
9
|
+
outlineDashAutoGenerated?: string;
|
|
8
10
|
renderOutline?: boolean;
|
|
9
11
|
renderFill?: boolean;
|
|
10
12
|
fillAlpha?: number;
|
|
11
13
|
fillAlphaInactive?: number;
|
|
14
|
+
fillAlphaAutoGenerated?: number;
|
|
12
15
|
};
|
|
13
16
|
export declare type ContourRenderingConfig = {};
|
|
14
17
|
export declare type ContourSegmentationData = {
|
|
@@ -6,6 +6,8 @@ import IDistance from './IDistance';
|
|
|
6
6
|
import { SetToolBindingsType } from './ISetToolModeOptions';
|
|
7
7
|
import { Swipe } from '../enums/Touch';
|
|
8
8
|
import { ToolModes } from '../enums';
|
|
9
|
+
import { InterpolationROIAnnotation } from './ToolSpecificAnnotationTypes';
|
|
10
|
+
import { ChangeTypes } from '../enums';
|
|
9
11
|
declare type NormalizedInteractionEventDetail = {
|
|
10
12
|
eventName: string;
|
|
11
13
|
renderingEngineId: string;
|
|
@@ -56,11 +58,13 @@ declare type AnnotationAddedEventDetail = {
|
|
|
56
58
|
};
|
|
57
59
|
declare type AnnotationCompletedEventDetail = {
|
|
58
60
|
annotation: Annotation;
|
|
61
|
+
changeType?: ChangeTypes.Completed;
|
|
59
62
|
};
|
|
60
63
|
declare type AnnotationModifiedEventDetail = {
|
|
61
64
|
viewportId: string;
|
|
62
65
|
renderingEngineId: string;
|
|
63
66
|
annotation: Annotation;
|
|
67
|
+
changeType?: ChangeTypes;
|
|
64
68
|
};
|
|
65
69
|
declare type AnnotationRemovedEventDetail = {
|
|
66
70
|
annotation: Annotation;
|
|
@@ -86,6 +90,18 @@ declare type AnnotationRenderedEventDetail = {
|
|
|
86
90
|
viewportId: string;
|
|
87
91
|
renderingEngineId: string;
|
|
88
92
|
};
|
|
93
|
+
declare type AnnotationInterpolationCompletedEventDetail = {
|
|
94
|
+
annotation: InterpolationROIAnnotation;
|
|
95
|
+
element: HTMLDivElement;
|
|
96
|
+
viewportId: string;
|
|
97
|
+
renderingEngineId: string;
|
|
98
|
+
};
|
|
99
|
+
declare type AnnotationInterpolationRemovedEventDetail = {
|
|
100
|
+
annotations: Array<InterpolationROIAnnotation>;
|
|
101
|
+
element: HTMLDivElement;
|
|
102
|
+
viewportId: string;
|
|
103
|
+
renderingEngineId: string;
|
|
104
|
+
};
|
|
89
105
|
declare type SegmentationDataModifiedEventDetail = {
|
|
90
106
|
segmentationId: string;
|
|
91
107
|
modifiedSlicesToUse?: number[];
|
|
@@ -185,6 +201,8 @@ declare type AnnotationSelectionChangeEventType = Types.CustomEventType<Annotati
|
|
|
185
201
|
declare type AnnotationRenderedEventType = Types.CustomEventType<AnnotationRenderedEventDetail>;
|
|
186
202
|
declare type AnnotationLockChangeEventType = Types.CustomEventType<AnnotationLockChangeEventDetail>;
|
|
187
203
|
declare type AnnotationVisibilityChangeEventType = Types.CustomEventType<AnnotationVisibilityChangeEventDetail>;
|
|
204
|
+
declare type AnnotationInterpolationCompletedEventType = Types.CustomEventType<AnnotationInterpolationCompletedEventDetail>;
|
|
205
|
+
declare type AnnotationInterpolationRemovedEventType = Types.CustomEventType<AnnotationInterpolationRemovedEventDetail>;
|
|
188
206
|
declare type SegmentationDataModifiedEventType = Types.CustomEventType<SegmentationDataModifiedEventDetail>;
|
|
189
207
|
declare type SegmentationRepresentationModifiedEventType = Types.CustomEventType<SegmentationRepresentationModifiedEventDetail>;
|
|
190
208
|
declare type SegmentationRemovedEventType = Types.CustomEventType<SegmentationRemovedEventDetail>;
|
|
@@ -212,4 +230,4 @@ declare type MouseMoveEventType = Types.CustomEventType<MouseMoveEventDetail>;
|
|
|
212
230
|
declare type MouseDoubleClickEventType = Types.CustomEventType<MouseDoubleClickEventDetail>;
|
|
213
231
|
declare type MouseWheelEventType = Types.CustomEventType<MouseWheelEventDetail>;
|
|
214
232
|
declare type VolumeScrollOutOfBoundsEventType = Types.CustomEventType<VolumeScrollOutOfBoundsEventDetail>;
|
|
215
|
-
export { InteractionStartType, InteractionEndType, InteractionEventType, NormalizedInteractionEventDetail, NormalizedMouseEventType, NormalizedTouchEventType, ToolModeChangedEventDetail, ToolModeChangedEventType, ToolActivatedEventDetail, ToolActivatedEventType, AnnotationAddedEventDetail, AnnotationAddedEventType, AnnotationCompletedEventDetail, AnnotationCompletedEventType, AnnotationModifiedEventDetail, AnnotationModifiedEventType, AnnotationRemovedEventDetail, AnnotationRemovedEventType, AnnotationSelectionChangeEventDetail, AnnotationSelectionChangeEventType, AnnotationRenderedEventDetail, AnnotationRenderedEventType, AnnotationLockChangeEventDetail, AnnotationVisibilityChangeEventDetail, AnnotationLockChangeEventType, AnnotationVisibilityChangeEventType, SegmentationDataModifiedEventType, SegmentationRepresentationModifiedEventDetail, SegmentationRepresentationModifiedEventType, SegmentationRepresentationRemovedEventDetail, SegmentationRepresentationRemovedEventType, SegmentationRemovedEventType, SegmentationRemovedEventDetail, SegmentationDataModifiedEventDetail, SegmentationRenderedEventType, SegmentationRenderedEventDetail, SegmentationModifiedEventType, SegmentationModifiedEventDetail, KeyDownEventDetail, KeyDownEventType, KeyUpEventDetail, KeyUpEventType, MouseDownEventDetail, TouchStartEventDetail, MouseDownEventType, TouchStartEventType, MouseDownActivateEventDetail, TouchStartActivateEventDetail, MouseDownActivateEventType, TouchStartActivateEventType, MouseDragEventDetail, TouchDragEventDetail, MouseDragEventType, TouchDragEventType, MouseUpEventDetail, TouchEndEventDetail, MouseUpEventType, TouchEndEventType, MouseClickEventDetail, MouseClickEventType, TouchTapEventDetail, TouchTapEventType, TouchSwipeEventDetail, TouchSwipeEventType, TouchPressEventDetail, TouchPressEventType, MouseMoveEventDetail, MouseMoveEventType, MouseDoubleClickEventDetail, MouseDoubleClickEventType, MouseWheelEventDetail, MouseWheelEventType, VolumeScrollOutOfBoundsEventDetail, VolumeScrollOutOfBoundsEventType, };
|
|
233
|
+
export { InteractionStartType, InteractionEndType, InteractionEventType, NormalizedInteractionEventDetail, NormalizedMouseEventType, NormalizedTouchEventType, ToolModeChangedEventDetail, ToolModeChangedEventType, ToolActivatedEventDetail, ToolActivatedEventType, AnnotationAddedEventDetail, AnnotationAddedEventType, AnnotationCompletedEventDetail, AnnotationCompletedEventType, AnnotationModifiedEventDetail, AnnotationModifiedEventType, AnnotationRemovedEventDetail, AnnotationRemovedEventType, AnnotationSelectionChangeEventDetail, AnnotationSelectionChangeEventType, AnnotationRenderedEventDetail, AnnotationRenderedEventType, AnnotationLockChangeEventDetail, AnnotationVisibilityChangeEventDetail, AnnotationLockChangeEventType, AnnotationVisibilityChangeEventType, AnnotationInterpolationCompletedEventDetail, AnnotationInterpolationCompletedEventType, AnnotationInterpolationRemovedEventDetail, AnnotationInterpolationRemovedEventType, SegmentationDataModifiedEventType, SegmentationRepresentationModifiedEventDetail, SegmentationRepresentationModifiedEventType, SegmentationRepresentationRemovedEventDetail, SegmentationRepresentationRemovedEventType, SegmentationRemovedEventType, SegmentationRemovedEventDetail, SegmentationDataModifiedEventDetail, SegmentationRenderedEventType, SegmentationRenderedEventDetail, SegmentationModifiedEventType, SegmentationModifiedEventDetail, KeyDownEventDetail, KeyDownEventType, KeyUpEventDetail, KeyUpEventType, MouseDownEventDetail, TouchStartEventDetail, MouseDownEventType, TouchStartEventType, MouseDownActivateEventDetail, TouchStartActivateEventDetail, MouseDownActivateEventType, TouchStartActivateEventType, MouseDragEventDetail, TouchDragEventDetail, MouseDragEventType, TouchDragEventType, MouseUpEventDetail, TouchEndEventDetail, MouseUpEventType, TouchEndEventType, MouseClickEventDetail, MouseClickEventType, TouchTapEventDetail, TouchTapEventType, TouchSwipeEventDetail, TouchSwipeEventType, TouchPressEventDetail, TouchPressEventType, MouseMoveEventDetail, MouseMoveEventType, MouseDoubleClickEventDetail, MouseDoubleClickEventType, MouseWheelEventDetail, MouseWheelEventType, VolumeScrollOutOfBoundsEventDetail, VolumeScrollOutOfBoundsEventType, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { Annotation } from './AnnotationTypes';
|
|
3
|
+
import { InterpolationROIAnnotation } from './ToolSpecificAnnotationTypes';
|
|
4
|
+
export declare type InterpolationViewportData = {
|
|
5
|
+
annotation: InterpolationROIAnnotation;
|
|
6
|
+
interpolationUID: string;
|
|
7
|
+
viewport: Types.IViewport;
|
|
8
|
+
sliceData: Types.ImageSliceData;
|
|
9
|
+
};
|
|
10
|
+
export declare type ImageInterpolationData = {
|
|
11
|
+
sliceIndex: number;
|
|
12
|
+
annotations?: Annotation[];
|
|
13
|
+
};
|
|
14
|
+
export declare type AcceptInterpolationSelector = {
|
|
15
|
+
toolNames?: string[];
|
|
16
|
+
segmentationId?: string;
|
|
17
|
+
segmentIndex?: number;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InterpolationTypes.js","sourceRoot":"","sources":["../../../src/types/InterpolationTypes.ts"],"names":[],"mappings":""}
|
|
@@ -243,6 +243,20 @@ export declare type PlanarFreehandROIAnnotation = ContourAnnotation & {
|
|
|
243
243
|
};
|
|
244
244
|
};
|
|
245
245
|
export declare type PlanarFreehandContourSegmentationAnnotation = PlanarFreehandROIAnnotation & ContourSegmentationAnnotationData;
|
|
246
|
+
export declare type InterpolationROIAnnotation = ContourAnnotation & {
|
|
247
|
+
metadata: {
|
|
248
|
+
cameraPosition?: Types.Point3;
|
|
249
|
+
cameraFocalPoint?: Types.Point3;
|
|
250
|
+
viewPlaneNormal?: Types.Point3;
|
|
251
|
+
viewUp?: Types.Point3;
|
|
252
|
+
annotationUID?: string;
|
|
253
|
+
FrameOfReferenceUID: string;
|
|
254
|
+
referencedImageId?: string;
|
|
255
|
+
toolName: string;
|
|
256
|
+
referencedSliceIndex?: number;
|
|
257
|
+
};
|
|
258
|
+
interpolationUID?: string;
|
|
259
|
+
};
|
|
246
260
|
export interface ArrowAnnotation extends Annotation {
|
|
247
261
|
data: {
|
|
248
262
|
text: string;
|
|
@@ -32,6 +32,7 @@ import type AnnotationGroupSelector from './AnnotationGroupSelector';
|
|
|
32
32
|
import type { Statistics } from './CalculatorTypes';
|
|
33
33
|
import type { CanvasCoordinates } from '../utilities/math/ellipse/getCanvasEllipseCorners';
|
|
34
34
|
import { LabelmapToolOperationData, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume } from './LabelmapToolOperationData';
|
|
35
|
+
import type { InterpolationViewportData, ImageInterpolationData } from './InterpolationTypes';
|
|
35
36
|
import type { CardinalSplineProps } from './CardinalSplineProps';
|
|
36
37
|
import type { ClosestControlPoint } from './ClosestControlPoint';
|
|
37
38
|
import type { ClosestPoint } from './ClosestPoint';
|
|
@@ -42,4 +43,4 @@ import type { SplineCurveSegment } from './SplineCurveSegment';
|
|
|
42
43
|
import type { SplineLineSegment } from './SplineLineSegment';
|
|
43
44
|
import type { SplineProps } from './SplineProps';
|
|
44
45
|
import type { BidirectionalData } from '../utilities/segmentation/createBidirectionalToolData';
|
|
45
|
-
export type { Annotation, Annotations, ContourAnnotationData, ContourAnnotation, ContourSegmentationAnnotationData, ContourSegmentationAnnotation, BidirectionalData, CanvasCoordinates, IAnnotationManager, GroupSpecificAnnotations, AnnotationState, AnnotationStyle, ToolSpecificAnnotationTypes, JumpToSliceOptions, AnnotationGroupSelector, PlanarBoundingBox, ToolProps, PublicToolProps, ToolConfiguration, EventTypes, IPoints, ITouchPoints, IDistance, IToolBinding, SetToolBindingsType, ToolOptionsType, InteractionTypes, ToolAction, IToolGroup, IToolClassReference, ISynchronizerEventHandler, ToolHandle, AnnotationHandle, TextBoxHandle, Segmentation, SegmentationState, SegmentationRepresentationData, SegmentationRepresentationConfig, RepresentationConfig, ToolGroupSpecificRepresentationState, ToolGroupSpecificContourRepresentation, ToolGroupSpecificLabelmapRepresentation, ToolGroupSpecificRepresentation, RepresentationPublicInput, LabelmapTypes, SVGCursorDescriptor, SVGPoint, ScrollOptions, CINETypes, BoundsIJK, SVGDrawingHelper, FloodFillResult, FloodFillGetter, FloodFillOptions, ContourSegmentationData, Statistics, LabelmapToolOperationData, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume, CardinalSplineProps, ClosestControlPoint, ClosestPoint, ClosestSplinePoint, ControlPointInfo, ISpline, SplineCurveSegment, SplineLineSegment, SplineProps, };
|
|
46
|
+
export type { Annotation, Annotations, ContourAnnotationData, ContourAnnotation, ContourSegmentationAnnotationData, ContourSegmentationAnnotation, BidirectionalData, CanvasCoordinates, IAnnotationManager, InterpolationViewportData, ImageInterpolationData, GroupSpecificAnnotations, AnnotationState, AnnotationStyle, ToolSpecificAnnotationTypes, JumpToSliceOptions, AnnotationGroupSelector, PlanarBoundingBox, ToolProps, PublicToolProps, ToolConfiguration, EventTypes, IPoints, ITouchPoints, IDistance, IToolBinding, SetToolBindingsType, ToolOptionsType, InteractionTypes, ToolAction, IToolGroup, IToolClassReference, ISynchronizerEventHandler, ToolHandle, AnnotationHandle, TextBoxHandle, Segmentation, SegmentationState, SegmentationRepresentationData, SegmentationRepresentationConfig, RepresentationConfig, ToolGroupSpecificRepresentationState, ToolGroupSpecificContourRepresentation, ToolGroupSpecificLabelmapRepresentation, ToolGroupSpecificRepresentation, RepresentationPublicInput, LabelmapTypes, SVGCursorDescriptor, SVGPoint, ScrollOptions, CINETypes, BoundsIJK, SVGDrawingHelper, FloodFillResult, FloodFillGetter, FloodFillOptions, ContourSegmentationData, Statistics, LabelmapToolOperationData, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume, CardinalSplineProps, ClosestControlPoint, ClosestPoint, ClosestSplinePoint, ControlPointInfo, ISpline, SplineCurveSegment, SplineLineSegment, SplineProps, };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
export declare type PolyDataPointConfiguration = {
|
|
3
|
+
dimensions?: 2 | 3;
|
|
4
|
+
initialSize?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare abstract class PointsArray<T> {
|
|
7
|
+
data: Float32Array;
|
|
8
|
+
dimensions: number;
|
|
9
|
+
length: number;
|
|
10
|
+
constructor(configuration?: PolyDataPointConfiguration);
|
|
11
|
+
protected forEach(func: (value: T, index: number) => void, point: T): void;
|
|
12
|
+
abstract getPoint(index: number, point: T): T;
|
|
13
|
+
reverse(): void;
|
|
14
|
+
protected map(f: (value: any, index: number) => T, factory: (index: number) => T): any[];
|
|
15
|
+
static fromXYZ({ x, y, z }: Types.PointsXYZ): PointsArray3;
|
|
16
|
+
}
|
|
17
|
+
export declare class PointsArray2 extends PointsArray<Types.Point2> {
|
|
18
|
+
constructor(configuration?: {});
|
|
19
|
+
forEach(func: (value: Types.Point2, index: number) => void, point?: Types.Point2): void;
|
|
20
|
+
getPoint(index: number, point?: Types.Point2): Types.Point2;
|
|
21
|
+
get points(): any[];
|
|
22
|
+
}
|
|
23
|
+
export declare class PointsArray3 extends PointsArray<Types.Point3> {
|
|
24
|
+
constructor(configuration?: {});
|
|
25
|
+
forEach(func: (value: Types.Point3, index: number) => void, point?: Types.Point3): void;
|
|
26
|
+
getPoint(index: number, point?: Types.Point3): Types.Point3;
|
|
27
|
+
get points(): any[];
|
|
28
|
+
getXYZ(): Types.PointsXYZ;
|
|
29
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PointsArray3 = exports.PointsArray2 = exports.PointsArray = void 0;
|
|
4
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
5
|
+
class PointsArray {
|
|
6
|
+
constructor(configuration = {}) {
|
|
7
|
+
this.dimensions = 3;
|
|
8
|
+
this.length = 0;
|
|
9
|
+
const { initialSize = 1024, dimensions = 3 } = configuration;
|
|
10
|
+
this.data = new Float32Array(initialSize * dimensions);
|
|
11
|
+
this.dimensions = dimensions;
|
|
12
|
+
}
|
|
13
|
+
forEach(func, point) {
|
|
14
|
+
for (let i = 0; i < this.length; i++) {
|
|
15
|
+
func(this.getPoint(i, point), i);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
reverse() {
|
|
19
|
+
const midLength = Math.floor(this.length / 2);
|
|
20
|
+
for (let i = 0; i < midLength; i++) {
|
|
21
|
+
const indexStart = i * this.dimensions;
|
|
22
|
+
const indexEnd = (this.length - 1 - i) * this.dimensions;
|
|
23
|
+
for (let dimension = 0; dimension < this.dimensions; dimension++) {
|
|
24
|
+
const valueStart = this.data[indexStart + dimension];
|
|
25
|
+
this.data[indexStart + dimension] = this.data[indexEnd + dimension];
|
|
26
|
+
this.data[indexEnd + dimension] = valueStart;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
map(f, factory) {
|
|
31
|
+
const mapData = [];
|
|
32
|
+
for (let i = 0; i < this.length; i++) {
|
|
33
|
+
mapData.push(f(this.getPoint(i, factory(i)), i));
|
|
34
|
+
}
|
|
35
|
+
return mapData;
|
|
36
|
+
}
|
|
37
|
+
static fromXYZ({ x, y, z }) {
|
|
38
|
+
const array = new PointsArray3({ initialSize: x.length });
|
|
39
|
+
let offset = 0;
|
|
40
|
+
for (let i = 0; i < x.length; i++) {
|
|
41
|
+
array.data[offset++] = x[i];
|
|
42
|
+
array.data[offset++] = y[i];
|
|
43
|
+
array.data[offset++] = z[i];
|
|
44
|
+
}
|
|
45
|
+
array.length = x.length;
|
|
46
|
+
return array;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.PointsArray = PointsArray;
|
|
50
|
+
class PointsArray2 extends PointsArray {
|
|
51
|
+
constructor(configuration = {}) {
|
|
52
|
+
super(Object.assign(Object.assign({}, configuration), { dimensions: 2 }));
|
|
53
|
+
}
|
|
54
|
+
forEach(func, point = gl_matrix_1.vec2.create()) {
|
|
55
|
+
super.forEach(func, point);
|
|
56
|
+
}
|
|
57
|
+
getPoint(index, point = gl_matrix_1.vec2.create()) {
|
|
58
|
+
if (index >= this.length) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const index2 = index * 2;
|
|
62
|
+
point[0] = this.data[index2];
|
|
63
|
+
point[1] = this.data[index2 + 1];
|
|
64
|
+
return point;
|
|
65
|
+
}
|
|
66
|
+
get points() {
|
|
67
|
+
return this.map((point) => point, () => gl_matrix_1.vec2.create());
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.PointsArray2 = PointsArray2;
|
|
71
|
+
class PointsArray3 extends PointsArray {
|
|
72
|
+
constructor(configuration = {}) {
|
|
73
|
+
super(Object.assign(Object.assign({}, configuration), { dimensions: 3 }));
|
|
74
|
+
}
|
|
75
|
+
forEach(func, point = gl_matrix_1.vec3.create()) {
|
|
76
|
+
super.forEach(func, point);
|
|
77
|
+
}
|
|
78
|
+
getPoint(index, point = gl_matrix_1.vec3.create()) {
|
|
79
|
+
if (index >= this.length) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const index2 = index * 3;
|
|
83
|
+
point[0] = this.data[index2];
|
|
84
|
+
point[1] = this.data[index2 + 1];
|
|
85
|
+
point[2] = this.data[index2 + 2];
|
|
86
|
+
return point;
|
|
87
|
+
}
|
|
88
|
+
get points() {
|
|
89
|
+
return this.map((point) => point, () => gl_matrix_1.vec3.create());
|
|
90
|
+
}
|
|
91
|
+
getXYZ() {
|
|
92
|
+
const x = [];
|
|
93
|
+
const y = [];
|
|
94
|
+
const z = [];
|
|
95
|
+
this.forEach((point) => {
|
|
96
|
+
x.push(point[0]);
|
|
97
|
+
y.push(point[1]);
|
|
98
|
+
z.push(point[2]);
|
|
99
|
+
});
|
|
100
|
+
return { x, y, z };
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.PointsArray3 = PointsArray3;
|
|
104
|
+
//# sourceMappingURL=PointsArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PointsArray.js","sourceRoot":"","sources":["../../../../src/utilities/contours/PointsArray.ts"],"names":[],"mappings":";;;AACA,yCAAuC;AAevC,MAAsB,WAAW;IAK/B,YAAY,gBAA4C,EAAE;QAH1D,eAAU,GAAG,CAAC,CAAC;QACR,WAAM,GAAG,CAAC,CAAC;QAGhB,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,aAAa,CAAC;QAC7D,IAAI,CAAC,IAAI,GAAG,IAAI,YAAY,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,G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E,EAAE,CAAC,KAAK,EAChB,GAAG,EAAE,CAAC,gBAAI,CAAC,MAAM,EAAkB,CACpC,CAAC;IACJ,CAAC;IAEM,MAAM;QACX,MAAM,CAAC,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACrB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACjB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACjB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IACrB,CAAC;CACF;AAzCD,oCAyCC"}
|
|
@@ -3,4 +3,6 @@ import mergePoints from './mergePoints';
|
|
|
3
3
|
import detectContourHoles from './detectContourHoles';
|
|
4
4
|
import { generateContourSetsFromLabelmap } from './generateContourSetsFromLabelmap';
|
|
5
5
|
import AnnotationToPointData from './AnnotationToPointData';
|
|
6
|
-
|
|
6
|
+
import acceptAutogeneratedInterpolations from './interpolation/acceptAutogeneratedInterpolations';
|
|
7
|
+
import * as interpolation from './interpolation';
|
|
8
|
+
export { contourFinder, mergePoints, detectContourHoles, generateContourSetsFromLabelmap, AnnotationToPointData, interpolation, acceptAutogeneratedInterpolations, };
|
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AnnotationToPointData = exports.generateContourSetsFromLabelmap = exports.detectContourHoles = exports.mergePoints = exports.contourFinder = void 0;
|
|
29
|
+
exports.acceptAutogeneratedInterpolations = exports.interpolation = exports.AnnotationToPointData = exports.generateContourSetsFromLabelmap = exports.detectContourHoles = exports.mergePoints = exports.contourFinder = void 0;
|
|
7
30
|
const contourFinder_1 = __importDefault(require("./contourFinder"));
|
|
8
31
|
exports.contourFinder = contourFinder_1.default;
|
|
9
32
|
const mergePoints_1 = __importDefault(require("./mergePoints"));
|
|
@@ -14,4 +37,8 @@ const generateContourSetsFromLabelmap_1 = require("./generateContourSetsFromLabe
|
|
|
14
37
|
Object.defineProperty(exports, "generateContourSetsFromLabelmap", { enumerable: true, get: function () { return generateContourSetsFromLabelmap_1.generateContourSetsFromLabelmap; } });
|
|
15
38
|
const AnnotationToPointData_1 = __importDefault(require("./AnnotationToPointData"));
|
|
16
39
|
exports.AnnotationToPointData = AnnotationToPointData_1.default;
|
|
40
|
+
const acceptAutogeneratedInterpolations_1 = __importDefault(require("./interpolation/acceptAutogeneratedInterpolations"));
|
|
41
|
+
exports.acceptAutogeneratedInterpolations = acceptAutogeneratedInterpolations_1.default;
|
|
42
|
+
const interpolation = __importStar(require("./interpolation"));
|
|
43
|
+
exports.interpolation = interpolation;
|
|
17
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/contours/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/contours/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAA4C;AAS1C,wBATK,uBAAa,CASL;AARf,gEAAwC;AAStC,sBATK,qBAAW,CASL;AARb,8EAAsD;AASpD,6BATK,4BAAkB,CASL;AARpB,uFAAoF;AASlF,gHATO,iEAA+B,OASP;AARjC,oFAA4D;AAS1D,gCATK,+BAAqB,CASL;AARvB,0HAAkG;AAUhG,4CAVK,2CAAiC,CAUL;AATnC,+DAAiD;AAQ/C,sCAAa"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AcceptInterpolationSelector } from '../../../types/InterpolationTypes';
|
|
2
|
+
import type AnnotationGroupSelector from '../../../types/AnnotationGroupSelector';
|
|
3
|
+
export default function acceptAutogeneratedInterpolations(annotationGroupSelector: AnnotationGroupSelector, selector: AcceptInterpolationSelector): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 InterpolationManager_1 = __importDefault(require("../../segmentation/InterpolationManager/InterpolationManager"));
|
|
7
|
+
function acceptAutogeneratedInterpolations(annotationGroupSelector, selector) {
|
|
8
|
+
InterpolationManager_1.default.acceptAutoGenerated(annotationGroupSelector, selector);
|
|
9
|
+
}
|
|
10
|
+
exports.default = acceptAutogeneratedInterpolations;
|
|
11
|
+
//# sourceMappingURL=acceptAutogeneratedInterpolations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptAutogeneratedInterpolations.js","sourceRoot":"","sources":["../../../../../src/utilities/contours/interpolation/acceptAutogeneratedInterpolations.ts"],"names":[],"mappings":";;;;;AAAA,wHAAgG;AAUhG,SAAwB,iCAAiC,CACvD,uBAAgD,EAChD,QAAqC;IAErC,8BAAoB,CAAC,mBAAmB,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAAC;AAC9E,CAAC;AALD,oDAKC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@cornerstonejs/core");
|
|
4
|
+
function createPolylineToolData(polyline, handlePoints, referencedToolData) {
|
|
5
|
+
const annotation = core_1.utilities.deepMerge({
|
|
6
|
+
data: {},
|
|
7
|
+
metadata: {},
|
|
8
|
+
}, referencedToolData);
|
|
9
|
+
Object.assign(annotation, {
|
|
10
|
+
highlighted: false,
|
|
11
|
+
invalidated: true,
|
|
12
|
+
autoGenerated: true,
|
|
13
|
+
annotationUID: undefined,
|
|
14
|
+
cachedStats: {},
|
|
15
|
+
});
|
|
16
|
+
Object.assign(annotation.data, {
|
|
17
|
+
handles: {
|
|
18
|
+
points: handlePoints || [],
|
|
19
|
+
activeHandleIndex: null,
|
|
20
|
+
textBox: {
|
|
21
|
+
hasMoved: false,
|
|
22
|
+
worldPosition: [0, 0, 0],
|
|
23
|
+
worldBoundingBox: {
|
|
24
|
+
topLeft: [0, 0, 0],
|
|
25
|
+
topRight: [0, 0, 0],
|
|
26
|
+
bottomLeft: [0, 0, 0],
|
|
27
|
+
bottomRight: [0, 0, 0],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
contour: {
|
|
32
|
+
polyline,
|
|
33
|
+
closed: true,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
return annotation;
|
|
37
|
+
}
|
|
38
|
+
exports.default = createPolylineToolData;
|
|
39
|
+
//# sourceMappingURL=createPolylineToolData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPolylineToolData.js","sourceRoot":"","sources":["../../../../../src/utilities/contours/interpolation/createPolylineToolData.ts"],"names":[],"mappings":";;AAAA,8CAAkE;AAclE,SAAwB,sBAAsB,CAC5C,QAAQ,EACR,YAAY,EACZ,kBAAkB;IAElB,MAAM,UAAU,GAA+B,gBAAO,CAAC,SAAS,CAC9D;QACE,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,EAAE;KACb,EACD,kBAAkB,CACnB,CAAC;IACF,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;QACxB,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,IAAI;QACjB,aAAa,EAAE,IAAI;QACnB,aAAa,EAAE,SAAS;QACxB,WAAW,EAAE,EAAE;KAChB,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE;QAC7B,OAAO,EAAE;YACP,MAAM,EAAE,YAAY,IAAI,EAAE;YAC1B,iBAAiB,EAAE,IAAI;YACvB,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,aAAa,EAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACtC,gBAAgB,EAAE;oBAChB,OAAO,EAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;oBAChC,QAAQ,EAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;oBACjC,UAAU,EAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;oBACnC,WAAW,EAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;iBACrC;aACF;SACF;QACD,OAAO,EAAE;YACP,QAAQ;YACR,MAAM,EAAE,IAAI;SACb;KACF,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC;AAzCD,yCAyCC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InterpolationViewportData, Annotation } from '../../../types';
|
|
2
|
+
export declare type ContourPair = [number, number];
|
|
3
|
+
declare function findAnnotationsForInterpolation(toolData: any, viewportData: InterpolationViewportData): {
|
|
4
|
+
interpolationData: Map<number, Annotation[]>;
|
|
5
|
+
interpolationList: any[];
|
|
6
|
+
};
|
|
7
|
+
export default findAnnotationsForInterpolation;
|