@kitware/vtk.js 26.3.1 → 26.4.0

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.
Files changed (46) hide show
  1. package/Common/DataModel/Collection.d.ts +118 -0
  2. package/Common/DataModel/Collection.js +113 -0
  3. package/Interaction/Manipulators/CompositeCameraManipulator.d.ts +68 -0
  4. package/Interaction/Manipulators/CompositeGestureManipulator.d.ts +168 -0
  5. package/Interaction/Manipulators/CompositeKeyboardManipulator.d.ts +48 -0
  6. package/Interaction/Manipulators/CompositeMouseManipulator.d.ts +149 -0
  7. package/Interaction/Manipulators/CompositeVRManipulator.d.ts +44 -0
  8. package/Interaction/Manipulators/GestureCameraManipulator.d.ts +34 -0
  9. package/Interaction/Manipulators/MouseBoxSelectorManipulator.d.ts +88 -0
  10. package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.d.ts +32 -0
  11. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.d.ts +33 -0
  12. package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.d.ts +33 -0
  13. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.d.ts +67 -0
  14. package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.d.ts +45 -0
  15. package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.d.ts +26 -0
  16. package/Interaction/Manipulators/MouseRangeManipulator.d.ts +53 -0
  17. package/Interaction/Style/InteractorStyleManipulator.d.ts +333 -0
  18. package/Proxy/Core/AbstractRepresentationProxy.d.ts +24 -0
  19. package/Proxy/Core/LookupTableProxy.d.ts +45 -0
  20. package/Proxy/Core/PiecewiseFunctionProxy.d.ts +62 -0
  21. package/Proxy/Core/ProxyManager.d.ts +81 -0
  22. package/Proxy/Core/SourceProxy.d.ts +22 -0
  23. package/Proxy/Core/View2DProxy.d.ts +7 -0
  24. package/Proxy/Core/ViewProxy.d.ts +86 -0
  25. package/Proxy/Representations/SliceRepresentationProxy.d.ts +27 -0
  26. package/Proxy/Representations/VolumeRepresentationProxy.d.ts +44 -0
  27. package/Rendering/Core/AbstractImageMapper/helper.js +127 -0
  28. package/Rendering/Core/AbstractImageMapper.d.ts +82 -0
  29. package/Rendering/Core/AbstractImageMapper.js +42 -0
  30. package/Rendering/Core/CellPicker.js +1 -1
  31. package/Rendering/Core/ImageArrayMapper.d.ts +252 -0
  32. package/Rendering/Core/ImageArrayMapper.js +242 -0
  33. package/Rendering/Core/ImageMapper.d.ts +5 -35
  34. package/Rendering/Core/ImageMapper.js +16 -108
  35. package/Rendering/Core/InteractorStyle/Constants.d.ts +16 -0
  36. package/Rendering/Core/InteractorStyle.d.ts +229 -0
  37. package/Rendering/Core/PointPicker.js +1 -1
  38. package/Rendering/OpenGL/CellArrayBufferObject.js +1 -1
  39. package/Rendering/OpenGL/ImageMapper.js +13 -7
  40. package/Rendering/OpenGL/PolyDataMapper.js +8 -7
  41. package/Rendering/OpenGL/RenderWindow.d.ts +8 -1
  42. package/Rendering/OpenGL/RenderWindow.js +3 -2
  43. package/Rendering/OpenGL/Texture.js +13 -12
  44. package/Widgets/Core/StateBuilder.d.ts +29 -0
  45. package/index.d.ts +30 -0
  46. package/package.json +1 -1
@@ -0,0 +1,333 @@
1
+ import vtkCompositeGestureManipulator from './../Manipulators/CompositeGestureManipulator';
2
+ import vtkCompositeKeyboardManipulator from './../Manipulators/CompositeKeyboardManipulator';
3
+ import vtkCompositeMouseManipulator from './../Manipulators/CompositeMouseManipulator';
4
+ import vtkCompositeVRManipulator from './../Manipulators/CompositeVRManipulator';
5
+ import vtkInteractorStyle from './../../Rendering/Core/InteractorStyle';
6
+ import {
7
+ Device,
8
+ Input,
9
+ } from './../../Rendering/Core/RenderWindowInteractor/Constants';
10
+ import { Nullable, Vector3 } from './../../types';
11
+
12
+ export interface vtkInteractorStyleManipulator extends vtkInteractorStyle {
13
+ /**
14
+ * Remove all manipulators.
15
+ */
16
+ removeAllManipulators(): void;
17
+
18
+ /**
19
+ * Remove mouse manipulators.
20
+ */
21
+ removeAllMouseManipulators(): void;
22
+
23
+ /**
24
+ * Remove keyboard manipulators.
25
+ */
26
+ removeAllKeyboardManipulators(): void;
27
+
28
+ /**
29
+ * Remove VR manipulators.
30
+ */
31
+ removeAllVRManipulators(): void;
32
+
33
+ /**
34
+ * Remove gesture manipulators.
35
+ */
36
+ removeAllGestureManipulators(): void;
37
+
38
+ /**
39
+ * Adds a mouse manipulator.
40
+ * @param manipulator the manipulator to add
41
+ * @returns whether the manipulator has been added
42
+ */
43
+ addMouseManipulator(manipulator: vtkCompositeMouseManipulator): boolean;
44
+
45
+ /**
46
+ * Adds a keyboard manipulator.
47
+ * @param manipulator the manipulator to add
48
+ * @returns whether the manipulator has been added
49
+ */
50
+ addKeyboardManipulator(manipulator: vtkCompositeKeyboardManipulator): boolean;
51
+
52
+ /**
53
+ * Adds a VR manipulator.
54
+ * @param manipulator the manipulator to add
55
+ * @returns whether the manipulator has been added
56
+ */
57
+ addVRManipulator(manipulator: vtkCompositeVRManipulator): boolean;
58
+
59
+ /**
60
+ * Adds a gesture manipulator.
61
+ * @param manipulator the manipulator to add
62
+ * @returns whether the manipulator has been added
63
+ */
64
+ addGestureManipulator(manipulator: vtkCompositeGestureManipulator): boolean;
65
+
66
+ /**
67
+ * Removes a mouse manipulator.
68
+ * @param manipulator the manipulator to remove
69
+ */
70
+ removeMouseManipulator(manipulator: vtkCompositeMouseManipulator): void;
71
+
72
+ /**
73
+ * Removes a keyboard manipulator.
74
+ * @param manipulator the manipulator to remove
75
+ */
76
+ removeKeyboardManipulator(manipulator: vtkCompositeKeyboardManipulator): void;
77
+
78
+ /**
79
+ * Removes a VR manipulator.
80
+ * @param manipulator the manipulator to remove
81
+ */
82
+ removeVRManipulator(manipulator: vtkCompositeVRManipulator): void;
83
+
84
+ /**
85
+ * Removes a gesture manipulator.
86
+ * @param manipulator the manipulator to remove
87
+ */
88
+ removeGestureManipulator(manipulator: vtkCompositeGestureManipulator): void;
89
+
90
+ /**
91
+ * Gets the number of mouse manipulators.
92
+ */
93
+ getNumberOfMouseManipulators(): number;
94
+
95
+ /**
96
+ * Gets the number of keyboard manipulators.
97
+ */
98
+ getNumberOfKeyboardManipulators(): number;
99
+
100
+ /**
101
+ * Gets the number of VR manipulators.
102
+ */
103
+ getNumberOfVRManipulators(): number;
104
+
105
+ /**
106
+ * Gets the number of gesture manipulators.
107
+ */
108
+ getNumberOfGestureManipulators(): number;
109
+
110
+ /**
111
+ * Resets/clears the current manipulator.
112
+ */
113
+ resetCurrentManipulator(): void;
114
+
115
+ /**
116
+ * Finds a mouse manipulator with a given control set.
117
+ * @param button which button
118
+ * @param shift shift enabled
119
+ * @param scroll scroll enabled
120
+ * @param alt alt enabled
121
+ */
122
+ findMouseManipulator(
123
+ button: number,
124
+ shift: boolean,
125
+ scroll: boolean,
126
+ alt: boolean
127
+ ): Nullable<vtkCompositeMouseManipulator>;
128
+
129
+ /**
130
+ * Finds a VR manipulator with a given device + input.
131
+ * @param device
132
+ * @param input
133
+ */
134
+ findVRManipulator(
135
+ device: Device,
136
+ input: Input
137
+ ): Nullable<vtkCompositeVRManipulator>;
138
+
139
+ /**
140
+ * Handles a left button press event.
141
+ * @param callData event data
142
+ */
143
+ handleLeftButtonPress(callData: unknown): void;
144
+
145
+ /**
146
+ * Handles a middle button press event.
147
+ * @param callData event data
148
+ */
149
+ handleMiddleButtonPress(callData: unknown): void;
150
+
151
+ /**
152
+ * Handles a right button press event.
153
+ * @param callData event data
154
+ */
155
+ handleRightButtonPress(callData: unknown): void;
156
+
157
+ /**
158
+ * Handles a left button release event.
159
+ * @param callData event data
160
+ */
161
+ handleLeftButtonRelease(callData: unknown): void;
162
+
163
+ /**
164
+ * Handles a middle button release event.
165
+ * @param callData event data
166
+ */
167
+ handleMiddleButtonRelease(callData: unknown): void;
168
+
169
+ /**
170
+ * Handles a right button release event.
171
+ * @param callData event data
172
+ */
173
+ handleRightButtonRelease(callData: unknown): void;
174
+
175
+ /**
176
+ * Handles the start of a wheel event.
177
+ * @param callData event data
178
+ */
179
+ handleStartMouseWheel(callData: unknown): void;
180
+
181
+ /**
182
+ * Handles a wheel event.
183
+ * @param callData event data
184
+ */
185
+ handleMouseWheel(callData: unknown): void;
186
+
187
+ /**
188
+ * Handles the end of a wheel event.
189
+ * @param callData event data
190
+ */
191
+ handleEndMouseWheel(callData: unknown): void;
192
+
193
+ /**
194
+ * Handles a mouse move.
195
+ * @param callData event data
196
+ */
197
+ handleMouseMove(callData: unknown): void;
198
+
199
+ /**
200
+ * Handles a 3D button event.
201
+ * @param callData event data
202
+ */
203
+ handleButton3D(ed: unknown): void;
204
+
205
+ /**
206
+ * Handles a 3D move event.
207
+ * @param ed event data
208
+ */
209
+ handleMove3D(ed: unknown): void;
210
+
211
+ /**
212
+ * Handles a keypress.
213
+ * @param callData event data
214
+ */
215
+ handleKeyPress(callData: unknown): void;
216
+
217
+ /**
218
+ * Handles a keydown event.
219
+ * @param callData event data
220
+ */
221
+ handleKeyDown(callData: unknown): void;
222
+
223
+ /**
224
+ * Handles a keyup event.
225
+ * @param callData event data
226
+ */
227
+ handleKeyUp(callData: unknown): void;
228
+
229
+ /**
230
+ * Handles the start of a pinch gesture.
231
+ * @param callData event data
232
+ */
233
+ handleStartPinch(callData: unknown): void;
234
+
235
+ /**
236
+ * Handles the end of a pinch gesture.
237
+ * @param callData event data
238
+ */
239
+ handleEndPinch(callData: unknown): void;
240
+
241
+ /**
242
+ * Handles the start of a rotate gesture.
243
+ * @param callData event data
244
+ */
245
+ handleStartRotate(callData: unknown): void;
246
+
247
+ /**
248
+ * Handles the end of a rotate gesture.
249
+ * @param callData event data
250
+ */
251
+ handleEndRotate(callData: unknown): void;
252
+
253
+ /**
254
+ * Handles the start of a pan gesture.
255
+ * @param callData event data
256
+ */
257
+ handleStartPan(callData: unknown): void;
258
+
259
+ /**
260
+ * Handles the end of a pan gesture.
261
+ * @param callData event data
262
+ */
263
+ handleEndPan(callData: unknown): void;
264
+
265
+ /**
266
+ * Handles a pinch gesture.
267
+ * @param callData event data
268
+ */
269
+ handlePinch(callData: unknown): void;
270
+
271
+ /**
272
+ * Handles a rotate gesture.
273
+ * @param callData event data
274
+ */
275
+ handleRotate(callData: unknown): void;
276
+
277
+ /**
278
+ * Handles a pan gesture.
279
+ * @param callData event data
280
+ */
281
+ handlePan(callData: unknown): void;
282
+
283
+ /**
284
+ * Handles a button down event.
285
+ * @param button which button
286
+ * @param callData event data
287
+ */
288
+ onButtonDown(button: number, callData: unknown): void;
289
+
290
+ /**
291
+ * Handles a button up event.
292
+ * @param button which button
293
+ */
294
+ onButtonUp(button: number): void;
295
+
296
+ /**
297
+ * Sets the rotation factor.
298
+ * @param factor rotation factor
299
+ */
300
+ setRotationFactor(factor: number): boolean;
301
+
302
+ /**
303
+ * Gets the rotation factor.
304
+ */
305
+ getRotationFactor(): number;
306
+
307
+ getMouseManipulators(): vtkCompositeMouseManipulator[];
308
+ getMouseManipulators(): vtkCompositeMouseManipulator[];
309
+ getMouseManipulators(): vtkCompositeMouseManipulator[];
310
+ getMouseManipulators(): vtkCompositeMouseManipulator[];
311
+ }
312
+
313
+ export interface IInteractorStyleManipulatorInitialValues {
314
+ centerOfRotation?: Vector3;
315
+ rotationFactor?: number;
316
+ }
317
+
318
+ export function newInstance(
319
+ initialValues?: IInteractorStyleManipulatorInitialValues
320
+ ): vtkInteractorStyleManipulator;
321
+
322
+ export function extend(
323
+ publicAPI: object,
324
+ model: object,
325
+ initialValues?: IInteractorStyleManipulatorInitialValues
326
+ ): void;
327
+
328
+ export const vtkInteractorStyleManipulator: {
329
+ newInstance: typeof newInstance;
330
+ extend: typeof extend;
331
+ };
332
+
333
+ export default vtkInteractorStyleManipulator;
@@ -0,0 +1,24 @@
1
+ import { vtkObject } from './../../interfaces';
2
+ import { VtkProxy } from './../../macros';
3
+ import vtkSourceProxy from './SourceProxy';
4
+ import vtkAbstractMapper from './../../Rendering/Core/AbstractMapper';
5
+ import vtkActor from './../../Rendering/Core/Actor';
6
+ import vtkVolume from './../../Rendering/Core/Volume';
7
+
8
+ export interface vtkAbstractRepresentationProxy extends VtkProxy {
9
+ setInput<T>(source: vtkSourceProxy<T>): void;
10
+ getInputDataSet(): vtkObject | null;
11
+ setColorBy(
12
+ arrayName: string | null,
13
+ arrayLocation: string,
14
+ componentIndex: number
15
+ );
16
+ setRescaleOnColorBy(rescale: boolean): boolean;
17
+ getRescaleOnColorBy(): boolean;
18
+ getInput(): VtkProxy;
19
+ getMapper(): vtkAbstractMapper;
20
+ getActors(): vtkActor[];
21
+ getVolumes(): vtkVolume[];
22
+ }
23
+
24
+ export default vtkAbstractRepresentationProxy;
@@ -0,0 +1,45 @@
1
+ import { VtkProxy } from './../../macros';
2
+ import vtkColorTransferFunction from './../../Rendering/Core/ColorTransferFunction';
3
+
4
+ // [x, r/h, g/s, b/v, m=0.5, s=0.0]
5
+ export type RGBHSVPoint = [number, number, number, number, number?, number?];
6
+
7
+ export enum ILookupTableProxyMode {
8
+ Preset = 0,
9
+ RGBPoints = 1,
10
+ HSVPoints = 2,
11
+ Nodes = 3,
12
+ }
13
+
14
+ export interface vtkLookupTableProxy extends VtkProxy {
15
+ setPresetName(name: string): void;
16
+ getPresetName(): string;
17
+ setRGBPoints(points: RGBHSVPoint[]): void;
18
+ getRGBPoints(): RGBHSVPoint[];
19
+ setHSVPoints(points: RGBHSVPoint[]): void;
20
+ getHSVPoints(): RGBHSVPoint[];
21
+ // Node: { x, y, midpoint, sharpness }
22
+ setNodes(nodes: number[][]): void;
23
+ getNodes(nodes): number[][];
24
+ setMode(mode: number): void;
25
+ getMode(): number;
26
+ applyMode(): void;
27
+ setDataRange(min: number, max: number): void;
28
+ getDataRange(): [number, number];
29
+ getLookupTable(): vtkColorTransferFunction;
30
+ }
31
+
32
+ export interface ILookupTableProxyInitialValues {
33
+ lookupTable?: vtkColorTransferFunction;
34
+ }
35
+
36
+ export function newInstance(
37
+ initialValues?: ILookupTableProxyInitialValues
38
+ ): vtkLookupTableProxy;
39
+
40
+ export declare const vtkLookupTableProxy: {
41
+ newInstance: typeof newInstance;
42
+ Mode: ILookupTableProxyMode;
43
+ };
44
+
45
+ export default vtkLookupTableProxy;
@@ -0,0 +1,62 @@
1
+ import vtkLookupTableProxy from './LookupTableProxy';
2
+ import vtkPiecewiseFunction from './../../Common/DataModel/PiecewiseFunction';
3
+ import { VtkProxy } from './../../macros';
4
+
5
+ // [x, r/h, g/s, b/v, m=0.5, s=0.0]
6
+ export interface PiecewiseGaussian {
7
+ position: number;
8
+ height: number;
9
+ width: number;
10
+ xBias: number;
11
+ yBias: number;
12
+ }
13
+
14
+ export interface PiecewiseNode {
15
+ x: number;
16
+ y: number;
17
+ midpoint: number;
18
+ sharpness: number;
19
+ }
20
+
21
+ export enum IPiecewiseFunctionProxyMode {
22
+ Gaussians = 0,
23
+ Points = 1,
24
+ Nodes = 2,
25
+ }
26
+
27
+ export interface IPiecewiseFunctionProxyDefaults {
28
+ Gaussians: PiecewiseGaussian[];
29
+ Points: number[][];
30
+ Nodes: PiecewiseNode[];
31
+ }
32
+
33
+ export interface vtkPiecewiseFunctionProxy extends VtkProxy {
34
+ setGaussians(gaussians: PiecewiseGaussian[]): void;
35
+ getGaussians(): PiecewiseGaussian[];
36
+ setPoints(points: number[][]): void;
37
+ getPoints(): number[][];
38
+ setNodes(nodes: PiecewiseNode[]): void;
39
+ getNodes(): PiecewiseNode[];
40
+ setMode(mode: number): void;
41
+ getMode(): number;
42
+ applyMode(): void;
43
+ getLookupTableProxy(): vtkLookupTableProxy;
44
+ setDataRange(min: number, max: number): void;
45
+ getDataRange(): [number, number];
46
+ getPiecewiseFunction(): vtkPiecewiseFunction;
47
+ }
48
+
49
+ export interface IPiecewiseFunctionProxyInitialValues {
50
+ piecewiseFunction?: vtkPiecewiseFunction;
51
+ }
52
+
53
+ export function newInstance(
54
+ initialValues?: IPiecewiseFunctionProxyInitialValues
55
+ ): vtkPiecewiseFunctionProxy;
56
+
57
+ export declare const vtkPiecewiseFunctionProxy: {
58
+ newInstance: typeof newInstance;
59
+ Mode: typeof IPiecewiseFunctionProxyMode;
60
+ Defaults: IPiecewiseFunctionProxyDefaults;
61
+ };
62
+ export default vtkPiecewiseFunctionProxy;
@@ -0,0 +1,81 @@
1
+ import { vtkObject } from './../../interfaces';
2
+ import vtkSourceProxy from './SourceProxy';
3
+ import vtkViewProxy from './ViewProxy';
4
+ import vtkAbstractRepresentationProxy from './AbstractRepresentationProxy';
5
+ import vtkLookupTableProxy from './LookupTableProxy';
6
+ import vtkPiecewiseFunctionProxy from './PiecewiseFunctionProxy';
7
+ import { VtkProxy } from './../../macros';
8
+
9
+ export type ProxyConfiguration = Object;
10
+
11
+ export interface ProxyRegistrationChangeInfo {
12
+ action: 'register' | 'unregister';
13
+ proxyId: string;
14
+ proxyName: string;
15
+ proxyGroup: string;
16
+ proxy: VtkProxy;
17
+ }
18
+
19
+ export interface vtkProxyManager extends vtkObject {
20
+ // core //
21
+
22
+ setProxyConfiguration(config: ProxyConfiguration): boolean;
23
+ getProxyConfiguration(): ProxyConfiguration;
24
+
25
+ setActiveSource<T>(sourceProxy: vtkSourceProxy<T>): boolean;
26
+ getActiveSource<T>(): vtkSourceProxy<T>;
27
+
28
+ setActiveView(viewProxy: vtkViewProxy): boolean;
29
+ getActiveView(): vtkViewProxy;
30
+
31
+ onProxyRegistrationChange(
32
+ callback: (changeInfo: ProxyRegistrationChangeInfo) => void
33
+ );
34
+
35
+ getProxyById<T extends VtkProxy>(id: string): T | undefined;
36
+ getProxyGroups(): string[];
37
+ getProxyInGroup(groupName: string): VtkProxy[];
38
+
39
+ getSources(): vtkSourceProxy<any>[];
40
+ getRepresentations(): vtkAbstractRepresentationProxy[];
41
+ getViews(): vtkViewProxy[];
42
+
43
+ createProxy<T extends VtkProxy>(
44
+ group: string,
45
+ name: string,
46
+ options?: Object
47
+ ): T;
48
+
49
+ getRepresentation<T extends vtkAbstractRepresentationProxy>(
50
+ source: vtkSourceProxy<any>,
51
+ view: vtkViewProxy
52
+ ): T | null;
53
+
54
+ deleteProxy(proxy: VtkProxy): void;
55
+
56
+ // view //
57
+
58
+ render(view?: vtkViewProxy): void;
59
+ renderAllViews(): void;
60
+ setAnimationOnAllViews(): void;
61
+ autoAnimateViews(debounceTimeout: number): void;
62
+ resizeAllViews(): void;
63
+ resetCamera(view?: vtkViewProxy): void;
64
+ createRepresentationInAllViews(source: vtkSourceProxy<any>): void;
65
+ resetCameraInAllViews(): void;
66
+
67
+ // properties //
68
+
69
+ // these are specific to the proxy configuration...
70
+ getLookupTable(arrayName: string, options?: any): vtkLookupTableProxy;
71
+ getPiecewiseFunction(
72
+ arrayName: string,
73
+ options?: any
74
+ ): vtkPiecewiseFunctionProxy;
75
+ rescaleTransferFunctionToDataRange(
76
+ arrayName: string,
77
+ dataRange: [number, number]
78
+ ): void;
79
+ }
80
+
81
+ export default vtkProxyManager;
@@ -0,0 +1,22 @@
1
+ import { vtkAlgorithm } from './../../interfaces';
2
+ import { VtkProxy } from './../../macros';
3
+
4
+ export interface vtkSourceProxy<T> extends VtkProxy {
5
+ setInputProxy(source: vtkSourceProxy<T>): void;
6
+ setInputData(dataset: T, type?: string): void;
7
+ setInputAlgorithm(
8
+ algo: vtkAlgorithm,
9
+ type: string,
10
+ autoUpdate: boolean
11
+ ): void;
12
+ update(): void;
13
+
14
+ getName(): string;
15
+ setName(name: string): boolean;
16
+ getType(): string;
17
+ getDataset(): T | null;
18
+ getAlgo(): vtkAlgorithm | null;
19
+ getInputProxy(): vtkSourceProxy<T> | null;
20
+ }
21
+
22
+ export default vtkSourceProxy;
@@ -0,0 +1,7 @@
1
+ import vtkViewProxy from './ViewProxy';
2
+
3
+ export interface vtkView2DProxy extends vtkViewProxy {
4
+ getAxis(): number;
5
+ }
6
+
7
+ export default vtkView2DProxy;
@@ -0,0 +1,86 @@
1
+ import vtkActor from './../../Rendering/Core/Actor';
2
+ import vtkAbstractRepresentationProxy from './AbstractRepresentationProxy';
3
+ import { Vector3, Vector4 } from './../../types';
4
+ import vtkCamera from './../../Rendering/Core/Camera';
5
+ import vtkRenderWindowInteractor from './../../Rendering/Core/RenderWindowInteractor';
6
+ import vtkInteractorStyle from './../../Rendering/Core/InteractorStyle';
7
+ import { vtkSubscription, vtkObject } from './../../interfaces';
8
+ import vtkRenderer from './../../Rendering/Core/Renderer';
9
+ import vtkRenderWindow from './../../Rendering/Core/RenderWindow';
10
+ import vtkOpenGLRenderWindow from './../../Rendering/OpenGL/RenderWindow';
11
+ import { VtkProxy } from './../../macros';
12
+
13
+ export interface vtkViewProxy extends VtkProxy {
14
+ setPresetToInteractor3D(nameOrDefinitions: string | Object): boolean;
15
+ setPresetToInteractor2D(nameOrDefinitions: string | Object): boolean;
16
+
17
+ setOrientationAxesType(type: string): void;
18
+ setOrientationAxesVisibility(visible: boolean): boolean;
19
+ registerOrientationAxis(name: string, actor: vtkActor): void;
20
+ unregisterOrientationAxis(name: string): void;
21
+ listOrientationAxis(): string[];
22
+ setPresetToOrientationAxes(nameOrDefinitions: string | Object): boolean;
23
+
24
+ setContainer(container: HTMLElement | null): void;
25
+ resize(): void;
26
+ renderLater(): void;
27
+ render(blocking: boolean): void;
28
+ resetCamera(): void;
29
+
30
+ addRepresentation(representation: vtkAbstractRepresentationProxy): void;
31
+ removeRepresentation(representation: vtkAbstractRepresentationProxy): void;
32
+
33
+ // TODO correct?
34
+ captureImage(opts: { format: string } & Object): Array<Promise<string>>;
35
+ openCaptureImage(target: string): void;
36
+
37
+ // TODO corner annotations
38
+
39
+ setBackground(color: Vector3 | Vector4): void;
40
+ getBackground(): Vector3 | Vector4;
41
+
42
+ setAnimation(enable: boolean, requester?: vtkObject);
43
+
44
+ updateOrientation(
45
+ axisIndex: 0 | 1 | 2,
46
+ orientation: -1 | 1,
47
+ viewUp: Vector3,
48
+ animateSteps: number
49
+ ): Promise<void>;
50
+ moveCamera(
51
+ focalPoint: Vector3,
52
+ position: Vector3,
53
+ viewUp: Vector3,
54
+ animateSteps: number
55
+ ): Promise<void>;
56
+
57
+ resetOrientation(animateSteps: number): void;
58
+ rotate(angle): void;
59
+
60
+ focusTo(focalPoint: Vector3): void;
61
+
62
+ getCamera(): vtkCamera;
63
+ // getAnnotationOpacity
64
+ getContainer(): HTMLElement | null;
65
+ // getCornerAnnotation
66
+ getInteractor(): vtkRenderWindowInteractor;
67
+ getInteractorStyle2D(): vtkInteractorStyle;
68
+ getInteractorStyle3D(): vtkInteractorStyle;
69
+ getOpenglRenderWindow(): vtkOpenGLRenderWindow;
70
+ getOrientationAxesType(): string;
71
+ getPresetToOrientationAxes(): any;
72
+ getRenderer(): vtkRenderer;
73
+ getRenderWindow(): vtkRenderWindow;
74
+ getRepresentations(): vtkAbstractRepresentationProxy[];
75
+ getUseParallelRendering(): boolean;
76
+ getDisableAnimation(): boolean;
77
+ setDisableAnimation(disabled: boolean): boolean;
78
+
79
+ onResize(
80
+ cb: (size: { width: number; height: number }) => void
81
+ ): vtkSubscription;
82
+
83
+ // TODO proxy property mappings
84
+ }
85
+
86
+ export default vtkViewProxy;
@@ -0,0 +1,27 @@
1
+ import vtkAbstractRepresentationProxy from './../Core/AbstractRepresentationProxy';
2
+
3
+ export interface vtkSliceRepresentationProxy
4
+ extends vtkAbstractRepresentationProxy {
5
+ /**
6
+ * @param mode XYZIJK
7
+ */
8
+ setSlicingMode(mode: string): boolean;
9
+ getSlicingMode(): string;
10
+ getSliceIndex(): number;
11
+ getAnnotations(): any;
12
+
13
+ // proxy property mappings
14
+
15
+ setVisibility(visible: boolean): boolean;
16
+ getVisibility(): boolean;
17
+ setWindowWidth(width: number): boolean;
18
+ getWindowWidth(): number;
19
+ setWindowLevel(level: number): boolean;
20
+ getWindowLevel(): number;
21
+ setInterpolationType(type: number): boolean;
22
+ getInterpolationType(): number;
23
+ setSlice(type: number): boolean;
24
+ getSlice(): number;
25
+ }
26
+
27
+ export default vtkSliceRepresentationProxy;