@cornerstonejs/tools 1.83.1 → 1.83.3
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/ScaleOverlayTool.js +23 -20
- package/dist/cjs/tools/ScaleOverlayTool.js.map +1 -1
- package/dist/esm/tools/ScaleOverlayTool.js +23 -20
- package/dist/esm/tools/ScaleOverlayTool.js.map +1 -1
- package/dist/types/tools/ScaleOverlayTool.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/ScaleOverlayTool.ts +24 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.3",
|
|
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.83.
|
|
32
|
+
"@cornerstonejs/core": "^1.83.3",
|
|
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": "ef300bc029ea075f451a5909cecb43cbddb12fdb"
|
|
63
63
|
}
|
|
@@ -118,28 +118,33 @@ class ScaleOverlayTool extends AnnotationDisplayTool {
|
|
|
118
118
|
|
|
119
119
|
// viewportsWithAnnotations stores which viewports have an annotation,
|
|
120
120
|
// if the viewport does not have an annotation, create a new one
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
handles: {
|
|
132
|
-
points: viewportCanvasCornersInWorld,
|
|
121
|
+
enabledElements.forEach((element) => {
|
|
122
|
+
const { viewport } = element;
|
|
123
|
+
if (!viewportsWithAnnotations.includes(viewport.id)) {
|
|
124
|
+
const newAnnotation: ScaleOverlayAnnotation = {
|
|
125
|
+
metadata: {
|
|
126
|
+
toolName: this.getToolName(),
|
|
127
|
+
viewPlaneNormal: <Types.Point3>[...viewPlaneNormal],
|
|
128
|
+
viewUp: <Types.Point3>[...viewUp],
|
|
129
|
+
FrameOfReferenceUID,
|
|
130
|
+
referencedImageId: null,
|
|
133
131
|
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
data: {
|
|
133
|
+
handles: {
|
|
134
|
+
points: csUtils.getViewportImageCornersInWorld(viewport),
|
|
135
|
+
},
|
|
136
|
+
viewportId: viewport.id,
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
viewportsWithAnnotations.push(viewport.id);
|
|
137
141
|
|
|
138
|
-
|
|
142
|
+
addAnnotation(newAnnotation, viewport.element);
|
|
143
|
+
annotation = newAnnotation;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
139
146
|
|
|
140
|
-
|
|
141
|
-
annotation = newAnnotation;
|
|
142
|
-
} else if (
|
|
147
|
+
if (
|
|
143
148
|
this.editData.annotation &&
|
|
144
149
|
this.editData.annotation.data.viewportId == viewport.id
|
|
145
150
|
) {
|