@cornerstonejs/core 0.42.2 → 0.43.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/core",
3
- "version": "0.42.2",
3
+ "version": "0.43.0",
4
4
  "description": "",
5
5
  "main": "dist/umd/index.js",
6
6
  "types": "dist/esm/index.d.ts",
@@ -51,5 +51,5 @@
51
51
  "type": "individual",
52
52
  "url": "https://ohif.org/donate"
53
53
  },
54
- "gitHead": "d0aedd7f51d2f9e8a5cda8411862190b1cbda90f"
54
+ "gitHead": "cc3ce18f1c601fc911d8866987ae369a8f4c28df"
55
55
  }
@@ -1543,9 +1543,9 @@ class StackViewport extends Viewport implements IStackViewport {
1543
1543
  // using spacing, size, and direction only for now
1544
1544
  return (
1545
1545
  (isSameXSpacing ||
1546
- (image.rowPixelSpacing === null && xSpacing === 1.0)) &&
1546
+ (image.columnPixelSpacing === null && xSpacing === 1.0)) &&
1547
1547
  (isSameYSpacing ||
1548
- (image.columnPixelSpacing === null && ySpacing === 1.0)) &&
1548
+ (image.rowPixelSpacing === null && ySpacing === 1.0)) &&
1549
1549
  xVoxels === image.columns &&
1550
1550
  yVoxels === image.rows &&
1551
1551
  isEqual(imagePlaneModule.rowCosines, <Point3>rowCosines) &&
@@ -1750,6 +1750,14 @@ class StackViewport extends Viewport implements IStackViewport {
1750
1750
  useRGBA: true,
1751
1751
  };
1752
1752
 
1753
+ const eventDetail: EventTypes.PreStackNewImageEventDetail = {
1754
+ imageId,
1755
+ imageIdIndex,
1756
+ viewportId: this.id,
1757
+ renderingEngineId: this.renderingEngineId,
1758
+ };
1759
+ triggerEvent(this.element, Events.PRE_STACK_NEW_IMAGE, eventDetail);
1760
+
1753
1761
  imageLoadPoolManager.addRequest(
1754
1762
  sendRequest.bind(this, imageId, imageIdIndex, options),
1755
1763
  requestType,
@@ -53,15 +53,6 @@ export default function isEqual<ValueType>(
53
53
  return false;
54
54
  }
55
55
 
56
- // typeof object must have same constructor
57
- if (
58
- typeof v1 === 'object' &&
59
- typeof v2 === 'object' &&
60
- v1.constructor !== v2.constructor
61
- ) {
62
- return false;
63
- }
64
-
65
56
  if (isNumberType(v1) && isNumberType(v2)) {
66
57
  return areNumbersEqualWithTolerance(v1, v2, tolerance);
67
58
  }