@cornerstonejs/tools 1.75.2 → 1.76.0

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.75.2",
3
+ "version": "1.76.0",
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.75.2",
32
+ "@cornerstonejs/core": "^1.76.0",
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": "f3239736baf99aec3e0744d0905b9cc1a43ae7cd"
62
+ "gitHead": "97c7f819997bdff7dda77b94e99c5ae2f7502fc5"
63
63
  }
@@ -212,33 +212,29 @@ function _imageChangeEventListener(evt) {
212
212
  // I tried calling modified on everything, but seems like we should remove
213
213
  // and add the actor again below
214
214
  viewport.removeActors([actor.uid]);
215
- viewport.addImages(
216
- [
217
- {
218
- imageId: derivedImageId,
219
- actorUID: actor.uid,
220
- callback: ({ imageActor }) => {
221
- const scalarArray = vtkDataArray.newInstance({
222
- name: 'Pixels',
223
- numberOfComponents: 1,
224
- values: [...derivedImage.getPixelData()],
225
- });
226
-
227
- const imageData = vtkImageData.newInstance();
228
-
229
- imageData.setDimensions(dimensions[0], dimensions[1], 1);
230
- imageData.setSpacing(spacing);
231
- imageData.setDirection(direction);
232
- imageData.setOrigin(originToUse);
233
- imageData.getPointData().setScalars(scalarArray);
234
-
235
- imageActor.getMapper().setInputData(imageData);
236
- },
215
+ viewport.addImages([
216
+ {
217
+ imageId: derivedImageId,
218
+ actorUID: actor.uid,
219
+ callback: ({ imageActor }) => {
220
+ const scalarArray = vtkDataArray.newInstance({
221
+ name: 'Pixels',
222
+ numberOfComponents: 1,
223
+ values: [...derivedImage.getPixelData()],
224
+ });
225
+
226
+ const imageData = vtkImageData.newInstance();
227
+
228
+ imageData.setDimensions(dimensions[0], dimensions[1], 1);
229
+ imageData.setSpacing(spacing);
230
+ imageData.setDirection(direction);
231
+ imageData.setOrigin(originToUse);
232
+ imageData.getPointData().setScalars(scalarArray);
233
+
234
+ imageActor.getMapper().setInputData(imageData);
237
235
  },
238
- ],
239
- true,
240
- false
241
- );
236
+ },
237
+ ]);
242
238
 
243
239
  triggerSegmentationRender(toolGroup.id);
244
240
  return;
@@ -73,13 +73,7 @@ async function addLabelmapToElement(
73
73
  ];
74
74
 
75
75
  // Add labelmap volumes to the viewports to be be rendered, but not force the render
76
- await addImageSlicesToViewports(
77
- renderingEngine,
78
- stackInputs,
79
- [viewportId],
80
- immediateRender,
81
- suppressEvents
82
- );
76
+ await addImageSlicesToViewports(renderingEngine, stackInputs, [viewportId]);
83
77
  }
84
78
  }
85
79