@cornerstonejs/core 1.26.1 → 1.27.1
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.
- package/dist/cjs/RenderingEngine/VideoViewport.d.ts +1 -1
- package/dist/cjs/RenderingEngine/VideoViewport.js +3 -1
- package/dist/cjs/RenderingEngine/VideoViewport.js.map +1 -1
- package/dist/cjs/RenderingEngine/Viewport.js +1 -1
- package/dist/cjs/RenderingEngine/Viewport.js.map +1 -1
- package/dist/esm/RenderingEngine/VideoViewport.d.ts +1 -1
- package/dist/esm/RenderingEngine/VideoViewport.js +3 -1
- package/dist/esm/RenderingEngine/VideoViewport.js.map +1 -1
- package/dist/esm/RenderingEngine/Viewport.js +3 -3
- package/dist/esm/RenderingEngine/Viewport.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
- package/src/RenderingEngine/VideoViewport.ts +4 -2
- package/src/RenderingEngine/Viewport.ts +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"type": "individual",
|
|
47
47
|
"url": "https://ohif.org/donate"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "792fe769651b4eb9ce685f8df826bab8a88cbad2"
|
|
50
50
|
}
|
|
@@ -18,8 +18,6 @@ import { getOrCreateCanvas } from './helpers';
|
|
|
18
18
|
* looking into an internal scene, and an associated target output `canvas`.
|
|
19
19
|
*/
|
|
20
20
|
class VideoViewport extends Viewport implements IVideoViewport {
|
|
21
|
-
public static readonly useCustomRenderingPipeline = true;
|
|
22
|
-
|
|
23
21
|
// Viewport Data
|
|
24
22
|
readonly uid;
|
|
25
23
|
readonly renderingEngineId: string;
|
|
@@ -61,6 +59,10 @@ class VideoViewport extends Viewport implements IVideoViewport {
|
|
|
61
59
|
this.resize();
|
|
62
60
|
}
|
|
63
61
|
|
|
62
|
+
public static get useCustomRenderingPipeline() {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
64
66
|
private addEventListeners() {
|
|
65
67
|
this.canvas.addEventListener(
|
|
66
68
|
EVENTS.ELEMENT_DISABLED,
|
|
@@ -10,7 +10,13 @@ import Events from '../enums/Events';
|
|
|
10
10
|
import ViewportStatus from '../enums/ViewportStatus';
|
|
11
11
|
import ViewportType from '../enums/ViewportType';
|
|
12
12
|
import renderingEngineCache from './renderingEngineCache';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
triggerEvent,
|
|
15
|
+
planar,
|
|
16
|
+
isImageActor,
|
|
17
|
+
actorIsA,
|
|
18
|
+
isEqual,
|
|
19
|
+
} from '../utilities';
|
|
14
20
|
import hasNaNValues from '../utilities/hasNaNValues';
|
|
15
21
|
import { EPSILON, RENDERING_DEFAULTS } from '../constants';
|
|
16
22
|
import type {
|
|
@@ -1085,8 +1091,10 @@ class Viewport implements IViewport {
|
|
|
1085
1091
|
|
|
1086
1092
|
// update clipping range only if focal point changed of a new actor is added
|
|
1087
1093
|
const prevFocalPoint = previousCamera.focalPoint;
|
|
1094
|
+
|
|
1088
1095
|
if (prevFocalPoint && focalPoint) {
|
|
1089
1096
|
const currentViewPlaneNormal = <Point3>vtkCamera.getViewPlaneNormal();
|
|
1097
|
+
|
|
1090
1098
|
const deltaCamera = <Point3>[
|
|
1091
1099
|
focalPoint[0] - prevFocalPoint[0],
|
|
1092
1100
|
focalPoint[1] - prevFocalPoint[1],
|
|
@@ -1094,7 +1102,7 @@ class Viewport implements IViewport {
|
|
|
1094
1102
|
];
|
|
1095
1103
|
|
|
1096
1104
|
const cameraModifiedOutOfPlane =
|
|
1097
|
-
Math.abs(vtkMath.dot(deltaCamera, currentViewPlaneNormal)) >
|
|
1105
|
+
Math.abs(vtkMath.dot(deltaCamera, currentViewPlaneNormal)) > 0;
|
|
1098
1106
|
|
|
1099
1107
|
// only modify the clipping planes if the camera is modified out of plane
|
|
1100
1108
|
// or a new actor is added and we need to update the clipping planes
|