@cornerstonejs/core 5.0.12 → 5.0.13

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.
@@ -797,10 +797,22 @@ class StackViewport extends Viewport {
797
797
  }
798
798
  _setPropertiesFromCache() {
799
799
  const voiRange = this._getVOIFromCache();
800
- const { interpolationType, invert } = this;
800
+ const { colormap, VOILUTFunction, interpolationType, invert, sharpening, smoothing, } = this.getProperties();
801
+ if (typeof VOILUTFunction !== 'undefined') {
802
+ this.setVOILUTFunction(VOILUTFunction, true);
803
+ }
801
804
  this.setVOI(voiRange);
805
+ if (typeof colormap !== 'undefined') {
806
+ this.setColormap(colormap);
807
+ }
802
808
  this.setInterpolationType(interpolationType);
803
809
  this.setInvertColor(invert);
810
+ if (typeof sharpening !== 'undefined') {
811
+ this.setSharpening(sharpening);
812
+ }
813
+ if (typeof smoothing !== 'undefined') {
814
+ this.setSmoothing(smoothing);
815
+ }
804
816
  }
805
817
  getCameraCPU() {
806
818
  const { metadata, viewport } = this._cpuFallbackEnabledElement;
@@ -1617,8 +1629,9 @@ class StackViewport extends Viewport {
1617
1629
  }
1618
1630
  _updateActorToDisplayImageId(image) {
1619
1631
  const sameImageData = this._checkVTKImageDataMatchesCornerstoneImage(image, this._imageData);
1632
+ const wasStackInvalidated = this.stackInvalidated;
1620
1633
  const viewPresentation = this.getViewPresentation();
1621
- if (sameImageData && !this.stackInvalidated) {
1634
+ if (sameImageData && !wasStackInvalidated) {
1622
1635
  this._updateVTKImageDataFromCornerstoneImage(image);
1623
1636
  this.resetCameraNoEvent();
1624
1637
  this.setViewPresentation(viewPresentation);
@@ -1653,14 +1666,20 @@ class StackViewport extends Viewport {
1653
1666
  this.resetCameraNoEvent();
1654
1667
  this.setViewPresentation(viewPresentation);
1655
1668
  this.triggerCameraEvent(this.getCamera(), previousCamera);
1656
- const monochrome1 = imagePixelModule.photometricInterpretation === 'MONOCHROME1';
1657
- this.stackInvalidated = true;
1658
- const voiRange = this._getInitialVOIRange(image);
1659
- this.setVOI(voiRange, {
1660
- forceRecreateLUTFunction: !!monochrome1,
1661
- });
1662
- this.initialInvert = !!monochrome1;
1663
- this.setInvertColor(this.invert || this.initialInvert);
1669
+ if (wasStackInvalidated) {
1670
+ const monochrome1 = imagePixelModule.photometricInterpretation === 'MONOCHROME1';
1671
+ this.stackInvalidated = true;
1672
+ const voiRange = this._getInitialVOIRange(image);
1673
+ this.setVOI(voiRange, {
1674
+ forceRecreateLUTFunction: !!monochrome1,
1675
+ });
1676
+ this.initialInvert = !!monochrome1;
1677
+ this.setInvertColor(this.invert || this.initialInvert);
1678
+ }
1679
+ else {
1680
+ this.stackInvalidated = true;
1681
+ this._setPropertiesFromCache();
1682
+ }
1664
1683
  this.stackInvalidated = false;
1665
1684
  this.stackActorReInitialized = true;
1666
1685
  if (this._publishCalibratedEvent) {
@@ -1 +1 @@
1
- export declare const version = "5.0.12";
1
+ export declare const version = "5.0.13";
@@ -1 +1 @@
1
- export const version = '5.0.12';
1
+ export const version = '5.0.13';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "5.0.12",
3
+ "version": "5.0.13",
4
4
  "description": "Cornerstone3D Core",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -84,18 +84,18 @@
84
84
  "prepublishOnly": "pnpm run build"
85
85
  },
86
86
  "dependencies": {
87
- "@cornerstonejs/utils": "5.0.12",
87
+ "@cornerstonejs/utils": "5.0.13",
88
88
  "@kitware/vtk.js": "35.5.3",
89
89
  "comlink": "4.4.2",
90
90
  "gl-matrix": "3.4.3",
91
91
  "loglevel": "1.9.2"
92
92
  },
93
93
  "devDependencies": {
94
- "@cornerstonejs/metadata": "5.0.12"
94
+ "@cornerstonejs/metadata": "5.0.13"
95
95
  },
96
96
  "peerDependencies": {
97
- "@cornerstonejs/metadata": "5.0.12",
98
- "@cornerstonejs/utils": "5.0.12"
97
+ "@cornerstonejs/metadata": "5.0.13",
98
+ "@cornerstonejs/utils": "5.0.13"
99
99
  },
100
100
  "contributors": [
101
101
  {
@@ -108,5 +108,5 @@
108
108
  "type": "individual",
109
109
  "url": "https://ohif.org/donate"
110
110
  },
111
- "gitHead": "53a356dd06bcc5be6eef19faf3e67d0b5cac57ac"
111
+ "gitHead": "7b60dbfba9ec3bc187d836acf62ea3ac76e6b3da"
112
112
  }