@cornerstonejs/tools 1.74.6 → 1.74.8
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/tools/CrosshairsTool.js +11 -3
- package/dist/cjs/tools/CrosshairsTool.js.map +1 -1
- package/dist/cjs/tools/annotation/AngleTool.js +2 -7
- package/dist/cjs/tools/annotation/AngleTool.js.map +1 -1
- package/dist/cjs/tools/annotation/ArrowAnnotateTool.js +2 -7
- package/dist/cjs/tools/annotation/ArrowAnnotateTool.js.map +1 -1
- package/dist/cjs/tools/annotation/BidirectionalTool.js +2 -7
- package/dist/cjs/tools/annotation/BidirectionalTool.js.map +1 -1
- package/dist/cjs/tools/annotation/CircleROITool.js +2 -7
- package/dist/cjs/tools/annotation/CircleROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/CobbAngleTool.js +2 -7
- package/dist/cjs/tools/annotation/CobbAngleTool.js.map +1 -1
- package/dist/cjs/tools/annotation/EllipticalROITool.js +2 -7
- package/dist/cjs/tools/annotation/EllipticalROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/RectangleROITool.js +2 -7
- package/dist/cjs/tools/annotation/RectangleROITool.js.map +1 -1
- package/dist/esm/tools/CrosshairsTool.js +11 -3
- package/dist/esm/tools/CrosshairsTool.js.map +1 -1
- package/dist/esm/tools/annotation/AngleTool.js +1 -0
- package/dist/esm/tools/annotation/AngleTool.js.map +1 -1
- package/dist/esm/tools/annotation/ArrowAnnotateTool.js +1 -0
- package/dist/esm/tools/annotation/ArrowAnnotateTool.js.map +1 -1
- package/dist/esm/tools/annotation/BidirectionalTool.js +1 -0
- package/dist/esm/tools/annotation/BidirectionalTool.js.map +1 -1
- package/dist/esm/tools/annotation/CircleROITool.js +1 -0
- package/dist/esm/tools/annotation/CircleROITool.js.map +1 -1
- package/dist/esm/tools/annotation/CobbAngleTool.js +1 -0
- package/dist/esm/tools/annotation/CobbAngleTool.js.map +1 -1
- package/dist/esm/tools/annotation/EllipticalROITool.js +1 -0
- package/dist/esm/tools/annotation/EllipticalROITool.js.map +1 -1
- package/dist/esm/tools/annotation/RectangleROITool.js +1 -0
- package/dist/esm/tools/annotation/RectangleROITool.js.map +1 -1
- package/dist/types/tools/CrosshairsTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/AngleTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/ArrowAnnotateTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/BidirectionalTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/CircleROITool.d.ts.map +1 -1
- package/dist/types/tools/annotation/CobbAngleTool.d.ts.map +1 -1
- package/dist/types/tools/annotation/EllipticalROITool.d.ts.map +1 -1
- package/dist/types/tools/annotation/RectangleROITool.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/tools/CrosshairsTool.ts +17 -7
- package/src/tools/annotation/AngleTool.ts +1 -0
- package/src/tools/annotation/ArrowAnnotateTool.ts +1 -0
- package/src/tools/annotation/BidirectionalTool.ts +1 -0
- package/src/tools/annotation/CircleROITool.ts +1 -0
- package/src/tools/annotation/CobbAngleTool.ts +1 -0
- package/src/tools/annotation/EllipticalROITool.ts +1 -0
- package/src/tools/annotation/RectangleROITool.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.74.
|
|
3
|
+
"version": "1.74.8",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@cornerstonejs/core": "^1.74.
|
|
32
|
+
"@cornerstonejs/core": "^1.74.8",
|
|
33
33
|
"@icr/polyseg-wasm": "0.4.0",
|
|
34
34
|
"@types/offscreencanvas": "2019.7.3",
|
|
35
35
|
"comlink": "^4.4.1",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"type": "individual",
|
|
60
60
|
"url": "https://ohif.org/donate"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "59613a470e3cc14e77a318a40b8b517445dbf040"
|
|
63
63
|
}
|
|
@@ -143,6 +143,12 @@ class CrosshairsTool extends AnnotationTool {
|
|
|
143
143
|
// renders a colored circle on top right of the viewports whose color
|
|
144
144
|
// matches the color of the reference line
|
|
145
145
|
viewportIndicators: true,
|
|
146
|
+
|
|
147
|
+
viewportIndicatorsConfig: {
|
|
148
|
+
radius: 5,
|
|
149
|
+
x: null,
|
|
150
|
+
y: null,
|
|
151
|
+
},
|
|
146
152
|
// Auto pan is a configuration which will update pan
|
|
147
153
|
// other viewports in the toolGroup if the center of the crosshairs
|
|
148
154
|
// is outside of the viewport. This might be useful for the case
|
|
@@ -1449,20 +1455,24 @@ class CrosshairsTool extends AnnotationTool {
|
|
|
1449
1455
|
data.handles.slabThicknessPoints = newStpoints;
|
|
1450
1456
|
|
|
1451
1457
|
if (this.configuration.viewportIndicators) {
|
|
1452
|
-
|
|
1453
|
-
|
|
1458
|
+
const { viewportIndicatorsConfig } = this.configuration;
|
|
1459
|
+
|
|
1460
|
+
const xOffset = viewportIndicatorsConfig?.xOffset || 0.95;
|
|
1461
|
+
const yOffset = viewportIndicatorsConfig?.yOffset || 0.05;
|
|
1454
1462
|
const referenceColorCoordinates = [
|
|
1455
|
-
clientWidth *
|
|
1456
|
-
clientHeight *
|
|
1457
|
-
]
|
|
1458
|
-
|
|
1463
|
+
clientWidth * xOffset,
|
|
1464
|
+
clientHeight * yOffset,
|
|
1465
|
+
];
|
|
1466
|
+
|
|
1467
|
+
const circleRadius =
|
|
1468
|
+
viewportIndicatorsConfig?.circleRadius || canvasDiagonalLength * 0.01;
|
|
1459
1469
|
|
|
1460
1470
|
const circleUID = '0';
|
|
1461
1471
|
drawCircleSvg(
|
|
1462
1472
|
svgDrawingHelper,
|
|
1463
1473
|
annotationUID,
|
|
1464
1474
|
circleUID,
|
|
1465
|
-
referenceColorCoordinates,
|
|
1475
|
+
referenceColorCoordinates as Types.Point2,
|
|
1466
1476
|
circleRadius,
|
|
1467
1477
|
{ color, fill: color }
|
|
1468
1478
|
);
|