@cornerstonejs/tools 1.48.1 → 1.48.2
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/annotation/SplineROITool.js +19 -15
- package/dist/cjs/tools/annotation/SplineROITool.js.map +1 -1
- package/dist/esm/tools/annotation/SplineROITool.js +6 -2
- package/dist/esm/tools/annotation/SplineROITool.js.map +1 -1
- package/dist/types/tools/annotation/SplineROITool.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/annotation/SplineROITool.ts +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.48.
|
|
3
|
+
"version": "1.48.2",
|
|
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.48.
|
|
32
|
+
"@cornerstonejs/core": "^1.48.2",
|
|
33
33
|
"comlink": "^4.4.1",
|
|
34
34
|
"lodash.clonedeep": "4.5.0",
|
|
35
35
|
"lodash.get": "^4.4.2"
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"type": "individual",
|
|
54
54
|
"url": "https://ohif.org/donate"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "7573fab26ab98bd17c71c1318a777db3d0783bff"
|
|
57
57
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { utilities } from '@cornerstonejs/core';
|
|
2
1
|
import {
|
|
3
2
|
getEnabledElement,
|
|
4
3
|
eventTarget,
|
|
5
4
|
triggerEvent,
|
|
5
|
+
utilities,
|
|
6
6
|
} from '@cornerstonejs/core';
|
|
7
7
|
import type { Types } from '@cornerstonejs/core';
|
|
8
8
|
import { vec3 } from 'gl-matrix';
|
|
@@ -305,6 +305,16 @@ class SplineROITool extends ContourSegmentationBaseTool {
|
|
|
305
305
|
const enabledElement = getEnabledElement(element);
|
|
306
306
|
const { renderingEngine } = enabledElement;
|
|
307
307
|
|
|
308
|
+
// Decide whether there's at least one point is outside image
|
|
309
|
+
const image = this.getTargetIdImage(
|
|
310
|
+
this.getTargetId(enabledElement.viewport),
|
|
311
|
+
enabledElement.renderingEngine
|
|
312
|
+
);
|
|
313
|
+
const { imageData, dimensions } = image;
|
|
314
|
+
this.isHandleOutsideImage = data.handles.points
|
|
315
|
+
.map((p) => utilities.transformWorldToIndex(imageData, p))
|
|
316
|
+
.some((index) => !utilities.indexWithinDimensions(index, dimensions));
|
|
317
|
+
|
|
308
318
|
if (
|
|
309
319
|
this.isHandleOutsideImage &&
|
|
310
320
|
this.configuration.preventHandleOutsideImage
|