@cornerstonejs/tools 2.2.14 → 2.2.16
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.
|
@@ -20,7 +20,7 @@ function internalAddSegmentationRepresentation(viewportId, representationInput)
|
|
|
20
20
|
function getColorLUTIndex(config) {
|
|
21
21
|
const { colorLUTOrIndex } = config || {};
|
|
22
22
|
if (colorLUTOrIndex === undefined) {
|
|
23
|
-
const index = addColorLUT(CORNERSTONE_COLOR_LUT);
|
|
23
|
+
const index = addColorLUT(JSON.parse(JSON.stringify(CORNERSTONE_COLOR_LUT)));
|
|
24
24
|
return index;
|
|
25
25
|
}
|
|
26
26
|
if (typeof colorLUTOrIndex === 'number') {
|
|
@@ -31,7 +31,7 @@ function getColorLUTIndex(config) {
|
|
|
31
31
|
const index = addColorLUT(colorLUTOrIndex);
|
|
32
32
|
return index;
|
|
33
33
|
}
|
|
34
|
-
const index = addColorLUT(CORNERSTONE_COLOR_LUT);
|
|
34
|
+
const index = addColorLUT(JSON.parse(JSON.stringify(CORNERSTONE_COLOR_LUT)));
|
|
35
35
|
return index;
|
|
36
36
|
}
|
|
37
37
|
export { internalAddSegmentationRepresentation };
|
|
@@ -173,6 +173,9 @@ class Synchronizer {
|
|
|
173
173
|
};
|
|
174
174
|
viewports.forEach((vp) => {
|
|
175
175
|
const eventSource = this.getEventSource(vp);
|
|
176
|
+
if (!eventSource) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
176
179
|
eventSource.removeEventListener(Enums.Events.ELEMENT_DISABLED, disableHandler);
|
|
177
180
|
eventSource.addEventListener(Enums.Events.ELEMENT_DISABLED, disableHandler);
|
|
178
181
|
});
|
|
@@ -186,9 +189,13 @@ class Synchronizer {
|
|
|
186
189
|
const { renderingEngineId, viewportId } = viewportInfo;
|
|
187
190
|
const renderingEngine = getRenderingEngine(renderingEngineId);
|
|
188
191
|
if (!renderingEngine) {
|
|
189
|
-
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
const viewport = renderingEngine.getViewport(viewportId);
|
|
195
|
+
if (!viewport) {
|
|
196
|
+
return null;
|
|
190
197
|
}
|
|
191
|
-
return
|
|
198
|
+
return viewport.element;
|
|
192
199
|
}
|
|
193
200
|
}
|
|
194
201
|
function _getUniqueViewports(vp1, vp2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.16",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"types": "./dist/esm/index.d.ts",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"canvas": "^2.11.2"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
|
-
"@cornerstonejs/core": "^2.2.
|
|
107
|
+
"@cornerstonejs/core": "^2.2.16",
|
|
108
108
|
"@kitware/vtk.js": "32.1.1",
|
|
109
109
|
"@types/d3-array": "^3.0.4",
|
|
110
110
|
"@types/d3-interpolate": "^3.0.1",
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"type": "individual",
|
|
124
124
|
"url": "https://ohif.org/donate"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "9fd2da0d880ff6f8ac1edb780ce901189722e0ea"
|
|
127
127
|
}
|