@cornerstonejs/tools 1.64.3 → 1.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/synchronizers/callbacks/voiSyncCallback.d.ts +1 -1
- package/dist/cjs/synchronizers/callbacks/voiSyncCallback.js +6 -3
- package/dist/cjs/synchronizers/callbacks/voiSyncCallback.js.map +1 -1
- package/dist/cjs/synchronizers/synchronizers/createVOISynchronizer.js +1 -1
- package/dist/cjs/synchronizers/synchronizers/createVOISynchronizer.js.map +1 -1
- package/dist/esm/synchronizers/callbacks/voiSyncCallback.js +6 -3
- package/dist/esm/synchronizers/callbacks/voiSyncCallback.js.map +1 -1
- package/dist/esm/synchronizers/synchronizers/createVOISynchronizer.js +4 -1
- package/dist/esm/synchronizers/synchronizers/createVOISynchronizer.js.map +1 -1
- package/dist/types/synchronizers/callbacks/voiSyncCallback.d.ts +1 -1
- package/dist/types/synchronizers/callbacks/voiSyncCallback.d.ts.map +1 -1
- package/dist/types/synchronizers/synchronizers/createVOISynchronizer.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/synchronizers/callbacks/voiSyncCallback.ts +7 -4
- package/src/synchronizers/synchronizers/createVOISynchronizer.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.65.1",
|
|
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.
|
|
32
|
+
"@cornerstonejs/core": "^1.65.1",
|
|
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": "b8cf31075c8069d9124c2d12e9360baf9bae267e"
|
|
63
63
|
}
|
|
@@ -12,18 +12,18 @@ import {
|
|
|
12
12
|
* @param synchronizerInstance - The Instance of the Synchronizer
|
|
13
13
|
* @param sourceViewport - The list of IDs defining the source viewport.
|
|
14
14
|
* @param targetViewport - The list of IDs defining the target viewport.
|
|
15
|
-
* @param
|
|
15
|
+
* @param modifiedEvent - The COLORMAP_MODIFIED or VOI_MODIFIED event.
|
|
16
16
|
* @param options - Options for the synchronizer.
|
|
17
17
|
*/
|
|
18
18
|
export default function voiSyncCallback(
|
|
19
19
|
synchronizerInstance,
|
|
20
20
|
sourceViewport: Types.IViewportId,
|
|
21
21
|
targetViewport: Types.IViewportId,
|
|
22
|
-
|
|
22
|
+
modifiedEvent: any,
|
|
23
23
|
options?: any
|
|
24
24
|
): void {
|
|
25
|
-
const eventDetail =
|
|
26
|
-
const { volumeId, range, invertStateChanged, invert } = eventDetail;
|
|
25
|
+
const eventDetail = modifiedEvent.detail;
|
|
26
|
+
const { volumeId, range, invertStateChanged, invert, colormap } = eventDetail;
|
|
27
27
|
|
|
28
28
|
const renderingEngine = getRenderingEngine(targetViewport.renderingEngineId);
|
|
29
29
|
if (!renderingEngine) {
|
|
@@ -42,6 +42,9 @@ export default function voiSyncCallback(
|
|
|
42
42
|
if (options?.syncInvertState && invertStateChanged) {
|
|
43
43
|
tProperties.invert = invert;
|
|
44
44
|
}
|
|
45
|
+
if (options?.syncColormap && colormap) {
|
|
46
|
+
tProperties.colormap = colormap;
|
|
47
|
+
}
|
|
45
48
|
|
|
46
49
|
if (tViewport instanceof BaseVolumeViewport) {
|
|
47
50
|
tViewport.setProperties(tProperties, volumeId);
|