@cornerstonejs/tools 1.47.4 → 1.47.5
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/AngleTool.js +4 -0
- package/dist/cjs/tools/annotation/AngleTool.js.map +1 -1
- package/dist/esm/tools/annotation/AngleTool.js +5 -1
- package/dist/esm/tools/annotation/AngleTool.js.map +1 -1
- package/dist/types/tools/annotation/AngleTool.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/AngleTool.ts +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.47.
|
|
3
|
+
"version": "1.47.5",
|
|
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.47.
|
|
32
|
+
"@cornerstonejs/core": "^1.47.5",
|
|
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": "ca6a1674238c19acca3a96f604a1a15cf929f13f"
|
|
57
57
|
}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
getEnabledElement,
|
|
4
4
|
triggerEvent,
|
|
5
5
|
eventTarget,
|
|
6
|
+
utilities as csUtils,
|
|
6
7
|
} from '@cornerstonejs/core';
|
|
7
8
|
import type { Types } from '@cornerstonejs/core';
|
|
8
9
|
|
|
@@ -823,7 +824,15 @@ class AngleTool extends AnnotationTool {
|
|
|
823
824
|
[worldPos1, worldPos2],
|
|
824
825
|
[worldPos2, worldPos3]
|
|
825
826
|
);
|
|
827
|
+
const { dimensions, imageData } = this.getTargetIdImage(
|
|
828
|
+
targetId,
|
|
829
|
+
renderingEngine
|
|
830
|
+
);
|
|
826
831
|
|
|
832
|
+
// Decide if there's at least one handle is outside of image
|
|
833
|
+
this.isHandleOutsideImage = [worldPos1, worldPos2, worldPos3]
|
|
834
|
+
.map((worldPos) => csUtils.transformWorldToIndex(imageData, worldPos))
|
|
835
|
+
.some((index) => !csUtils.indexWithinDimensions(index, dimensions));
|
|
827
836
|
cachedStats[targetId] = {
|
|
828
837
|
angle: isNaN(angle) ? 'Incomplete Angle' : angle,
|
|
829
838
|
};
|