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