@cornerstonejs/tools 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/drawingSvg/_getHash.d.ts +1 -1
- package/dist/cjs/drawingSvg/_getHash.js +2 -2
- package/dist/cjs/drawingSvg/_getHash.js.map +1 -1
- package/dist/cjs/drawingSvg/drawArrow.d.ts +2 -0
- package/dist/cjs/drawingSvg/drawArrow.js +53 -0
- package/dist/cjs/drawingSvg/drawArrow.js.map +1 -0
- package/dist/cjs/drawingSvg/drawCircle.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawCircle.js +2 -2
- package/dist/cjs/drawingSvg/drawCircle.js.map +1 -1
- package/dist/cjs/drawingSvg/drawEllipse.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawEllipse.js +2 -2
- package/dist/cjs/drawingSvg/drawEllipse.js.map +1 -1
- package/dist/cjs/drawingSvg/drawHandles.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawHandles.js +2 -2
- package/dist/cjs/drawingSvg/drawHandles.js.map +1 -1
- package/dist/cjs/drawingSvg/drawLine.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawLine.js +2 -2
- package/dist/cjs/drawingSvg/drawLine.js.map +1 -1
- package/dist/cjs/drawingSvg/drawLink.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawLink.js +2 -2
- package/dist/cjs/drawingSvg/drawLink.js.map +1 -1
- package/dist/cjs/drawingSvg/drawLinkedTextBox.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawLinkedTextBox.js +3 -3
- package/dist/cjs/drawingSvg/drawLinkedTextBox.js.map +1 -1
- package/dist/cjs/drawingSvg/drawPolyline.d.ts +8 -0
- package/dist/cjs/drawingSvg/drawPolyline.js +50 -0
- package/dist/cjs/drawingSvg/drawPolyline.js.map +1 -0
- package/dist/cjs/drawingSvg/drawRect.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawRect.js +2 -2
- package/dist/cjs/drawingSvg/drawRect.js.map +1 -1
- package/dist/cjs/drawingSvg/drawTextBox.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawTextBox.js +4 -4
- package/dist/cjs/drawingSvg/drawTextBox.js.map +1 -1
- package/dist/cjs/drawingSvg/index.d.ts +3 -1
- package/dist/cjs/drawingSvg/index.js +5 -1
- package/dist/cjs/drawingSvg/index.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/stateManagement/annotation/config/annotationStyle.js +1 -1
- package/dist/cjs/tools/CrosshairsTool.js +12 -12
- package/dist/cjs/tools/CrosshairsTool.js.map +1 -1
- package/dist/cjs/tools/annotation/ArrowTool.d.ts +36 -0
- package/dist/cjs/tools/annotation/ArrowTool.js +403 -0
- package/dist/cjs/tools/annotation/ArrowTool.js.map +1 -0
- package/dist/cjs/tools/annotation/BidirectionalTool.js +4 -4
- package/dist/cjs/tools/annotation/BidirectionalTool.js.map +1 -1
- package/dist/cjs/tools/annotation/EllipticalROITool.js +3 -3
- package/dist/cjs/tools/annotation/EllipticalROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/LengthTool.js +4 -3
- package/dist/cjs/tools/annotation/LengthTool.js.map +1 -1
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.d.ts +32 -0
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.js +192 -0
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.js.map +1 -0
- package/dist/cjs/tools/annotation/ProbeTool.js +2 -2
- package/dist/cjs/tools/annotation/ProbeTool.js.map +1 -1
- package/dist/cjs/tools/annotation/RectangleROITool.js +3 -3
- package/dist/cjs/tools/annotation/RectangleROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +216 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js +182 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/editLoopCommon.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/editLoopCommon.js +127 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/editLoopCommon.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js +289 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEndEditLoop.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js +43 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js +99 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -0
- package/dist/cjs/tools/index.d.ts +3 -1
- package/dist/cjs/tools/index.js +5 -1
- package/dist/cjs/tools/index.js.map +1 -1
- 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/RectangleROIStartEndThresholdTool.js +2 -2
- package/dist/cjs/tools/segmentation/RectangleROIStartEndThresholdTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/RectangleROIThresholdTool.js +2 -2
- package/dist/cjs/tools/segmentation/RectangleROIThresholdTool.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/SphereScissorsTool.js +1 -1
- package/dist/cjs/tools/segmentation/SphereScissorsTool.js.map +1 -1
- package/dist/cjs/types/AnnotationTypes.d.ts +1 -0
- package/dist/cjs/types/ToolSpecificAnnotationTypes.d.ts +50 -0
- package/dist/cjs/utilities/math/index.d.ts +2 -1
- package/dist/cjs/utilities/math/index.js +3 -1
- package/dist/cjs/utilities/math/index.js.map +1 -1
- package/dist/cjs/utilities/math/polyline/addCanvasPointsToArray.d.ts +4 -0
- package/dist/cjs/utilities/math/polyline/addCanvasPointsToArray.js +36 -0
- package/dist/cjs/utilities/math/polyline/addCanvasPointsToArray.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/calculateAreaOfPoints.d.ts +2 -0
- package/dist/cjs/utilities/math/polyline/calculateAreaOfPoints.js +14 -0
- package/dist/cjs/utilities/math/polyline/calculateAreaOfPoints.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/getIntersectionWithPolyline.d.ts +7 -0
- package/dist/cjs/utilities/math/polyline/getIntersectionWithPolyline.js +110 -0
- package/dist/cjs/utilities/math/polyline/getIntersectionWithPolyline.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/getSubPixelSpacingAndXYDirections.d.ts +7 -0
- package/dist/cjs/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js +67 -0
- package/dist/cjs/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/index.d.ts +7 -0
- package/dist/cjs/utilities/math/polyline/index.js +20 -0
- package/dist/cjs/utilities/math/polyline/index.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +22 -0
- package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.js +3 -0
- package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/pointCanProjectOnLine.d.ts +3 -0
- package/dist/cjs/utilities/math/polyline/pointCanProjectOnLine.js +35 -0
- package/dist/cjs/utilities/math/polyline/pointCanProjectOnLine.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/pointsAreWithinCloseContourProximity.d.ts +3 -0
- package/dist/cjs/utilities/math/polyline/pointsAreWithinCloseContourProximity.js +8 -0
- package/dist/cjs/utilities/math/polyline/pointsAreWithinCloseContourProximity.js.map +1 -0
- package/dist/esm/drawingSvg/_getHash.d.ts +1 -1
- package/dist/esm/drawingSvg/_getHash.js +2 -2
- package/dist/esm/drawingSvg/_getHash.js.map +1 -1
- package/dist/esm/drawingSvg/drawArrow.d.ts +2 -0
- package/dist/esm/drawingSvg/drawArrow.js +47 -0
- package/dist/esm/drawingSvg/drawArrow.js.map +1 -0
- package/dist/esm/drawingSvg/drawCircle.d.ts +1 -1
- package/dist/esm/drawingSvg/drawCircle.js +2 -2
- package/dist/esm/drawingSvg/drawCircle.js.map +1 -1
- package/dist/esm/drawingSvg/drawEllipse.d.ts +1 -1
- package/dist/esm/drawingSvg/drawEllipse.js +2 -2
- package/dist/esm/drawingSvg/drawEllipse.js.map +1 -1
- package/dist/esm/drawingSvg/drawHandles.d.ts +1 -1
- package/dist/esm/drawingSvg/drawHandles.js +2 -2
- package/dist/esm/drawingSvg/drawHandles.js.map +1 -1
- package/dist/esm/drawingSvg/drawLine.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLine.js +2 -2
- package/dist/esm/drawingSvg/drawLine.js.map +1 -1
- package/dist/esm/drawingSvg/drawLink.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLink.js +2 -2
- package/dist/esm/drawingSvg/drawLink.js.map +1 -1
- package/dist/esm/drawingSvg/drawLinkedTextBox.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLinkedTextBox.js +3 -3
- package/dist/esm/drawingSvg/drawLinkedTextBox.js.map +1 -1
- package/dist/esm/drawingSvg/drawPolyline.d.ts +8 -0
- package/dist/esm/drawingSvg/drawPolyline.js +44 -0
- package/dist/esm/drawingSvg/drawPolyline.js.map +1 -0
- package/dist/esm/drawingSvg/drawRect.d.ts +1 -1
- package/dist/esm/drawingSvg/drawRect.js +2 -2
- package/dist/esm/drawingSvg/drawRect.js.map +1 -1
- package/dist/esm/drawingSvg/drawTextBox.d.ts +1 -1
- package/dist/esm/drawingSvg/drawTextBox.js +4 -4
- package/dist/esm/drawingSvg/drawTextBox.js.map +1 -1
- package/dist/esm/drawingSvg/index.d.ts +3 -1
- package/dist/esm/drawingSvg/index.js +3 -1
- package/dist/esm/drawingSvg/index.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stateManagement/annotation/config/annotationStyle.js +1 -1
- package/dist/esm/tools/CrosshairsTool.js +12 -12
- package/dist/esm/tools/CrosshairsTool.js.map +1 -1
- package/dist/esm/tools/annotation/ArrowTool.d.ts +36 -0
- package/dist/esm/tools/annotation/ArrowTool.js +379 -0
- package/dist/esm/tools/annotation/ArrowTool.js.map +1 -0
- package/dist/esm/tools/annotation/BidirectionalTool.js +4 -4
- package/dist/esm/tools/annotation/BidirectionalTool.js.map +1 -1
- package/dist/esm/tools/annotation/EllipticalROITool.js +3 -3
- package/dist/esm/tools/annotation/EllipticalROITool.js.map +1 -1
- package/dist/esm/tools/annotation/LengthTool.js +4 -3
- package/dist/esm/tools/annotation/LengthTool.js.map +1 -1
- package/dist/esm/tools/annotation/PlanarFreehandROITool.d.ts +32 -0
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js +187 -0
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js.map +1 -0
- package/dist/esm/tools/annotation/ProbeTool.js +2 -2
- package/dist/esm/tools/annotation/ProbeTool.js.map +1 -1
- package/dist/esm/tools/annotation/RectangleROITool.js +3 -3
- package/dist/esm/tools/annotation/RectangleROITool.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +211 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +177 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/editLoopCommon.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/editLoopCommon.js +125 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/editLoopCommon.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +284 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js +41 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js +97 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -0
- package/dist/esm/tools/index.d.ts +3 -1
- package/dist/esm/tools/index.js +3 -1
- package/dist/esm/tools/index.js.map +1 -1
- 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/RectangleROIStartEndThresholdTool.js +2 -2
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js.map +1 -1
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.js +2 -2
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.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/SphereScissorsTool.js +1 -1
- package/dist/esm/tools/segmentation/SphereScissorsTool.js.map +1 -1
- package/dist/esm/types/AnnotationTypes.d.ts +1 -0
- package/dist/esm/types/ToolSpecificAnnotationTypes.d.ts +50 -0
- package/dist/esm/utilities/math/index.d.ts +2 -1
- package/dist/esm/utilities/math/index.js +2 -1
- package/dist/esm/utilities/math/index.js.map +1 -1
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.d.ts +4 -0
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.js +34 -0
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.js.map +1 -0
- package/dist/esm/utilities/math/polyline/calculateAreaOfPoints.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/calculateAreaOfPoints.js +11 -0
- package/dist/esm/utilities/math/polyline/calculateAreaOfPoints.js.map +1 -0
- package/dist/esm/utilities/math/polyline/getIntersectionWithPolyline.d.ts +7 -0
- package/dist/esm/utilities/math/polyline/getIntersectionWithPolyline.js +106 -0
- package/dist/esm/utilities/math/polyline/getIntersectionWithPolyline.js.map +1 -0
- package/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.d.ts +7 -0
- package/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js +65 -0
- package/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js.map +1 -0
- package/dist/esm/utilities/math/polyline/index.d.ts +7 -0
- package/dist/esm/utilities/math/polyline/index.js +8 -0
- package/dist/esm/utilities/math/polyline/index.js.map +1 -0
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +22 -0
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.js +2 -0
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.js.map +1 -0
- package/dist/esm/utilities/math/polyline/pointCanProjectOnLine.d.ts +3 -0
- package/dist/esm/utilities/math/polyline/pointCanProjectOnLine.js +33 -0
- package/dist/esm/utilities/math/polyline/pointCanProjectOnLine.js.map +1 -0
- package/dist/esm/utilities/math/polyline/pointsAreWithinCloseContourProximity.d.ts +3 -0
- package/dist/esm/utilities/math/polyline/pointsAreWithinCloseContourProximity.js +6 -0
- package/dist/esm/utilities/math/polyline/pointsAreWithinCloseContourProximity.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getClosestIntersectionWithPolyline = exports.getFirstIntersectionWithPolyline = void 0;
|
|
4
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
5
|
+
function getFirstIntersectionWithPolyline(points, p1, q1, closed = true) {
|
|
6
|
+
let initialI;
|
|
7
|
+
let j;
|
|
8
|
+
if (closed) {
|
|
9
|
+
j = points.length - 1;
|
|
10
|
+
initialI = 0;
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
j = 0;
|
|
14
|
+
initialI = 1;
|
|
15
|
+
}
|
|
16
|
+
for (let i = initialI; i < points.length; i++) {
|
|
17
|
+
const p2 = points[j];
|
|
18
|
+
const q2 = points[i];
|
|
19
|
+
if (doesIntersect(p1, q1, p2, q2)) {
|
|
20
|
+
return [j, i];
|
|
21
|
+
}
|
|
22
|
+
j = i;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.getFirstIntersectionWithPolyline = getFirstIntersectionWithPolyline;
|
|
26
|
+
function getClosestIntersectionWithPolyline(points, p1, q1, closed = true) {
|
|
27
|
+
let initialI;
|
|
28
|
+
let j;
|
|
29
|
+
if (closed) {
|
|
30
|
+
j = points.length - 1;
|
|
31
|
+
initialI = 0;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
j = 0;
|
|
35
|
+
initialI = 1;
|
|
36
|
+
}
|
|
37
|
+
const intersections = [];
|
|
38
|
+
for (let i = initialI; i < points.length; i++) {
|
|
39
|
+
const p2 = points[j];
|
|
40
|
+
const q2 = points[i];
|
|
41
|
+
if (doesIntersect(p1, q1, p2, q2)) {
|
|
42
|
+
intersections.push([j, i]);
|
|
43
|
+
}
|
|
44
|
+
j = i;
|
|
45
|
+
}
|
|
46
|
+
if (intersections.length === 0) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const distances = [];
|
|
50
|
+
intersections.forEach((intersection) => {
|
|
51
|
+
const intersectionPoints = [
|
|
52
|
+
points[intersection[0]],
|
|
53
|
+
points[intersection[1]],
|
|
54
|
+
];
|
|
55
|
+
const midpoint = [
|
|
56
|
+
(intersectionPoints[0][0] + intersectionPoints[1][0]) / 2,
|
|
57
|
+
(intersectionPoints[0][1] + intersectionPoints[1][1]) / 2,
|
|
58
|
+
];
|
|
59
|
+
distances.push(gl_matrix_1.vec2.distance(midpoint, p1));
|
|
60
|
+
});
|
|
61
|
+
const minDistance = Math.min(...distances);
|
|
62
|
+
const indexOfMinDistance = distances.indexOf(minDistance);
|
|
63
|
+
return {
|
|
64
|
+
segment: intersections[indexOfMinDistance],
|
|
65
|
+
distance: minDistance,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.getClosestIntersectionWithPolyline = getClosestIntersectionWithPolyline;
|
|
69
|
+
function doesIntersect(p1, q1, p2, q2) {
|
|
70
|
+
let result = false;
|
|
71
|
+
const orient = [
|
|
72
|
+
orientation(p1, q1, p2),
|
|
73
|
+
orientation(p1, q1, q2),
|
|
74
|
+
orientation(p2, q2, p1),
|
|
75
|
+
orientation(p2, q2, q1),
|
|
76
|
+
];
|
|
77
|
+
if (orient[0] !== orient[1] && orient[2] !== orient[3]) {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
if (orient[0] === 0 && onSegment(p1, p2, q1)) {
|
|
81
|
+
result = true;
|
|
82
|
+
}
|
|
83
|
+
else if (orient[1] === 0 && onSegment(p1, q2, q1)) {
|
|
84
|
+
result = true;
|
|
85
|
+
}
|
|
86
|
+
else if (orient[2] === 0 && onSegment(p2, p1, q2)) {
|
|
87
|
+
result = true;
|
|
88
|
+
}
|
|
89
|
+
else if (orient[3] === 0 && onSegment(p2, q1, q2)) {
|
|
90
|
+
result = true;
|
|
91
|
+
}
|
|
92
|
+
return result;
|
|
93
|
+
}
|
|
94
|
+
function orientation(p, q, r) {
|
|
95
|
+
const orientationValue = (q[1] - p[1]) * (r[0] - q[0]) - (q[0] - p[0]) * (r[1] - q[1]);
|
|
96
|
+
if (orientationValue === 0) {
|
|
97
|
+
return 0;
|
|
98
|
+
}
|
|
99
|
+
return orientationValue > 0 ? 1 : 2;
|
|
100
|
+
}
|
|
101
|
+
function onSegment(p, q, r) {
|
|
102
|
+
if (q[0] <= Math.max(p[0], r[0]) &&
|
|
103
|
+
q[0] >= Math.min(p[0], r[0]) &&
|
|
104
|
+
q[1] <= Math.max(p[1], r[1]) &&
|
|
105
|
+
q[1] >= Math.min(p[1], r[1])) {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=getIntersectionWithPolyline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIntersectionWithPolyline.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/getIntersectionWithPolyline.ts"],"names":[],"mappings":";;;AAAA,yCAAiC;AAYjC,SAAS,gCAAgC,CACvC,MAAsB,EACtB,EAAgB,EAChB,EAAgB,EAChB,MAAM,GAAG,IAAI;IAEb,IAAI,QAAQ,CAAC;IACb,IAAI,CAAC,CAAC;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CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhE,IAAI,gBAAgB,KAAK,CAAC,EAAE;QAC1B,OAAO,CAAC,CAAC;KACV;IAED,OAAO,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtC,CAAC;AAKD,SAAS,SAAS,CAAC,CAAe,EAAE,CAAe,EAAE,CAAe;IAClE,IACE,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAC5B;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
declare const getSubPixelSpacingAndXYDirections: (viewport: Types.IStackViewport | Types.IVolumeViewport, subPixelResolution: number) => {
|
|
3
|
+
spacing: Types.Point2;
|
|
4
|
+
xDir: Types.Point3;
|
|
5
|
+
yDir: Types.Point3;
|
|
6
|
+
};
|
|
7
|
+
export default getSubPixelSpacingAndXYDirections;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@cornerstonejs/core");
|
|
4
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
5
|
+
const EPSILON = 1e-3;
|
|
6
|
+
const getSubPixelSpacingAndXYDirections = (viewport, subPixelResolution) => {
|
|
7
|
+
let spacing;
|
|
8
|
+
let xDir;
|
|
9
|
+
let yDir;
|
|
10
|
+
if (viewport instanceof core_1.StackViewport) {
|
|
11
|
+
const imageData = viewport.getImageData();
|
|
12
|
+
xDir = imageData.direction.slice(0, 3);
|
|
13
|
+
yDir = imageData.direction.slice(3, 6);
|
|
14
|
+
spacing = imageData.spacing;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
const imageData = viewport.getImageData();
|
|
18
|
+
const { direction, spacing: volumeSpacing } = imageData;
|
|
19
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
20
|
+
const iVector = direction.slice(0, 3);
|
|
21
|
+
const jVector = direction.slice(3, 6);
|
|
22
|
+
const kVector = direction.slice(6, 9);
|
|
23
|
+
let viewRight = gl_matrix_1.vec3.create();
|
|
24
|
+
gl_matrix_1.vec3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
25
|
+
viewRight = [-viewRight[0], -viewRight[1], -viewRight[2]];
|
|
26
|
+
let xSpacing;
|
|
27
|
+
if (Math.abs(1 - gl_matrix_1.vec3.dot(viewRight, iVector)) < EPSILON) {
|
|
28
|
+
xSpacing = volumeSpacing[0];
|
|
29
|
+
xDir = iVector;
|
|
30
|
+
}
|
|
31
|
+
else if (Math.abs(1 - gl_matrix_1.vec3.dot(viewRight, jVector)) < EPSILON) {
|
|
32
|
+
xSpacing = volumeSpacing[1];
|
|
33
|
+
xDir = jVector;
|
|
34
|
+
}
|
|
35
|
+
else if (Math.abs(1 - gl_matrix_1.vec3.dot(viewRight, kVector)) < EPSILON) {
|
|
36
|
+
xSpacing = volumeSpacing[2];
|
|
37
|
+
xDir = kVector;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
throw new Error('No support yet for oblique plane planar contours');
|
|
41
|
+
}
|
|
42
|
+
let ySpacing;
|
|
43
|
+
if (Math.abs(1 - gl_matrix_1.vec3.dot(viewPlaneNormal, iVector)) < EPSILON) {
|
|
44
|
+
ySpacing = volumeSpacing[0];
|
|
45
|
+
yDir = iVector;
|
|
46
|
+
}
|
|
47
|
+
else if (Math.abs(1 - gl_matrix_1.vec3.dot(viewPlaneNormal, jVector)) < EPSILON) {
|
|
48
|
+
ySpacing = volumeSpacing[1];
|
|
49
|
+
yDir = jVector;
|
|
50
|
+
}
|
|
51
|
+
else if (Math.abs(1 - gl_matrix_1.vec3.dot(viewPlaneNormal, kVector)) < EPSILON) {
|
|
52
|
+
ySpacing = volumeSpacing[2];
|
|
53
|
+
yDir = kVector;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
throw new Error('No support yet for oblique plane planar contours');
|
|
57
|
+
}
|
|
58
|
+
spacing = [xSpacing, ySpacing];
|
|
59
|
+
}
|
|
60
|
+
const subPixelSpacing = [
|
|
61
|
+
spacing[0] / subPixelResolution,
|
|
62
|
+
spacing[1] / subPixelResolution,
|
|
63
|
+
];
|
|
64
|
+
return { spacing: subPixelSpacing, xDir, yDir };
|
|
65
|
+
};
|
|
66
|
+
exports.default = getSubPixelSpacingAndXYDirections;
|
|
67
|
+
//# sourceMappingURL=getSubPixelSpacingAndXYDirections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSubPixelSpacingAndXYDirections.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/getSubPixelSpacingAndXYDirections.ts"],"names":[],"mappings":";;AAAA,8CAAoD;AAEpD,yCAAiC;AAEjC,MAAM,OAAO,GAAG,IAAI,CAAC;AAcrB,MAAM,iCAAiC,GAAG,CACxC,QAAsD,EACtD,kBAA0B,EACyC,EAAE;IACrE,IAAI,OAAO,CAAC;IACZ,IAAI,IAAI,CAAC;IACT,IAAI,IAAI,C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;QAED,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;KAChC;IAED,MAAM,eAAe,GAAiB;QACpC,OAAO,CAAC,CAAC,CAAC,GAAG,kBAAkB;QAC/B,OAAO,CAAC,CAAC,CAAC,GAAG,kBAAkB;KAChC,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAClD,CAAC,CAAC;AAEF,kBAAe,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getFirstIntersectionWithPolyline, getClosestIntersectionWithPolyline } from './getIntersectionWithPolyline';
|
|
2
|
+
import getSubPixelSpacingAndXYDirections from './getSubPixelSpacingAndXYDirections';
|
|
3
|
+
import pointsAreWithinCloseContourProximity from './pointsAreWithinCloseContourProximity';
|
|
4
|
+
import addCanvasPointsToArray from './addCanvasPointsToArray';
|
|
5
|
+
import pointCanProjectOnLine from './pointCanProjectOnLine';
|
|
6
|
+
import calculateAreaOfPoints from './calculateAreaOfPoints';
|
|
7
|
+
export { getFirstIntersectionWithPolyline, getClosestIntersectionWithPolyline, getSubPixelSpacingAndXYDirections, pointsAreWithinCloseContourProximity, addCanvasPointsToArray, pointCanProjectOnLine, calculateAreaOfPoints, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.calculateAreaOfPoints = exports.pointCanProjectOnLine = exports.addCanvasPointsToArray = exports.pointsAreWithinCloseContourProximity = exports.getSubPixelSpacingAndXYDirections = exports.getClosestIntersectionWithPolyline = exports.getFirstIntersectionWithPolyline = void 0;
|
|
7
|
+
const getIntersectionWithPolyline_1 = require("./getIntersectionWithPolyline");
|
|
8
|
+
Object.defineProperty(exports, "getFirstIntersectionWithPolyline", { enumerable: true, get: function () { return getIntersectionWithPolyline_1.getFirstIntersectionWithPolyline; } });
|
|
9
|
+
Object.defineProperty(exports, "getClosestIntersectionWithPolyline", { enumerable: true, get: function () { return getIntersectionWithPolyline_1.getClosestIntersectionWithPolyline; } });
|
|
10
|
+
const getSubPixelSpacingAndXYDirections_1 = __importDefault(require("./getSubPixelSpacingAndXYDirections"));
|
|
11
|
+
exports.getSubPixelSpacingAndXYDirections = getSubPixelSpacingAndXYDirections_1.default;
|
|
12
|
+
const pointsAreWithinCloseContourProximity_1 = __importDefault(require("./pointsAreWithinCloseContourProximity"));
|
|
13
|
+
exports.pointsAreWithinCloseContourProximity = pointsAreWithinCloseContourProximity_1.default;
|
|
14
|
+
const addCanvasPointsToArray_1 = __importDefault(require("./addCanvasPointsToArray"));
|
|
15
|
+
exports.addCanvasPointsToArray = addCanvasPointsToArray_1.default;
|
|
16
|
+
const pointCanProjectOnLine_1 = __importDefault(require("./pointCanProjectOnLine"));
|
|
17
|
+
exports.pointCanProjectOnLine = pointCanProjectOnLine_1.default;
|
|
18
|
+
const calculateAreaOfPoints_1 = __importDefault(require("./calculateAreaOfPoints"));
|
|
19
|
+
exports.calculateAreaOfPoints = calculateAreaOfPoints_1.default;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/index.ts"],"names":[],"mappings":";;;;;;AAAA,+EAGuC;AAQrC,iHAVA,8DAAgC,OAUA;AAChC,mHAVA,gEAAkC,OAUA;AARpC,4GAAoF;AASlF,4CATK,2CAAiC,CASL;AARnC,kHAA0F;AASxF,+CATK,8CAAoC,CASL;AARtC,sFAA8D;AAS5D,iCATK,gCAAsB,CASL;AARxB,oFAA4D;AAS1D,gCATK,+BAAqB,CASL;AARvB,oFAA4D;AAS1D,gCATK,+BAAqB,CASL"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { PlanarFreehandROIAnnotation } from '../../../types/ToolSpecificAnnotationTypes';
|
|
3
|
+
declare type PlanarFreehandROIDrawData = {
|
|
4
|
+
polylineIndex: number;
|
|
5
|
+
canvasPoints: Types.Point2[];
|
|
6
|
+
};
|
|
7
|
+
declare type PlanarFreehandROIEditData = {
|
|
8
|
+
prevCanvasPoints: Types.Point2[];
|
|
9
|
+
editCanvasPoints: Types.Point2[];
|
|
10
|
+
fusedCanvasPoints: Types.Point2[];
|
|
11
|
+
startCrossingIndex?: Types.Point2;
|
|
12
|
+
editIndex: number;
|
|
13
|
+
snapIndex?: number;
|
|
14
|
+
};
|
|
15
|
+
declare type PlanarFreehandROICommonData = {
|
|
16
|
+
annotation: PlanarFreehandROIAnnotation;
|
|
17
|
+
viewportIdsToRender: string[];
|
|
18
|
+
spacing: Types.Point2;
|
|
19
|
+
xDir: Types.Point3;
|
|
20
|
+
yDir: Types.Point3;
|
|
21
|
+
};
|
|
22
|
+
export { PlanarFreehandROIDrawData, PlanarFreehandROIEditData, PlanarFreehandROICommonData, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planarFreehandROIInternalTypes.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/planarFreehandROIInternalTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
4
|
+
const pointCanProjectOnLine = (p, p1, p2, proximity) => {
|
|
5
|
+
const p1p = [p[0] - p1[0], p[1] - p1[1]];
|
|
6
|
+
const p1p2 = [p2[0] - p1[0], p2[1] - p1[1]];
|
|
7
|
+
const dot = p1p[0] * p1p2[0] + p1p[1] * p1p2[1];
|
|
8
|
+
if (dot < 0) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
const p1p2Mag = Math.sqrt(p1p2[0] * p1p2[0] + p1p2[1] * p1p2[1]);
|
|
12
|
+
if (p1p2Mag === 0) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
const projectionVectorMag = dot / p1p2Mag;
|
|
16
|
+
const p1p2UnitVector = [p1p2[0] / p1p2Mag, p1p2[1] / p1p2Mag];
|
|
17
|
+
const projectionVector = [
|
|
18
|
+
p1p2UnitVector[0] * projectionVectorMag,
|
|
19
|
+
p1p2UnitVector[1] * projectionVectorMag,
|
|
20
|
+
];
|
|
21
|
+
const projectionPoint = [
|
|
22
|
+
p1[0] + projectionVector[0],
|
|
23
|
+
p1[1] + projectionVector[1],
|
|
24
|
+
];
|
|
25
|
+
const distance = gl_matrix_1.vec2.distance(p, projectionPoint);
|
|
26
|
+
if (distance > proximity) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
if (gl_matrix_1.vec2.distance(p1, projectionPoint) > gl_matrix_1.vec2.distance(p1, p2)) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
};
|
|
34
|
+
exports.default = pointCanProjectOnLine;
|
|
35
|
+
//# sourceMappingURL=pointCanProjectOnLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointCanProjectOnLine.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/pointCanProjectOnLine.ts"],"names":[],"mappings":";;AACA,yCAAiC;AAMjC,MAAM,qBAAqB,GAAG,CAC5B,CAAe,EACf,EAAgB,EAChB,EAAgB,EAChB,SAAiB,EACR,EAAE;IAEX,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,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Q,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;QAC9D,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,kBAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
4
|
+
const pointsAreWithinCloseContourProximity = (p1, p2, closeContourProximity) => {
|
|
5
|
+
return gl_matrix_1.vec2.dist(p1, p2) < closeContourProximity;
|
|
6
|
+
};
|
|
7
|
+
exports.default = pointsAreWithinCloseContourProximity;
|
|
8
|
+
//# sourceMappingURL=pointsAreWithinCloseContourProximity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointsAreWithinCloseContourProximity.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/pointsAreWithinCloseContourProximity.ts"],"names":[],"mappings":";;AAAA,yCAAiC;AAMjC,MAAM,oCAAoC,GAAG,CAC3C,EAAgB,EAChB,EAAgB,EAChB,qBAA6B,EACpB,EAAE;IACX,OAAO,gBAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,qBAAqB,CAAC;AACnD,CAAC,CAAC;AAEF,kBAAe,oCAAoC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function _getHash(
|
|
1
|
+
declare function _getHash(annotationUID: string, drawingElementType: string, nodeUID: string): string;
|
|
2
2
|
export default _getHash;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _getHash(
|
|
2
|
-
return `${
|
|
1
|
+
function _getHash(annotationUID, drawingElementType, nodeUID) {
|
|
2
|
+
return `${annotationUID}::${drawingElementType}::${nodeUID}`;
|
|
3
3
|
}
|
|
4
4
|
export default _getHash;
|
|
5
5
|
//# sourceMappingURL=_getHash.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_getHash.js","sourceRoot":"","sources":["../../../src/drawingSvg/_getHash.ts"],"names":[],"mappings":"AAAA,SAAS,QAAQ,CACf,
|
|
1
|
+
{"version":3,"file":"_getHash.js","sourceRoot":"","sources":["../../../src/drawingSvg/_getHash.ts"],"names":[],"mappings":"AAAA,SAAS,QAAQ,CACf,aAAqB,EACrB,kBAA0B,EAC1B,OAAe;IAEf,OAAO,GAAG,aAAa,KAAK,kBAAkB,KAAK,OAAO,EAAE,CAAC;AAC/D,CAAC;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import drawLine from './drawLine';
|
|
2
|
+
export default function drawArrow(svgDrawingHelper, annotationUID, arrowUID, start, end, options = {}) {
|
|
3
|
+
if (isNaN(start[0]) || isNaN(start[1]) || isNaN(end[0]) || isNaN(end[1])) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
const { color, width, lineWidth, lineDash } = Object.assign({
|
|
7
|
+
color: 'dodgerblue',
|
|
8
|
+
width: '2',
|
|
9
|
+
lineWidth: undefined,
|
|
10
|
+
lineDash: undefined,
|
|
11
|
+
}, options);
|
|
12
|
+
drawLine(svgDrawingHelper, annotationUID, arrowUID, start, end, {
|
|
13
|
+
color,
|
|
14
|
+
width,
|
|
15
|
+
lineWidth,
|
|
16
|
+
lineDash,
|
|
17
|
+
});
|
|
18
|
+
const headLength = 10;
|
|
19
|
+
const angle = Math.atan2(end[1] - start[1], end[0] - start[0]);
|
|
20
|
+
const firstLine = {
|
|
21
|
+
start: [
|
|
22
|
+
end[0] - headLength * Math.cos(angle - Math.PI / 7),
|
|
23
|
+
end[1] - headLength * Math.sin(angle - Math.PI / 7),
|
|
24
|
+
],
|
|
25
|
+
end: end,
|
|
26
|
+
};
|
|
27
|
+
const secondLine = {
|
|
28
|
+
start: [
|
|
29
|
+
end[0] - headLength * Math.cos(angle + Math.PI / 7),
|
|
30
|
+
end[1] - headLength * Math.sin(angle + Math.PI / 7),
|
|
31
|
+
],
|
|
32
|
+
end: end,
|
|
33
|
+
};
|
|
34
|
+
drawLine(svgDrawingHelper, annotationUID, '2', firstLine.start, firstLine.end, {
|
|
35
|
+
color,
|
|
36
|
+
width,
|
|
37
|
+
lineWidth,
|
|
38
|
+
lineDash,
|
|
39
|
+
});
|
|
40
|
+
drawLine(svgDrawingHelper, annotationUID, '3', secondLine.start, secondLine.end, {
|
|
41
|
+
color,
|
|
42
|
+
width,
|
|
43
|
+
lineWidth,
|
|
44
|
+
lineDash,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=drawArrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawArrow.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawArrow.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,gBAAqB,EACrB,aAAqB,EACrB,QAAgB,EAChB,KAAmB,EACnB,GAAiB,EACjB,OAAO,GAAG,EAAE;IAGZ,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;QACxE,OAAO;KACR;IAED,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,MAAM,CACzD;QACE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAE,SAAS;KACpB,EACD,OAAO,CACR,CAAC;IAGF,QAAQ,CAAC,gBAAgB,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;QAC9D,KAAK;QACL,KAAK;QACL,SAAS;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,3 +1,3 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
declare function drawCircle(svgDrawingHelper: any,
|
|
2
|
+
declare function drawCircle(svgDrawingHelper: any, annotationUID: string, circleUID: string, center: Types.Point2, radius: number, options?: {}): void;
|
|
3
3
|
export default drawCircle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _getHash from './_getHash';
|
|
2
2
|
import _setAttributesIfNecessary from './_setAttributesIfNecessary';
|
|
3
3
|
import _setNewAttributesIfValid from './_setNewAttributesIfValid';
|
|
4
|
-
function drawCircle(svgDrawingHelper,
|
|
4
|
+
function drawCircle(svgDrawingHelper, annotationUID, circleUID, center, radius, options = {}) {
|
|
5
5
|
const { color, fill, width, lineWidth } = Object.assign({
|
|
6
6
|
color: 'dodgerblue',
|
|
7
7
|
fill: 'transparent',
|
|
@@ -10,7 +10,7 @@ function drawCircle(svgDrawingHelper, toolName, annotationUID, circleUID, center
|
|
|
10
10
|
}, options);
|
|
11
11
|
const strokeWidth = lineWidth || width;
|
|
12
12
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
13
|
-
const svgNodeHash = _getHash(
|
|
13
|
+
const svgNodeHash = _getHash(annotationUID, 'circle', circleUID);
|
|
14
14
|
const existingCircleElement = svgDrawingHelper._getSvgNode(svgNodeHash);
|
|
15
15
|
const attributes = {
|
|
16
16
|
cx: `${center[0]}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawCircle.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawCircle.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AACpE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,SAAS,UAAU,CACjB,gBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"drawCircle.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawCircle.ts"],"names":[],"mappings":"AAEA,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,gBAAgB,EAAE,WAAW,CAAC,CAAC;KAC7D;AACH,CAAC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
declare function drawEllipse(svgDrawingHelper: any,
|
|
2
|
+
declare function drawEllipse(svgDrawingHelper: any, annotationUID: string, ellipseUID: string, corner1: Types.Point2, corner2: Types.Point2, options?: {}): void;
|
|
3
3
|
export default drawEllipse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _getHash from './_getHash';
|
|
2
2
|
import _setAttributesIfNecessary from './_setAttributesIfNecessary';
|
|
3
3
|
import _setNewAttributesIfValid from './_setNewAttributesIfValid';
|
|
4
|
-
function drawEllipse(svgDrawingHelper,
|
|
4
|
+
function drawEllipse(svgDrawingHelper, annotationUID, ellipseUID, corner1, corner2, options = {}) {
|
|
5
5
|
const { color, width, lineWidth, lineDash } = Object.assign({
|
|
6
6
|
color: 'dodgerblue',
|
|
7
7
|
width: '2',
|
|
@@ -10,7 +10,7 @@ function drawEllipse(svgDrawingHelper, toolName, annotationUID, ellipseUID, corn
|
|
|
10
10
|
}, options);
|
|
11
11
|
const strokeWidth = lineWidth || width;
|
|
12
12
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
13
|
-
const svgNodeHash = _getHash(
|
|
13
|
+
const svgNodeHash = _getHash(annotationUID, 'ellipse', ellipseUID);
|
|
14
14
|
const existingEllipse = svgDrawingHelper._getSvgNode(svgNodeHash);
|
|
15
15
|
const w = Math.abs(corner1[0] - corner2[0]);
|
|
16
16
|
const h = Math.abs(corner1[1] - corner2[1]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawEllipse.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawEllipse.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AACpE,OAAO,wBAAwB,M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OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IACtB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IAEtB,MAAM,UAAU,GAAG;QACjB,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE;QAClB,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE;QAClB,EAAE,EAAE,GAAG,OAAO,EAAE;QAChB,EAAE,EAAE,GAAG,OAAO,EAAE;QAChB,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,aAAa;QACnB,cAAc,EAAE,WAAW;QAC3B,kBAAkB,EAAE,QAAQ;KAC7B,CAAC;IAEF,IAAI,eAAe,EAAE;QACnB,yBAAyB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;QAEvD,gBAAgB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;KAC/C;SAAM;QACL,MAAM,iBAAiB,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAErE,wBAAwB,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;QAExD,gBAAgB,CAAC,WAAW,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;KAC9D;AACH,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
declare function drawHandles(svgDrawingHelper: any,
|
|
2
|
+
declare function drawHandles(svgDrawingHelper: any, annotationUID: string, handleGroupUID: string, handlePoints: Array<Types.Point2>, options?: {}): void;
|
|
3
3
|
export default drawHandles;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _getHash from './_getHash';
|
|
2
2
|
import _setNewAttributesIfValid from './_setNewAttributesIfValid';
|
|
3
3
|
import _setAttributesIfNecessary from './_setAttributesIfNecessary';
|
|
4
|
-
function drawHandles(svgDrawingHelper,
|
|
4
|
+
function drawHandles(svgDrawingHelper, annotationUID, handleGroupUID, handlePoints, options = {}) {
|
|
5
5
|
const { color, handleRadius, width, lineWidth, fill, type } = Object.assign({
|
|
6
6
|
color: 'dodgerblue',
|
|
7
7
|
handleRadius: '6',
|
|
@@ -14,7 +14,7 @@ function drawHandles(svgDrawingHelper, toolName, annotationUID, handleGroupUID,
|
|
|
14
14
|
for (let i = 0; i < handlePoints.length; i++) {
|
|
15
15
|
const handle = handlePoints[i];
|
|
16
16
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
17
|
-
const svgNodeHash = _getHash(
|
|
17
|
+
const svgNodeHash = _getHash(annotationUID, 'handle', `hg-${handleGroupUID}-index-${i}`);
|
|
18
18
|
let attributes;
|
|
19
19
|
if (type === 'circle') {
|
|
20
20
|
attributes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawHandles.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawHandles.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,SAAS,WAAW,CAClB,gBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"drawHandles.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawHandles.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,SAAS,WAAW,CAClB,gBAAqB,EACrB,aAAqB,EACrB,cAAsB,EACtB,YAAiC,EACjC,OAAO,GAAG,EAAE;IAEZ,MAAM,E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G;gBACX,CAAC,EAAE,GAAG,CAAC,EAAE;gBACT,CAAC,EAAE,GAAG,CAAC,EAAE;gBACT,KAAK,EAAE,GAAG,IAAI,EAAE;gBAChB,MAAM,EAAE,GAAG,IAAI,EAAE;gBACjB,MAAM,EAAE,KAAK;gBACb,IAAI;gBACJ,cAAc,EAAE,WAAW;gBAC3B,EAAE,EAAE,GAAG,IAAI,GAAG,GAAG,EAAE;aACpB,CAAC;SACH;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC;SACrD;QAED,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAExE,IAAI,qBAAqB,EAAE;YACzB,yBAAyB,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;YAE7D,gBAAgB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;SAC/C;aAAM;YACL,MAAM,gBAAgB,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAE/D,wBAAwB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;YAEvD,gBAAgB,CAAC,WAAW,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;SAC7D;KACF;AACH,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
export default function drawLine(svgDrawingHelper: any,
|
|
2
|
+
export default function drawLine(svgDrawingHelper: any, annotationUID: string, lineUID: string, start: Types.Point2, end: Types.Point2, options?: {}): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _getHash from './_getHash';
|
|
2
2
|
import _setNewAttributesIfValid from './_setNewAttributesIfValid';
|
|
3
3
|
import _setAttributesIfNecessary from './_setAttributesIfNecessary';
|
|
4
|
-
export default function drawLine(svgDrawingHelper,
|
|
4
|
+
export default function drawLine(svgDrawingHelper, annotationUID, lineUID, start, end, options = {}) {
|
|
5
5
|
if (isNaN(start[0]) || isNaN(start[1]) || isNaN(end[0]) || isNaN(end[1])) {
|
|
6
6
|
return;
|
|
7
7
|
}
|
|
@@ -13,7 +13,7 @@ export default function drawLine(svgDrawingHelper, toolName, annotationUID, line
|
|
|
13
13
|
}, options);
|
|
14
14
|
const strokeWidth = lineWidth || width;
|
|
15
15
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
16
|
-
const svgNodeHash = _getHash(
|
|
16
|
+
const svgNodeHash = _getHash(annotationUID, 'line', lineUID);
|
|
17
17
|
const existingLine = svgDrawingHelper._getSvgNode(svgNodeHash);
|
|
18
18
|
const attributes = {
|
|
19
19
|
x1: `${start[0]}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawLine.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLine.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,gBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"drawLine.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLine.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,gBAAqB,EACrB,aAAqB,EACrB,OAAe,EACf,KAAmB,EACnB,GAAiB,EACjB,OAAO,GAAG,EAAE;IAGZ,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC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type { Types } from '@cornerstonejs/core';
|
|
2
2
|
import { PlanarBoundingBox } from '../types';
|
|
3
|
-
declare function drawLink(svgDrawingHelper: Record<string, unknown>,
|
|
3
|
+
declare function drawLink(svgDrawingHelper: Record<string, unknown>, annotationUID: string, linkUID: string, annotationAnchorPoints: Array<Types.Point2>, refPoint: Types.Point2, boundingBox: PlanarBoundingBox, options?: {}): void;
|
|
4
4
|
export default drawLink;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import drawLine from './drawLine';
|
|
2
2
|
import findClosestPoint from '../utilities/math/vec2/findClosestPoint';
|
|
3
|
-
function drawLink(svgDrawingHelper,
|
|
3
|
+
function drawLink(svgDrawingHelper, annotationUID, linkUID, annotationAnchorPoints, refPoint, boundingBox, options = {}) {
|
|
4
4
|
const start = annotationAnchorPoints.length > 0
|
|
5
5
|
? findClosestPoint(annotationAnchorPoints, refPoint)
|
|
6
6
|
: refPoint;
|
|
@@ -11,7 +11,7 @@ function drawLink(svgDrawingHelper, toolName, annotationUID, linkUID, annotation
|
|
|
11
11
|
lineWidth: '1',
|
|
12
12
|
lineDash: '2,3',
|
|
13
13
|
}, options);
|
|
14
|
-
drawLine(svgDrawingHelper,
|
|
14
|
+
drawLine(svgDrawingHelper, annotationUID, `link-${linkUID}`, start, end, mergedOptions);
|
|
15
15
|
}
|
|
16
16
|
function _boundingBoxPoints(boundingBox) {
|
|
17
17
|
const { x: left, y: top, height, width } = boundingBox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawLink.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLink.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AAMvE,SAAS,QAAQ,CACf,gBAAyC,EACzC,
|
|
1
|
+
{"version":3,"file":"drawLink.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLink.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MA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,CAAC,IAAI,GAAG,KAAK,EAAE,GAAG,GAAG,UAAU,CAAiB,CAAC;IAErE,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;AAC5D,CAAC;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
declare function drawLinkedTextBox(svgDrawingHelper: Record<string, unknown>,
|
|
2
|
+
declare function drawLinkedTextBox(svgDrawingHelper: Record<string, unknown>, annotationUID: string, textBoxUID: string, textLines: Array<string>, textBoxPosition: Types.Point2, annotationAnchorPoints: Array<Types.Point2>, textBox: unknown, options?: {}): SVGRect;
|
|
3
3
|
export default drawLinkedTextBox;
|