@cornerstonejs/core 3.5.0 → 3.5.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.
|
@@ -67,7 +67,7 @@ declare abstract class BaseVolumeViewport extends Viewport {
|
|
|
67
67
|
setCamera(cameraInterface: ICamera, storeAsInitialCamera?: boolean): void;
|
|
68
68
|
private _setVolumeActors;
|
|
69
69
|
canvasToWorld: (canvasPos: Point2) => Point3;
|
|
70
|
-
|
|
70
|
+
getVtkDisplayCoords: (canvasPos: Point2) => Point3;
|
|
71
71
|
worldToCanvas: (worldPos: Point3) => Point2;
|
|
72
72
|
hasImageURI: (imageURI: string) => boolean;
|
|
73
73
|
protected _getOrientationVectors(orientation: OrientationAxis | OrientationVectors): OrientationVectors;
|
|
@@ -151,14 +151,14 @@ class BaseVolumeViewport extends Viewport {
|
|
|
151
151
|
const vtkCamera = this.getVtkActiveCamera();
|
|
152
152
|
vtkCamera.setIsPerformingCoordinateTransformation?.(true);
|
|
153
153
|
const renderer = this.getRenderer();
|
|
154
|
-
const displayCoords = this.
|
|
154
|
+
const displayCoords = this.getVtkDisplayCoords(canvasPos);
|
|
155
155
|
const offscreenMultiRenderWindow = this.getRenderingEngine().offscreenMultiRenderWindow;
|
|
156
156
|
const openGLRenderWindow = offscreenMultiRenderWindow.getOpenGLRenderWindow();
|
|
157
157
|
const worldCoord = openGLRenderWindow.displayToWorld(displayCoords[0], displayCoords[1], displayCoords[2], renderer);
|
|
158
158
|
vtkCamera.setIsPerformingCoordinateTransformation?.(false);
|
|
159
159
|
return [worldCoord[0], worldCoord[1], worldCoord[2]];
|
|
160
160
|
};
|
|
161
|
-
this.
|
|
161
|
+
this.getVtkDisplayCoords = (canvasPos) => {
|
|
162
162
|
const devicePixelRatio = window.devicePixelRatio || 1;
|
|
163
163
|
const canvasPosWithDPR = [
|
|
164
164
|
canvasPos[0] * devicePixelRatio,
|
|
@@ -519,6 +519,7 @@ class BaseVolumeViewport extends Viewport {
|
|
|
519
519
|
focalPoint: newFocalPoint,
|
|
520
520
|
position: newPosition,
|
|
521
521
|
});
|
|
522
|
+
this.render();
|
|
522
523
|
}
|
|
523
524
|
setViewReference(viewRef) {
|
|
524
525
|
if (!viewRef) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "Cornerstone3D Core",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"type": "individual",
|
|
83
83
|
"url": "https://ohif.org/donate"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "bbf8e8efa2b12e573cfceb501930dbb07e30ff32"
|
|
86
86
|
}
|