@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "1.64.3",
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.64.3",
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": "c8a06620470d112dce409aad759cb236f246caf5"
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 voiModifiedEvent - The VOI_MODIFIED event.
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
- voiModifiedEvent: Types.EventTypes.VoiModifiedEvent,
22
+ modifiedEvent: any,
23
23
  options?: any
24
24
  ): void {
25
- const eventDetail = voiModifiedEvent.detail;
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);
@@ -26,7 +26,10 @@ export default function createVOISynchronizer(
26
26
  synchronizerName,
27
27
  Enums.Events.VOI_MODIFIED,
28
28
  voiSyncCallback,
29
- options
29
+ {
30
+ auxiliaryEventNames: [Enums.Events.COLORMAP_MODIFIED],
31
+ ...options,
32
+ }
30
33
  );
31
34
 
32
35
  return VOISynchronizer;