@cornerstonejs/core 4.15.9 → 4.15.10
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.
|
@@ -514,15 +514,6 @@ class Viewport {
|
|
|
514
514
|
}
|
|
515
515
|
const focalPoint = [0, 0, 0];
|
|
516
516
|
const imageData = this.getDefaultImageData();
|
|
517
|
-
if (imageData) {
|
|
518
|
-
const spc = imageData.getSpacing();
|
|
519
|
-
bounds[0] = bounds[0] + spc[0] / 2;
|
|
520
|
-
bounds[1] = bounds[1] - spc[0] / 2;
|
|
521
|
-
bounds[2] = bounds[2] + spc[1] / 2;
|
|
522
|
-
bounds[3] = bounds[3] - spc[1] / 2;
|
|
523
|
-
bounds[4] = bounds[4] + spc[2] / 2;
|
|
524
|
-
bounds[5] = bounds[5] - spc[2] / 2;
|
|
525
|
-
}
|
|
526
517
|
const activeCamera = this.getVtkActiveCamera();
|
|
527
518
|
const viewPlaneNormal = activeCamera.getViewPlaneNormal();
|
|
528
519
|
const viewUp = activeCamera.getViewUp();
|
|
@@ -535,18 +526,16 @@ class Viewport {
|
|
|
535
526
|
const idx = [middleIJK[0], middleIJK[1], middleIJK[2]];
|
|
536
527
|
imageData.indexToWorld(idx, focalPoint);
|
|
537
528
|
}
|
|
538
|
-
let widthWorld;
|
|
539
|
-
|
|
540
|
-
const config = getConfiguration();
|
|
541
|
-
const useLegacyMethod = config.rendering?.useLegacyCameraFOV ?? false;
|
|
542
|
-
if (imageData && !useLegacyMethod) {
|
|
543
|
-
const extent = imageData.getExtent();
|
|
529
|
+
let { widthWorld, heightWorld } = this._getWorldDistanceViewUpAndViewRight(bounds, viewUp, viewPlaneNormal);
|
|
530
|
+
if (imageData) {
|
|
544
531
|
const spacing = imageData.getSpacing();
|
|
545
|
-
widthWorld = (
|
|
546
|
-
heightWorld = (
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
532
|
+
widthWorld = Math.max(spacing[0], widthWorld - spacing[0]);
|
|
533
|
+
heightWorld = Math.max(spacing[1], heightWorld - spacing[1]);
|
|
534
|
+
const extent = imageData.getExtent();
|
|
535
|
+
const widthWorld2 = (extent[1] - extent[0]) * spacing[0];
|
|
536
|
+
const heightWorld2 = (extent[3] - extent[2]) * spacing[1];
|
|
537
|
+
console.warn('extent=', extent, spacing);
|
|
538
|
+
console.log('New method would produce:', this.id, widthWorld2, heightWorld2, widthWorld, heightWorld, widthWorld2 - widthWorld, heightWorld2 - heightWorld);
|
|
550
539
|
}
|
|
551
540
|
const canvasSize = [this.sWidth, this.sHeight];
|
|
552
541
|
const boundsAspectRatio = widthWorld / heightWorld;
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.15.
|
|
1
|
+
export declare const version = "4.15.10";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.15.
|
|
1
|
+
export const version = '4.15.10';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.10",
|
|
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": "e86eb206088373c38b7a6d0e9c91bf39250e1eea"
|
|
101
101
|
}
|