@cornerstonejs/core 4.0.1 → 4.0.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.
|
@@ -223,8 +223,10 @@ class ContextPoolRenderingEngine extends BaseRenderingEngine {
|
|
|
223
223
|
_resizeOffScreenCanvasForViewport(viewportCanvas, offScreenCanvasContainer, offscreenMultiRenderWindow) {
|
|
224
224
|
const offScreenCanvasWidth = viewportCanvas.width;
|
|
225
225
|
const offScreenCanvasHeight = viewportCanvas.height;
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
const tolerance = 2;
|
|
227
|
+
const widthDiff = Math.abs(offScreenCanvasContainer.width - offScreenCanvasWidth);
|
|
228
|
+
const heightDiff = Math.abs(offScreenCanvasContainer.height - offScreenCanvasHeight);
|
|
229
|
+
if (widthDiff <= tolerance && heightDiff <= tolerance) {
|
|
228
230
|
return;
|
|
229
231
|
}
|
|
230
232
|
offScreenCanvasContainer.width = offScreenCanvasWidth;
|
|
@@ -28,10 +28,7 @@ class Viewport {
|
|
|
28
28
|
paletteLut: true,
|
|
29
29
|
}; }
|
|
30
30
|
constructor(props) {
|
|
31
|
-
this.insetImageMultiplier =
|
|
32
|
-
?.useLegacyCameraFOV
|
|
33
|
-
? 1.1
|
|
34
|
-
: 1;
|
|
31
|
+
this.insetImageMultiplier = 1;
|
|
35
32
|
this.flipHorizontal = false;
|
|
36
33
|
this.flipVertical = false;
|
|
37
34
|
this.viewportStatus = ViewportStatus.NO_DATA;
|
|
@@ -531,9 +528,7 @@ class Viewport {
|
|
|
531
528
|
}
|
|
532
529
|
let widthWorld;
|
|
533
530
|
let heightWorld;
|
|
534
|
-
|
|
535
|
-
const useLegacyMethod = config.rendering?.useLegacyCameraFOV ?? false;
|
|
536
|
-
if (imageData && !useLegacyMethod) {
|
|
531
|
+
if (imageData) {
|
|
537
532
|
const extent = imageData.getExtent();
|
|
538
533
|
const spacing = imageData.getSpacing();
|
|
539
534
|
widthWorld = (extent[1] - extent[0]) * spacing[0];
|
package/dist/esm/metaData.js
CHANGED
|
@@ -26,9 +26,14 @@ export function removeAllProviders() {
|
|
|
26
26
|
}
|
|
27
27
|
function getMetaData(type, ...queries) {
|
|
28
28
|
for (let i = 0; i < providers.length; i++) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
try {
|
|
30
|
+
const result = providers[i].provider(type, ...queries);
|
|
31
|
+
if (result !== undefined) {
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.warn(`Error occurred in provider ${i}:`, error);
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
39
|
}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.0.
|
|
1
|
+
export declare const version = "4.0.2";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.0.
|
|
1
|
+
export const version = '4.0.2';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Cornerstone3D Core",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"type": "individual",
|
|
98
98
|
"url": "https://ohif.org/donate"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "bee7eedbfc5ac6c208d03f87574c1ffea0c36d10"
|
|
101
101
|
}
|