@cornerstonejs/core 4.15.20 → 4.15.22

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.
@@ -689,10 +689,14 @@ class BaseVolumeViewport extends Viewport {
689
689
  setViewPlane(planeRestriction) {
690
690
  const { point, inPlaneVector1, inPlaneVector2, FrameOfReferenceUID } = planeRestriction;
691
691
  this.setBestOrentation(inPlaneVector1, inPlaneVector2);
692
+ const { focalPoint, viewPlaneNormal } = this.getCamera();
693
+ const deltaFocal = vec3.subtract(vec3.create(), point, focalPoint);
694
+ const alongNormal = vec3.dot(deltaFocal, viewPlaneNormal);
695
+ const deltaNormal = vec3.scaleAndAdd(vec3.create(), focalPoint, viewPlaneNormal, alongNormal);
692
696
  this.setViewReference({
693
697
  FrameOfReferenceUID,
694
- cameraFocalPoint: point,
695
- viewPlaneNormal: this.getCamera().viewPlaneNormal,
698
+ cameraFocalPoint: deltaNormal,
699
+ viewPlaneNormal: viewPlaneNormal,
696
700
  });
697
701
  }
698
702
  setViewReference(viewRef) {
@@ -1 +1 @@
1
- export declare const version = "4.15.20";
1
+ export declare const version = "4.15.22";
@@ -1 +1 @@
1
- export const version = '4.15.20';
1
+ export const version = '4.15.22';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "4.15.20",
3
+ "version": "4.15.22",
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": "35cc5f2d8ba3cb1c15abd8cf81231bf13ffaefb0"
100
+ "gitHead": "e9bb7913c2d23b019076b5164a973ae13357fecb"
101
101
  }