@cornerstonejs/core 1.57.2 → 1.58.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/core",
3
- "version": "1.57.2",
3
+ "version": "1.58.1",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "dist/types/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
31
31
  },
32
32
  "dependencies": {
33
- "@kitware/vtk.js": "29.3.0",
33
+ "@kitware/vtk.js": "29.7.0",
34
34
  "comlink": "^4.4.1",
35
35
  "detect-gpu": "^5.0.22",
36
36
  "gl-matrix": "^3.4.3",
@@ -47,5 +47,5 @@
47
47
  "type": "individual",
48
48
  "url": "https://ohif.org/donate"
49
49
  },
50
- "gitHead": "d3508439e829a86ef8dfaa95147935a95ea3cd82"
50
+ "gitHead": "6125a8f89f37b975a49786ba2fd75f682f537402"
51
51
  }
@@ -691,7 +691,10 @@ class Viewport implements IViewport {
691
691
  // fix the flip right away, since we rely on the viewPlaneNormal and
692
692
  // viewUp for later. Basically, we need to flip back if flipHorizontal
693
693
  // is true or flipVertical is true
694
- this.setCamera({
694
+ // we should use resetCamera no event here, since we don't want to fire
695
+ // camera modified events yet since a proper one will be fired later down
696
+ // below
697
+ this.setCameraNoEvent({
695
698
  flipHorizontal: false,
696
699
  flipVertical: false,
697
700
  });
@@ -42,6 +42,10 @@ async function setDefaultVolumeVOI(
42
42
  voi = handlePreScaledVolume(imageVolume, voi);
43
43
  const { lower, upper } = voi;
44
44
 
45
+ if (lower === 0 && upper === 0) {
46
+ return;
47
+ }
48
+
45
49
  volumeActor
46
50
  .getProperty()
47
51
  .getRGBTransferFunction(0)
@@ -181,7 +185,7 @@ async function getVOIFromMinMax(
181
185
  // know how to do it better.
182
186
  let image = cache.getImage(imageId);
183
187
 
184
- if (!image?.referencedImageId) {
188
+ if (!imageVolume.referencedImageIds?.length) {
185
189
  image = await loadAndCacheImage(imageId, options);
186
190
  }
187
191
 
@@ -0,0 +1,11 @@
1
+ // Axis-aligned bounding box 2D
2
+ type AABB3 = {
3
+ minX: number;
4
+ maxX: number;
5
+ minY: number;
6
+ maxY: number;
7
+ minZ: number;
8
+ maxZ: number;
9
+ };
10
+
11
+ export type { AABB3 as default };
@@ -35,6 +35,7 @@ import type {
35
35
  import type Metadata from './Metadata';
36
36
  import type OrientationVectors from './OrientationVectors';
37
37
  import type AABB2 from './AABB2';
38
+ import type AABB3 from './AABB3';
38
39
  import type Point2 from './Point2';
39
40
  import type Point3 from './Point3';
40
41
  import type Point4 from './Point4';
@@ -182,6 +183,7 @@ export type {
182
183
  Metadata,
183
184
  OrientationVectors,
184
185
  AABB2,
186
+ AABB3,
185
187
  Point2,
186
188
  Point3,
187
189
  PointsXYZ,