@cornerstonejs/core 1.16.0 → 1.16.2
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.d.ts +1 -0
- package/dist/cjs/RenderingEngine/StackViewport.js +4 -2
- package/dist/cjs/RenderingEngine/StackViewport.js.map +1 -1
- package/dist/cjs/init.d.ts +1 -1
- package/dist/cjs/init.js +1 -1
- package/dist/cjs/init.js.map +1 -1
- package/dist/esm/RenderingEngine/StackViewport.d.ts +1 -0
- package/dist/esm/RenderingEngine/StackViewport.js +4 -2
- package/dist/esm/RenderingEngine/StackViewport.js.map +1 -1
- package/dist/esm/init.d.ts +1 -1
- package/dist/esm/init.js +1 -1
- package/dist/esm/init.js.map +1 -1
- 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 +6 -2
- package/src/init.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.2",
|
|
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": "c2dc82d147694ce72b5cadde2ef25f5825891807"
|
|
50
50
|
}
|
|
@@ -130,6 +130,8 @@ class StackViewport extends Viewport implements IStackViewport {
|
|
|
130
130
|
private VOILUTFunction: VOILUTFunctionType;
|
|
131
131
|
//
|
|
132
132
|
private invert = false;
|
|
133
|
+
// The initial invert of the image loaded as opposed to the invert status of the viewport itself (see above).
|
|
134
|
+
private initialInvert = false;
|
|
133
135
|
private interpolationType: InterpolationType;
|
|
134
136
|
|
|
135
137
|
// Helpers
|
|
@@ -730,7 +732,7 @@ class StackViewport extends Viewport implements IStackViewport {
|
|
|
730
732
|
this.setRotation(0);
|
|
731
733
|
}
|
|
732
734
|
this.setInterpolationType(InterpolationType.LINEAR);
|
|
733
|
-
this.setInvertColor(
|
|
735
|
+
this.setInvertColor(this.initialInvert);
|
|
734
736
|
}
|
|
735
737
|
|
|
736
738
|
private _setPropertiesFromCache(): void {
|
|
@@ -2066,8 +2068,10 @@ class StackViewport extends Viewport implements IStackViewport {
|
|
|
2066
2068
|
forceRecreateLUTFunction: !!monochrome1,
|
|
2067
2069
|
});
|
|
2068
2070
|
|
|
2071
|
+
this.initialInvert = !!monochrome1;
|
|
2072
|
+
|
|
2069
2073
|
// should carry over the invert color from the previous image if has been applied
|
|
2070
|
-
this.setInvertColor(this.invert ||
|
|
2074
|
+
this.setInvertColor(this.invert || this.initialInvert);
|
|
2071
2075
|
|
|
2072
2076
|
// Saving position of camera on render, to cache the panning
|
|
2073
2077
|
this.cameraFocalPointOnRender = this.getCamera().focalPoint;
|
package/src/init.ts
CHANGED
|
@@ -100,7 +100,7 @@ function hasSharedArrayBuffer() {
|
|
|
100
100
|
* @returns A promise that resolves to true cornerstone has been initialized successfully.
|
|
101
101
|
* @category Initialization
|
|
102
102
|
*/
|
|
103
|
-
async function init(configuration =
|
|
103
|
+
async function init(configuration = config): Promise<boolean> {
|
|
104
104
|
if (csRenderInitialized) {
|
|
105
105
|
return csRenderInitialized;
|
|
106
106
|
}
|