@kitware/vtk.js 32.12.1 → 32.12.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.
|
@@ -33,8 +33,8 @@ function vtkCameraSynchronizer(publicAPI, model) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// Update listeners automatically
|
|
36
|
-
model.
|
|
37
|
-
model.
|
|
36
|
+
model._onSrcRendererChanged = updateListeners;
|
|
37
|
+
model._onDstRendererChanged = updateListeners;
|
|
38
38
|
function updatePreviousValues(position, focalPoint, viewUp) {
|
|
39
39
|
if (cameraState[0] !== position[0] || cameraState[1] !== position[1] || cameraState[2] !== position[2] || cameraState[3] !== focalPoint[0] || cameraState[4] !== focalPoint[1] || cameraState[5] !== focalPoint[2] || cameraState[6] !== viewUp[0] || cameraState[7] !== viewUp[1] || cameraState[8] !== viewUp[2]) {
|
|
40
40
|
cameraState[0] = position[0];
|
|
@@ -12,6 +12,14 @@ import { vtkObject } from './../../interfaces';
|
|
|
12
12
|
import { CaptureOn, ViewTypes } from './WidgetManager/Constants';
|
|
13
13
|
import { Nullable } from './../../types';
|
|
14
14
|
|
|
15
|
+
export interface IDisplayScaleParams {
|
|
16
|
+
dispHeightFactor: number;
|
|
17
|
+
cameraPosition: number[];
|
|
18
|
+
cameraDir: number[];
|
|
19
|
+
isParallel: boolean;
|
|
20
|
+
rendererPixelDims: number[];
|
|
21
|
+
}
|
|
22
|
+
|
|
15
23
|
export interface ISelectedData {
|
|
16
24
|
requestCount: number;
|
|
17
25
|
propID: number;
|
|
@@ -45,7 +53,10 @@ export function extractRenderingComponents(
|
|
|
45
53
|
* (vertical) distance that matches a display distance of 30px for a coordinate
|
|
46
54
|
* `coord`, you would compute `30 * getPixelWorldHeightAtCoord(coord)`.
|
|
47
55
|
*/
|
|
48
|
-
export function getPixelWorldHeightAtCoord(
|
|
56
|
+
export function getPixelWorldHeightAtCoord(
|
|
57
|
+
coord: [],
|
|
58
|
+
displayScaleParams: IDisplayScaleParams
|
|
59
|
+
): Number;
|
|
49
60
|
|
|
50
61
|
export interface vtkWidgetManager extends vtkObject {
|
|
51
62
|
/**
|
|
@@ -2,13 +2,7 @@ import vtkDataArray from './../../Common/Core/DataArray';
|
|
|
2
2
|
import vtkPolyData from './../../Common/DataModel/PolyData';
|
|
3
3
|
import { vtkObject } from './../../interfaces';
|
|
4
4
|
import vtkProp from './../../Rendering/Core/Prop';
|
|
5
|
-
|
|
6
|
-
dispHeightFactor: number;
|
|
7
|
-
cameraPosition: number[];
|
|
8
|
-
cameraDir: number[];
|
|
9
|
-
isParallel: boolean;
|
|
10
|
-
rendererPixelDims: number[];
|
|
11
|
-
}
|
|
5
|
+
import { IDisplayScaleParams } from './../Core/WidgetManager';
|
|
12
6
|
|
|
13
7
|
export interface IWidgetRepresentationInitialValues {
|
|
14
8
|
labels?: Array<any>;
|
|
@@ -12,14 +12,7 @@ import vtkRenderer from './../../Rendering/Core/Renderer';
|
|
|
12
12
|
import vtkPlaneManipulator from './../Manipulators/PlaneManipulator';
|
|
13
13
|
import { ViewTypes } from './../Core/WidgetManager/Constants';
|
|
14
14
|
import { Vector2, Vector3 } from './../../types';
|
|
15
|
-
|
|
16
|
-
export interface IDisplayScaleParams {
|
|
17
|
-
dispHeightFactor: number;
|
|
18
|
-
cameraPosition: Vector3;
|
|
19
|
-
cameraDir: Vector3;
|
|
20
|
-
isParallel: false;
|
|
21
|
-
rendererPixelDims: Vector2;
|
|
22
|
-
}
|
|
15
|
+
import { IDisplayScaleParams } from './../Core/WidgetManager';
|
|
23
16
|
|
|
24
17
|
export interface vtkResliceCursorWidget<
|
|
25
18
|
WidgetInstance extends vtkAbstractWidget = vtkResliceCursorWidgetDefaultInstance
|