@cornerstonejs/tools 0.64.0 → 0.65.1
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/stateManagement/annotation/annotationState.js +3 -1
- package/dist/cjs/stateManagement/annotation/annotationState.js.map +1 -1
- package/dist/cjs/tools/base/BaseTool.js +1 -1
- package/dist/cjs/tools/base/BaseTool.js.map +1 -1
- package/dist/cjs/tools/displayTools/Contour/addContourSetsToElement.js +4 -1
- package/dist/cjs/tools/displayTools/Contour/addContourSetsToElement.js.map +1 -1
- package/dist/cjs/tools/displayTools/Contour/updateContourSets.js +3 -1
- package/dist/cjs/tools/displayTools/Contour/updateContourSets.js.map +1 -1
- package/dist/esm/stateManagement/annotation/annotationState.js +3 -1
- package/dist/esm/stateManagement/annotation/annotationState.js.map +1 -1
- package/dist/esm/tools/base/BaseTool.js +2 -2
- package/dist/esm/tools/base/BaseTool.js.map +1 -1
- package/dist/esm/tools/displayTools/Contour/addContourSetsToElement.js +4 -1
- package/dist/esm/tools/displayTools/Contour/addContourSetsToElement.js.map +1 -1
- package/dist/esm/tools/displayTools/Contour/updateContourSets.js +3 -1
- package/dist/esm/tools/displayTools/Contour/updateContourSets.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +5 -5
- package/src/stateManagement/annotation/annotationState.ts +5 -5
- package/src/tools/base/BaseTool.ts +6 -2
- package/src/tools/displayTools/Contour/addContourSetsToElement.ts +4 -1
- package/src/tools/displayTools/Contour/updateContourSets.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.1",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"main": "dist/umd/index.js",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@cornerstonejs/core": "^0.
|
|
29
|
+
"@cornerstonejs/core": "^0.44.0",
|
|
30
30
|
"lodash.clonedeep": "4.5.0",
|
|
31
31
|
"lodash.get": "^4.4.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@kitware/vtk.js": "
|
|
34
|
+
"@kitware/vtk.js": "27.3.1",
|
|
35
35
|
"@types/d3-array": "^3.0.3",
|
|
36
36
|
"@types/d3-interpolate": "^3.0.1",
|
|
37
37
|
"d3-array": "^3.0.3",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"gl-matrix": "^3.4.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@kitware/vtk.js": "
|
|
42
|
+
"@kitware/vtk.js": "27.3.1"
|
|
43
43
|
},
|
|
44
44
|
"contributors": [
|
|
45
45
|
{
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"type": "individual",
|
|
53
53
|
"url": "https://ohif.org/donate"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "910490a4210a0ed8574153f3e5b1eac4d7236060"
|
|
56
56
|
}
|
|
@@ -88,13 +88,13 @@ function addAnnotation(
|
|
|
88
88
|
// annotation added event for that element.
|
|
89
89
|
if (annotationGroupSelector instanceof HTMLDivElement) {
|
|
90
90
|
triggerAnnotationAddedForElement(annotation, annotationGroupSelector);
|
|
91
|
+
} else {
|
|
92
|
+
// if no element is provided, render all viewports that have the
|
|
93
|
+
// same frame of reference.
|
|
94
|
+
// Todo: we should do something else here for other types of annotation managers.
|
|
95
|
+
triggerAnnotationAddedForFOR(annotation);
|
|
91
96
|
}
|
|
92
97
|
|
|
93
|
-
// if no element is provided, render all viewports that have the
|
|
94
|
-
// same frame of reference.
|
|
95
|
-
// Todo: we should do something else here for other types of annotation managers.
|
|
96
|
-
triggerAnnotationAddedForFOR(annotation);
|
|
97
|
-
|
|
98
98
|
return annotation.annotationUID;
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
StackViewport,
|
|
3
|
+
utilities,
|
|
4
|
+
BaseVolumeViewport,
|
|
5
|
+
} from '@cornerstonejs/core';
|
|
2
6
|
import { Types } from '@cornerstonejs/core';
|
|
3
7
|
import { ToolModes } from '../../enums';
|
|
4
8
|
import { InteractionTypes, ToolProps, PublicToolProps } from '../../types';
|
|
@@ -199,7 +203,7 @@ abstract class BaseTool implements IBaseTool {
|
|
|
199
203
|
protected getTargetId(viewport: Types.IViewport): string | undefined {
|
|
200
204
|
if (viewport instanceof StackViewport) {
|
|
201
205
|
return `imageId:${viewport.getCurrentImageId()}`;
|
|
202
|
-
} else if (viewport instanceof
|
|
206
|
+
} else if (viewport instanceof BaseVolumeViewport) {
|
|
203
207
|
return `volumeId:${this.getTargetVolumeId(viewport)}`;
|
|
204
208
|
} else {
|
|
205
209
|
throw new Error(
|
|
@@ -104,7 +104,10 @@ export function addContourSetsToElement(
|
|
|
104
104
|
|
|
105
105
|
actor.setForceOpaque(true);
|
|
106
106
|
|
|
107
|
-
viewport.addActor({
|
|
107
|
+
viewport.addActor({
|
|
108
|
+
uid: contourActorUID,
|
|
109
|
+
actor: actor as unknown as Types.Actor,
|
|
110
|
+
});
|
|
108
111
|
viewport.resetCamera();
|
|
109
112
|
viewport.render();
|
|
110
113
|
}
|
|
@@ -34,7 +34,9 @@ export function updateContourSets(
|
|
|
34
34
|
const newOutlineWithActive = newContourConfig.outlineWidthActive;
|
|
35
35
|
|
|
36
36
|
if (cachedConfig?.outlineWidthActive !== newOutlineWithActive) {
|
|
37
|
-
(actor as vtkActor)
|
|
37
|
+
(actor as unknown as vtkActor)
|
|
38
|
+
.getProperty()
|
|
39
|
+
.setLineWidth(newOutlineWithActive);
|
|
38
40
|
|
|
39
41
|
setConfigCache(
|
|
40
42
|
segmentationRepresentationUID,
|
|
@@ -44,7 +46,7 @@ export function updateContourSets(
|
|
|
44
46
|
);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
const mapper = (actor as vtkActor).getMapper();
|
|
49
|
+
const mapper = (actor as unknown as vtkActor).getMapper();
|
|
48
50
|
const lut = mapper.getLookupTable();
|
|
49
51
|
|
|
50
52
|
const segmentsToSetToInvisible = [];
|