@cornerstonejs/core 1.9.2 → 1.10.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/dist/cjs/RenderingEngine/StackViewport.js +10 -4
- package/dist/cjs/RenderingEngine/StackViewport.js.map +1 -1
- package/dist/cjs/types/IImage.d.ts +1 -0
- package/dist/esm/RenderingEngine/StackViewport.js +10 -4
- package/dist/esm/RenderingEngine/StackViewport.js.map +1 -1
- package/dist/esm/types/IImage.d.ts +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
- package/src/RenderingEngine/StackViewport.ts +16 -5
- package/src/types/IImage.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/umd/index.js",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"type": "individual",
|
|
47
47
|
"url": "https://ohif.org/donate"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "898c6a5a3c38fadaa181a74205de6fc29b50e62a"
|
|
50
50
|
}
|
|
@@ -606,7 +606,9 @@ class StackViewport extends Viewport implements IStackViewport {
|
|
|
606
606
|
this.hasPixelSpacing = scale > 0 || imagePlaneModule.rowPixelSpacing > 0;
|
|
607
607
|
imagePlaneModule.calibration = calibration;
|
|
608
608
|
|
|
609
|
-
if (!isUpdated)
|
|
609
|
+
if (!isUpdated) {
|
|
610
|
+
return imagePlaneModule;
|
|
611
|
+
}
|
|
610
612
|
|
|
611
613
|
this.calibration = calibration;
|
|
612
614
|
this._publishCalibratedEvent = true;
|
|
@@ -1755,10 +1757,17 @@ class StackViewport extends Viewport implements IStackViewport {
|
|
|
1755
1757
|
return;
|
|
1756
1758
|
}
|
|
1757
1759
|
|
|
1758
|
-
//If Photometric Interpretation is not the same for the next image we are trying to load
|
|
1760
|
+
// If Photometric Interpretation is not the same for the next image we are trying to load
|
|
1761
|
+
// invalidate the stack to recreate the VTK imageData
|
|
1762
|
+
const csImgFrame = this.csImage?.imageFrame;
|
|
1763
|
+
const imgFrame = image?.imageFrame;
|
|
1764
|
+
|
|
1765
|
+
// if a volume is decached into images then the imageFrame will be undefined
|
|
1759
1766
|
if (
|
|
1760
|
-
|
|
1761
|
-
|
|
1767
|
+
csImgFrame?.photometricInterpretation !==
|
|
1768
|
+
imgFrame?.photometricInterpretation ||
|
|
1769
|
+
this.csImage?.photometricInterpretation !==
|
|
1770
|
+
image?.photometricInterpretation
|
|
1762
1771
|
) {
|
|
1763
1772
|
this.stackInvalidated = true;
|
|
1764
1773
|
}
|
|
@@ -2564,7 +2573,9 @@ class StackViewport extends Viewport implements IStackViewport {
|
|
|
2564
2573
|
public hasImageURI = (imageURI: string): boolean => {
|
|
2565
2574
|
const imageIds = this.imageIds;
|
|
2566
2575
|
for (let i = 0; i < imageIds.length; i++) {
|
|
2567
|
-
if (imageIdToURI(imageIds[i]) === imageURI)
|
|
2576
|
+
if (imageIdToURI(imageIds[i]) === imageURI) {
|
|
2577
|
+
return true;
|
|
2578
|
+
}
|
|
2568
2579
|
}
|
|
2569
2580
|
|
|
2570
2581
|
return false;
|
package/src/types/IImage.ts
CHANGED
|
@@ -72,6 +72,8 @@ interface IImage {
|
|
|
72
72
|
sliceThickness?: number;
|
|
73
73
|
/** whether image pixels are inverted in color */
|
|
74
74
|
invert: boolean;
|
|
75
|
+
/** image photometric interpretation */
|
|
76
|
+
photometricInterpretation?: string;
|
|
75
77
|
/** image size in number of bytes */
|
|
76
78
|
sizeInBytes: number;
|
|
77
79
|
/** CPU: custom modality LUT for image */
|