@kitware/vtk.js 23.4.2 → 23.4.4

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 (180) hide show
  1. package/Common/Core/Math/Constants.js +12 -0
  2. package/Common/Core/Math/index.js +1 -1
  3. package/Common/Core/Math.js +1 -1
  4. package/Common/Core/ScalarsToColors/Constants.d.ts +18 -0
  5. package/Common/DataModel/AbstractPointLocator.d.ts +54 -0
  6. package/Common/DataModel/AbstractPointLocator.js +40 -0
  7. package/Common/DataModel/BoundingBox.d.ts +659 -0
  8. package/Common/DataModel/Collection.d.ts +118 -0
  9. package/Common/DataModel/Collection.js +113 -0
  10. package/Common/DataModel/DataSet/Constants.d.ts +27 -0
  11. package/Common/DataModel/EdgeLocator.d.ts +79 -0
  12. package/Common/DataModel/EdgeLocator.js +85 -0
  13. package/Common/DataModel/ITKHelper.d.ts +54 -0
  14. package/Common/DataModel/IncrementalOctreeNode.d.ts +297 -0
  15. package/Common/DataModel/IncrementalOctreeNode.js +640 -0
  16. package/Common/DataModel/IncrementalOctreePointLocator.d.ts +61 -0
  17. package/Common/DataModel/IncrementalOctreePointLocator.js +398 -0
  18. package/Common/DataModel/Locator.d.ts +43 -0
  19. package/Common/DataModel/Locator.js +37 -0
  20. package/Common/DataModel/Plane.js +1 -1
  21. package/Common/DataModel/PolyData/Constants.d.ts +6 -0
  22. package/Common/DataModel/PolyLine.d.ts +63 -0
  23. package/Common/DataModel/PolyLine.js +77 -0
  24. package/Common/DataModel/Polygon/Constants.js +12 -0
  25. package/Common/DataModel/Polygon.js +1 -1
  26. package/Common/DataModel/Quad/Constants.js +9 -0
  27. package/Common/DataModel/Quad.d.ts +91 -0
  28. package/Common/DataModel/Quad.js +235 -0
  29. package/Common/DataModel/SelectionNode/Constants.d.ts +27 -0
  30. package/Common/DataModel/Spline1D/Constants.js +17 -0
  31. package/Common/DataModel/Spline3D/Constants.d.ts +9 -0
  32. package/Common/Transform/Transform.js +51 -0
  33. package/Filters/Core/PolyDataNormals.js +124 -0
  34. package/Filters/General/ClipClosedSurface/Constants.js +10 -0
  35. package/Filters/General/ClipClosedSurface.d.ts +95 -0
  36. package/Filters/General/ClipClosedSurface.js +972 -0
  37. package/Filters/General/ContourTriangulator/Constants.js +6 -0
  38. package/Filters/General/ContourTriangulator/helper.js +1951 -0
  39. package/Filters/General/ContourTriangulator.d.ts +136 -0
  40. package/Filters/General/ContourTriangulator.js +202 -0
  41. package/Filters/General/ImageMarchingCubes.js +1 -1
  42. package/Filters/General/MoleculeToRepresentation.js +1 -1
  43. package/Filters/General/OBBTree/OBBNode.js +82 -0
  44. package/Filters/General/OBBTree/helper.js +92 -0
  45. package/Filters/General/OBBTree.js +1243 -0
  46. package/Filters/General/TubeFilter.js +1 -1
  47. package/Filters/Sources/LineSource.js +1 -1
  48. package/Filters/Sources/PlaneSource.js +1 -1
  49. package/Filters/Texture/TextureMapToPlane.js +1 -1
  50. package/Interaction/Manipulators/CompositeCameraManipulator.d.ts +68 -0
  51. package/Interaction/Manipulators/CompositeGestureManipulator.d.ts +168 -0
  52. package/Interaction/Manipulators/CompositeKeyboardManipulator.d.ts +48 -0
  53. package/Interaction/Manipulators/CompositeMouseManipulator.d.ts +149 -0
  54. package/Interaction/Manipulators/CompositeVRManipulator.d.ts +44 -0
  55. package/Interaction/Manipulators/GestureCameraManipulator.d.ts +34 -0
  56. package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -1
  57. package/Interaction/Manipulators/MouseBoxSelectorManipulator.d.ts +88 -0
  58. package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -1
  59. package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.d.ts +32 -0
  60. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.d.ts +33 -0
  61. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -1
  62. package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.d.ts +33 -0
  63. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.d.ts +67 -0
  64. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
  65. package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.d.ts +45 -0
  66. package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.d.ts +26 -0
  67. package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
  68. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
  69. package/Interaction/Manipulators/MouseRangeManipulator.d.ts +53 -0
  70. package/Interaction/Style/InteractorStyleImage.d.ts +107 -0
  71. package/Interaction/Style/InteractorStyleMPRSlice.js +1 -1
  72. package/Interaction/Style/InteractorStyleManipulator.d.ts +348 -0
  73. package/Interaction/Style/InteractorStyleTrackballCamera.d.ts +170 -0
  74. package/Interaction/Widgets/ImageCroppingRegionsWidget.js +1 -1
  75. package/Interaction/Widgets/LabelRepresentation.js +1 -1
  76. package/Interaction/Widgets/OrientationMarkerWidget/Constants.d.ts +11 -0
  77. package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +1 -1
  78. package/Interaction/Widgets/ResliceCursor/ResliceCursorLineRepresentation.js +1 -1
  79. package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +1 -1
  80. package/Proxy/Core/AbstractRepresentationProxy.d.ts +24 -0
  81. package/Proxy/Core/LookupTableProxy.d.ts +45 -0
  82. package/Proxy/Core/PiecewiseFunctionProxy.d.ts +62 -0
  83. package/Proxy/Core/ProxyManager.d.ts +115 -0
  84. package/Proxy/Core/SourceProxy.d.ts +22 -0
  85. package/Proxy/Core/View2DProxy.d.ts +7 -0
  86. package/Proxy/Core/View2DProxy.js +1 -1
  87. package/Proxy/Core/ViewProxy.d.ts +86 -0
  88. package/Proxy/Representations/SliceRepresentationProxy.d.ts +27 -0
  89. package/Proxy/Representations/VolumeRepresentationProxy.d.ts +44 -0
  90. package/README.md +2 -2
  91. package/Rendering/Core/AbstractImageMapper/helper.js +127 -0
  92. package/Rendering/Core/AbstractImageMapper.d.ts +82 -0
  93. package/Rendering/Core/AbstractImageMapper.js +44 -0
  94. package/Rendering/Core/Camera.js +1 -1
  95. package/Rendering/Core/CellPicker.js +1 -1
  96. package/Rendering/Core/ColorTransferFunction/ColorMaps.d.ts +24 -0
  97. package/Rendering/Core/ColorTransferFunction/Constants.d.ts +17 -0
  98. package/Rendering/Core/ColorTransferFunction.js +1 -1
  99. package/Rendering/Core/Coordinate/Constants.d.ts +14 -0
  100. package/Rendering/Core/Coordinate.js +1 -1
  101. package/Rendering/Core/Glyph3DMapper/Constants.d.ts +17 -0
  102. package/Rendering/Core/Glyph3DMapper.js +1 -1
  103. package/Rendering/Core/HardwareSelector.d.ts +84 -0
  104. package/Rendering/Core/ImageArrayMapper.d.ts +253 -0
  105. package/Rendering/Core/ImageArrayMapper.js +242 -0
  106. package/Rendering/Core/ImageMapper/Constants.d.ts +14 -0
  107. package/Rendering/Core/ImageMapper.js +1 -1
  108. package/Rendering/Core/ImageProperty/Constants.d.ts +9 -0
  109. package/Rendering/Core/ImageResliceMapper/Constants.d.ts +11 -0
  110. package/Rendering/Core/ImageResliceMapper/Constants.js +11 -0
  111. package/Rendering/Core/ImageResliceMapper.d.ts +245 -0
  112. package/Rendering/Core/ImageResliceMapper.js +70 -0
  113. package/Rendering/Core/InteractorObserver.d.ts +132 -0
  114. package/Rendering/Core/InteractorStyle/Constants.d.ts +16 -0
  115. package/Rendering/Core/InteractorStyle.d.ts +229 -0
  116. package/Rendering/Core/Light.js +1 -1
  117. package/Rendering/Core/Mapper/Constants.d.ts +26 -0
  118. package/Rendering/Core/Mapper.js +1 -1
  119. package/Rendering/Core/Picker.js +1 -1
  120. package/Rendering/Core/Prop/Constants.d.ts +9 -0
  121. package/Rendering/Core/Prop/Constants.js +9 -0
  122. package/Rendering/Core/Property/Constants.d.ts +24 -0
  123. package/Rendering/Core/Property2D/Constants.d.ts +9 -0
  124. package/Rendering/Core/RenderWindow.js +1 -1
  125. package/Rendering/Core/RenderWindowInteractor/Constants.d.ts +31 -0
  126. package/Rendering/Core/Renderer.js +1 -1
  127. package/Rendering/Core/VolumeMapper/Constants.d.ts +20 -0
  128. package/Rendering/Core/VolumeMapper.js +1 -1
  129. package/Rendering/Core/VolumeProperty/Constants.d.ts +16 -0
  130. package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager/CameraSynchronizer.js +129 -0
  131. package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager.js +131 -0
  132. package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.d.ts +80 -0
  133. package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.js +763 -0
  134. package/Rendering/OpenGL/HardwareSelector/Constants.d.ts +8 -0
  135. package/Rendering/OpenGL/HardwareSelector.d.ts +339 -0
  136. package/Rendering/OpenGL/ImageResliceMapper.js +996 -0
  137. package/Rendering/OpenGL/PolyDataMapper.js +1 -1
  138. package/Rendering/OpenGL/PolyDataMapper2D.js +1 -1
  139. package/Rendering/OpenGL/RenderWindow/Constants.d.ts +10 -0
  140. package/Rendering/OpenGL/RenderWindow/Constants.js +13 -0
  141. package/Rendering/OpenGL/RenderWindow/ContextProxy.js +70 -0
  142. package/Rendering/OpenGL/RenderWindow.d.ts +9 -2
  143. package/Rendering/OpenGL/RenderWindow.js +2 -1
  144. package/Rendering/OpenGL/glsl/vtkImageResliceMapperFS.glsl.js +3 -0
  145. package/Rendering/OpenGL/glsl/vtkImageResliceMapperVS.glsl.js +3 -0
  146. package/Rendering/WebGPU/Actor2D.js +151 -0
  147. package/Rendering/WebGPU/BufferManager.js +1 -1
  148. package/Rendering/WebGPU/CellArrayMapper.js +853 -0
  149. package/Rendering/WebGPU/IndexBuffer.js +397 -0
  150. package/Rendering/WebGPU/PolyDataMapper2D.js +99 -0
  151. package/Rendering/WebGPU/RenderWindow.js +3 -1
  152. package/Rendering/WebGPU/SimpleMapper.js +290 -0
  153. package/Widgets/Core/AbstractWidget.d.ts +187 -0
  154. package/Widgets/Core/AbstractWidgetFactory.d.ts +131 -0
  155. package/Widgets/Core/StateBuilder/color3Mixin.js +24 -0
  156. package/Widgets/Core/StateBuilder/orientationMixin.js +1 -1
  157. package/Widgets/Core/StateBuilder.d.ts +29 -0
  158. package/Widgets/Core/WidgetManager/Constants.d.ts +27 -0
  159. package/Widgets/Core/WidgetManager.d.ts +231 -0
  160. package/Widgets/Core/WidgetState.d.ts +81 -0
  161. package/Widgets/Manipulators/AbstractManipulator.d.ts +221 -0
  162. package/Widgets/Manipulators/AbstractManipulator.js +57 -0
  163. package/Widgets/Manipulators/LineManipulator.js +1 -1
  164. package/Widgets/Manipulators/TrackballManipulator.js +1 -1
  165. package/Widgets/Representations/GlyphRepresentation.js +325 -0
  166. package/Widgets/Representations/LineHandleRepresentation.js +116 -0
  167. package/Widgets/Representations/ResliceCursorContextRepresentation.js +1 -1
  168. package/Widgets/Representations/WidgetRepresentation.js +1 -1
  169. package/Widgets/Widgets3D/AngleWidget.js +1 -1
  170. package/Widgets/Widgets3D/InteractiveOrientationWidget.d.ts +40 -0
  171. package/Widgets/Widgets3D/LabelWidget/behavior.js +157 -0
  172. package/Widgets/Widgets3D/LabelWidget/state.js +22 -0
  173. package/Widgets/Widgets3D/LabelWidget.js +78 -0
  174. package/Widgets/Widgets3D/LineWidget/behavior.js +1 -1
  175. package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
  176. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  177. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
  178. package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
  179. package/index.d.ts +133 -74
  180. package/package.json +1 -1
@@ -0,0 +1,229 @@
1
+ import { EventHandler, vtkSubscription } from './../../interfaces';
2
+ import vtkInteractorObserver from './InteractorObserver';
3
+
4
+ export interface vtkInteractorStyle extends vtkInteractorObserver {
5
+ /**
6
+ * Start a Rotate event.
7
+ */
8
+ startRotate(): void;
9
+
10
+ /**
11
+ * Invoke a StartRotate event.
12
+ */
13
+ invokeStartRotateEvent(...args: unknown[]): void;
14
+
15
+ /**
16
+ * Registers a callback on a StartRotate event.
17
+ */
18
+ onStartRotateEvent(cb: EventHandler, priority?: number): vtkSubscription;
19
+
20
+ /**
21
+ * Ends a Rotate event.
22
+ */
23
+ endRotate(): void;
24
+
25
+ /**
26
+ * Invoke an EndRotate event.
27
+ */
28
+ invokeEndRotateEvent(...args: unknown[]): void;
29
+
30
+ /**
31
+ * Registers a callback on an EndRotate event.
32
+ */
33
+ onEndRotateEvent(cb: EventHandler, priority?: number): vtkSubscription;
34
+ /**
35
+ * Start a Pan event.
36
+ */
37
+ startPan(): void;
38
+
39
+ /**
40
+ * Invoke a StartPan event.
41
+ */
42
+ invokeStartPanEvent(...args: unknown[]): void;
43
+
44
+ /**
45
+ * Registers a callback on a StartPan event.
46
+ */
47
+ onStartPanEvent(cb: EventHandler, priority?: number): vtkSubscription;
48
+
49
+ /**
50
+ * Ends a Pan event.
51
+ */
52
+ endPan(): void;
53
+
54
+ /**
55
+ * Invoke an EndPan event.
56
+ */
57
+ invokeEndPanEvent(...args: unknown[]): void;
58
+
59
+ /**
60
+ * Registers a callback on an EndPan event.
61
+ */
62
+ onEndPanEvent(cb: EventHandler, priority?: number): vtkSubscription;
63
+ /**
64
+ * Start a Spin event.
65
+ */
66
+ startSpin(): void;
67
+
68
+ /**
69
+ * Invoke a StartSpin event.
70
+ */
71
+ invokeStartSpinEvent(...args: unknown[]): void;
72
+
73
+ /**
74
+ * Registers a callback on a StartSpin event.
75
+ */
76
+ onStartSpinEvent(cb: EventHandler, priority?: number): vtkSubscription;
77
+
78
+ /**
79
+ * Ends a Spin event.
80
+ */
81
+ endSpin(): void;
82
+
83
+ /**
84
+ * Invoke an EndSpin event.
85
+ */
86
+ invokeEndSpinEvent(...args: unknown[]): void;
87
+
88
+ /**
89
+ * Registers a callback on an EndSpin event.
90
+ */
91
+ onEndSpinEvent(cb: EventHandler, priority?: number): vtkSubscription;
92
+ /**
93
+ * Start a Dolly event.
94
+ */
95
+ startDolly(): void;
96
+
97
+ /**
98
+ * Invoke a StartDolly event.
99
+ */
100
+ invokeStartDollyEvent(...args: unknown[]): void;
101
+
102
+ /**
103
+ * Registers a callback on a StartDolly event.
104
+ */
105
+ onStartDollyEvent(cb: EventHandler, priority?: number): vtkSubscription;
106
+
107
+ /**
108
+ * Ends a Dolly event.
109
+ */
110
+ endDolly(): void;
111
+
112
+ /**
113
+ * Invoke an EndDolly event.
114
+ */
115
+ invokeEndDollyEvent(...args: unknown[]): void;
116
+
117
+ /**
118
+ * Registers a callback on an EndDolly event.
119
+ */
120
+ onEndDollyEvent(cb: EventHandler, priority?: number): vtkSubscription;
121
+ /**
122
+ * Start a CameraPose event.
123
+ */
124
+ startCameraPose(): void;
125
+
126
+ /**
127
+ * Invoke a StartCameraPose event.
128
+ */
129
+ invokeStartCameraPoseEvent(...args: unknown[]): void;
130
+
131
+ /**
132
+ * Registers a callback on a StartCameraPose event.
133
+ */
134
+ onStartCameraPoseEvent(cb: EventHandler, priority?: number): vtkSubscription;
135
+
136
+ /**
137
+ * Ends a CameraPose event.
138
+ */
139
+ endCameraPose(): void;
140
+
141
+ /**
142
+ * Invoke an EndCameraPose event.
143
+ */
144
+ invokeEndCameraPoseEvent(...args: unknown[]): void;
145
+
146
+ /**
147
+ * Registers a callback on an EndCameraPose event.
148
+ */
149
+ onEndCameraPoseEvent(cb: EventHandler, priority?: number): vtkSubscription;
150
+ /**
151
+ * Start a WindowLevel event.
152
+ */
153
+ startWindowLevel(): void;
154
+
155
+ /**
156
+ * Invoke a StartWindowLevel event.
157
+ */
158
+ invokeStartWindowLevelEvent(...args: unknown[]): void;
159
+
160
+ /**
161
+ * Registers a callback on a StartWindowLevel event.
162
+ */
163
+ onStartWindowLevelEvent(cb: EventHandler, priority?: number): vtkSubscription;
164
+
165
+ /**
166
+ * Ends a WindowLevel event.
167
+ */
168
+ endWindowLevel(): void;
169
+
170
+ /**
171
+ * Invoke an EndWindowLevel event.
172
+ */
173
+ invokeEndWindowLevelEvent(...args: unknown[]): void;
174
+
175
+ /**
176
+ * Registers a callback on an EndWindowLevel event.
177
+ */
178
+ onEndWindowLevelEvent(cb: EventHandler, priority?: number): vtkSubscription;
179
+ /**
180
+ * Start a Slice event.
181
+ */
182
+ startSlice(): void;
183
+
184
+ /**
185
+ * Invoke a StartSlice event.
186
+ */
187
+ invokeStartSliceEvent(...args: unknown[]): void;
188
+
189
+ /**
190
+ * Registers a callback on a StartSlice event.
191
+ */
192
+ onStartSliceEvent(cb: EventHandler, priority?: number): vtkSubscription;
193
+
194
+ /**
195
+ * Ends a Slice event.
196
+ */
197
+ endSlice(): void;
198
+
199
+ /**
200
+ * Invoke an EndSlice event.
201
+ */
202
+ invokeEndSliceEvent(...args: unknown[]): void;
203
+
204
+ /**
205
+ * Registers a callback on an EndSlice event.
206
+ */
207
+ onEndSliceEvent(cb: EventHandler, priority?: number): vtkSubscription;
208
+
209
+ /**
210
+ * Handles a keypress.
211
+ */
212
+ handleKeyPress(callData: unknown): void;
213
+ }
214
+
215
+ export interface IInteractorStyleInitialValues {
216
+ autoAdjustCameraClippingRange?: boolean;
217
+ }
218
+
219
+ export function extend(
220
+ publicAPI: object,
221
+ model: object,
222
+ initialValues?: IInteractorStyleInitialValues
223
+ ): void;
224
+
225
+ export const vtkInteractorStyle: {
226
+ extend: typeof extend;
227
+ };
228
+
229
+ export default vtkInteractorStyle;
@@ -1,5 +1,5 @@
1
1
  import macro from '../../macros.js';
2
- import { l as normalize, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
2
+ import { g as normalize, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
3
3
 
4
4
  var LIGHT_TYPES = ['HeadLight', 'CameraLight', 'SceneLight']; // ----------------------------------------------------------------------------
5
5
  // vtkLight methods
@@ -0,0 +1,26 @@
1
+ export declare enum ColorMode {
2
+ DEFAULT = 0,
3
+ MAP_SCALARS = 1,
4
+ DIRECT_SCALARS = 2,
5
+ }
6
+
7
+ export declare enum ScalarMode {
8
+ DEFAULT = 0,
9
+ USE_POINT_DATA = 1,
10
+ USE_CELL_DATA = 2,
11
+ USE_POINT_FIELD_DATA = 3,
12
+ USE_CELL_FIELD_DATA = 4,
13
+ USE_FIELD_DATA = 5,
14
+ }
15
+
16
+ export declare enum GetArray {
17
+ BY_ID = 0,
18
+ BY_NAME = 1,
19
+ }
20
+
21
+ declare const _default: {
22
+ ColorMode: typeof ColorMode;
23
+ ScalarMode: typeof ScalarMode;
24
+ GetArray: typeof GetArray;
25
+ };
26
+ export default _default;
@@ -4,7 +4,7 @@ import vtkAbstractMapper3D from './AbstractMapper3D.js';
4
4
  import vtkDataArray from '../../Common/Core/DataArray.js';
5
5
  import vtkImageData from '../../Common/DataModel/ImageData.js';
6
6
  import vtkLookupTable from '../../Common/Core/LookupTable.js';
7
- import { M as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
7
+ import { N as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
8
8
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors/Constants.js';
9
9
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
10
10
  import Constants from './Mapper/Constants.js';
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
3
  import vtkAbstractPicker from './AbstractPicker.js';
4
4
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
5
- import { d as dot, l as normalize, n as norm, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
5
+ import { d as dot, g as normalize, n as norm, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
6
6
  import { mat4, vec4 } from 'gl-matrix';
7
7
 
8
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -0,0 +1,9 @@
1
+ export declare enum CoordinateSystem {
2
+ WORLD = 0,
3
+ DISPLAY = 1,
4
+ }
5
+
6
+ declare const _default: {
7
+ CoordinateSystem: typeof CoordinateSystem;
8
+ };
9
+ export default _default;
@@ -0,0 +1,9 @@
1
+ var CoordinateSystem = {
2
+ DISPLAY: 0,
3
+ WORLD: 1
4
+ };
5
+ var Constants = {
6
+ CoordinateSystem: CoordinateSystem
7
+ };
8
+
9
+ export { CoordinateSystem, Constants as default };
@@ -0,0 +1,24 @@
1
+ export declare enum Shading {
2
+ FLAT = 0,
3
+ GOURAUD = 1,
4
+ PHONG = 2,
5
+ }
6
+
7
+ export declare enum Representation {
8
+ POINTS = 0,
9
+ WIREFRAME = 1,
10
+ SURFACE = 2,
11
+ }
12
+
13
+ export declare enum Interpolation {
14
+ FLAT = 0,
15
+ GOURAUD = 1,
16
+ PHONG = 2,
17
+ }
18
+
19
+ declare const _default: {
20
+ Shading: typeof Shading;
21
+ Representation: typeof Representation;
22
+ Interpolation: typeof Interpolation;
23
+ };
24
+ export default _default;
@@ -0,0 +1,9 @@
1
+ export declare enum DisplayLocation {
2
+ BACKGROUND = 0,
3
+ FOREGROUND = 1,
4
+ }
5
+
6
+ declare const _default: {
7
+ DisplayLocation: typeof DisplayLocation;
8
+ };
9
+ export default _default;
@@ -1,6 +1,6 @@
1
1
  import macro from '../../macros.js';
2
2
 
3
- var DEFAULT_VIEW_API = navigator.gpu ? 'WebGPU' : 'WebGL';
3
+ var DEFAULT_VIEW_API = 'WebGL';
4
4
  var VIEW_CONSTRUCTORS = Object.create(null); // ----------------------------------------------------------------------------
5
5
  // static methods
6
6
  // ----------------------------------------------------------------------------
@@ -0,0 +1,31 @@
1
+ export declare enum Device {
2
+ Unknown = 0,
3
+ LeftController = 1,
4
+ RightController = 2,
5
+ }
6
+
7
+ export declare enum Input {
8
+ Unknown = 0,
9
+ Trigger = 1,
10
+ TrackPad = 2,
11
+ Grip = 3,
12
+ Thumbstick = 4,
13
+ A = 5,
14
+ B = 6,
15
+ ApplicationMenu = 7, // Not exposed in WebXR API
16
+ }
17
+
18
+ export declare enum Axis {
19
+ Unknown = 0,
20
+ TouchpadX = 1,
21
+ TouchpadY = 2,
22
+ ThumbstickX = 3,
23
+ ThumbstickY = 4,
24
+ }
25
+
26
+ declare const _default: {
27
+ Device: typeof Device;
28
+ Input: typeof Input;
29
+ Axis: typeof Axis;
30
+ };
31
+ export default _default;
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import { newInstance as newInstance$1, get, setGet, getArray, setGetArray, vtkDebugMacro as vtkDebugMacro$1, vtkErrorMacro as vtkErrorMacro$1, vtkWarningMacro as vtkWarningMacro$1 } from '../../macros.js';
3
3
  import vtkCamera from './Camera.js';
4
4
  import vtkLight from './Light.js';
5
- import { O as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, M as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
+ import { O as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, N as createUninitializedBounds } from '../../Common/Core/Math/index.js';
6
6
  import vtkViewport from './Viewport.js';
7
7
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
8
8
 
@@ -0,0 +1,20 @@
1
+ export declare enum BlendMode {
2
+ COMPOSITE_BLEND = 0,
3
+ MAXIMUM_INTENSITY_BLEND = 1,
4
+ MINIMUM_INTENSITY_BLEND = 2,
5
+ AVERAGE_INTENSITY_BLEND = 3,
6
+ ADDITIVE_INTENSITY_BLEND = 4,
7
+ RADON_TRANSFORM_BLEND = 5,
8
+ }
9
+
10
+ export declare enum FilterMode {
11
+ OFF = 0,
12
+ NORMALIZED = 1,
13
+ RAW = 2,
14
+ }
15
+
16
+ declare const _default: {
17
+ BlendMode: typeof BlendMode;
18
+ FilterMode: typeof FilterMode;
19
+ };
20
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  import macro from '../../macros.js';
2
- import { M as createUninitializedBounds } from '../../Common/Core/Math/index.js';
2
+ import { N as createUninitializedBounds } from '../../Common/Core/Math/index.js';
3
3
  import Constants from './VolumeMapper/Constants.js';
4
4
  import vtkAbstractMapper from './AbstractMapper.js';
5
5
 
@@ -0,0 +1,16 @@
1
+ export declare enum InterpolationType {
2
+ NEAREST = 0,
3
+ LINEAR = 1,
4
+ FAST_LINEAR = 2
5
+ }
6
+
7
+ export declare enum OpacityMode {
8
+ FRACTIONAL = 0,
9
+ PROPORTIONAL = 1,
10
+ }
11
+
12
+ declare const _default: {
13
+ InterpolationType: typeof InterpolationType;
14
+ OpacityMode: typeof OpacityMode;
15
+ };
16
+ export default _default;
@@ -0,0 +1,129 @@
1
+ import { newInstance as newInstance$1, obj, setGet, setGetArray, chain } from '../../../../macros.js';
2
+ import { l as normalize } from '../../../../Common/Core/Math/index.js';
3
+
4
+ var MODE_RESET_CAMERA = 'resetcamera';
5
+ var MODE_ORIENTATION = 'orientation';
6
+ var MODE_SAME = 'same';
7
+ var SynchronizationMode = {
8
+ MODE_RESET_CAMERA: MODE_RESET_CAMERA,
9
+ MODE_ORIENTATION: MODE_ORIENTATION,
10
+ MODE_SAME: MODE_SAME
11
+ };
12
+
13
+ function vtkCameraSynchronizer(publicAPI, model) {
14
+ model.classHierarchy.push('vtkCameraSynchronizer');
15
+ var cameraState = new Float64Array(9);
16
+ var direction = new Float64Array(3);
17
+ var subscriptions = [];
18
+
19
+ function updateListeners() {
20
+ while (subscriptions.length) {
21
+ subscriptions.pop().unsubscribe();
22
+ }
23
+
24
+ if (!model.srcRenderer || !model.dstRenderer) {
25
+ return;
26
+ }
27
+
28
+ var srcCamera = model.srcRenderer.getActiveCamera();
29
+ var interactor = model.srcRenderer.getRenderWindow().getInteractor();
30
+ subscriptions.push(srcCamera.onModified(function () {
31
+ if (!interactor.isAnimating()) {
32
+ publicAPI.update();
33
+ }
34
+ }));
35
+ subscriptions.push(interactor.onAnimation(publicAPI.update));
36
+ subscriptions.push(interactor.onEndAnimation(publicAPI.update));
37
+ } // Update listeners automatically
38
+
39
+
40
+ model._srcRendererChanged = updateListeners;
41
+ model._dstRendererChanged = updateListeners;
42
+
43
+ function updatePreviousValues(position, focalPoint, viewUp) {
44
+ 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]) {
45
+ cameraState[0] = position[0];
46
+ cameraState[1] = position[1];
47
+ cameraState[2] = position[2];
48
+ cameraState[3] = focalPoint[0];
49
+ cameraState[4] = focalPoint[1];
50
+ cameraState[5] = focalPoint[2];
51
+ cameraState[6] = viewUp[0];
52
+ cameraState[7] = viewUp[1];
53
+ cameraState[8] = viewUp[2];
54
+ return cameraState;
55
+ }
56
+
57
+ return false;
58
+ }
59
+
60
+ publicAPI.update = function () {
61
+ if (!model.active || !model.srcRenderer || !model.dstRenderer) {
62
+ return;
63
+ }
64
+
65
+ var srcCamera = model.srcRenderer.getActiveCamera();
66
+ var dstCamera = model.dstRenderer.getActiveCamera();
67
+ var position = srcCamera.getReferenceByName('position');
68
+ var focalPoint = srcCamera.getReferenceByName('focalPoint');
69
+ var viewUp = srcCamera.getReferenceByName('viewUp');
70
+ var change = updatePreviousValues(position, focalPoint, viewUp);
71
+
72
+ if (!change) {
73
+ return;
74
+ }
75
+
76
+ if (model.mode === MODE_ORIENTATION) {
77
+ direction[0] = change[0] - change[3];
78
+ direction[1] = change[1] - change[4];
79
+ direction[2] = change[2] - change[5];
80
+ normalize(direction);
81
+ dstCamera.setPosition(model.focalPoint[0] + model.distance * direction[0], model.focalPoint[1] + model.distance * direction[1], model.focalPoint[2] + model.distance * direction[2]);
82
+ dstCamera.setFocalPoint(model.focalPoint[0], model.focalPoint[1], model.focalPoint[2]);
83
+ dstCamera.setViewUp(change[6], change[7], change[8]);
84
+ } else {
85
+ dstCamera.setPosition(change[0], change[1], change[2]);
86
+ dstCamera.setFocalPoint(change[3], change[4], change[5]);
87
+ dstCamera.setViewUp(change[6], change[7], change[8]);
88
+ }
89
+
90
+ if (model.mode === MODE_RESET_CAMERA) {
91
+ model.dstRenderer.resetCamera();
92
+ }
93
+ };
94
+
95
+ publicAPI.delete = chain(function () {
96
+ return publicAPI.setSrcRenderer(null);
97
+ }, // Will clear any listener
98
+ publicAPI.delete); // If src/dstRenderer provided at constructor register listeners
99
+
100
+ updateListeners();
101
+ }
102
+
103
+ var DEFAULT_VALUES = {
104
+ mode: MODE_ORIENTATION,
105
+ focalPoint: [0, 0, 0],
106
+ distance: 6.8,
107
+ active: true // srcRenderer: null,
108
+ // dstRenderer: null,
109
+
110
+ };
111
+ function extend(publicAPI, model) {
112
+ var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
113
+ Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API
114
+
115
+ obj(publicAPI, model);
116
+ setGet(publicAPI, model, ['mode', 'active', 'srcRenderer', 'dstRenderer', 'distance']);
117
+ setGetArray(publicAPI, model, ['focalPoint'], 3, 0); // Object methods
118
+
119
+ vtkCameraSynchronizer(publicAPI, model);
120
+ } // ----------------------------------------------------------------------------
121
+
122
+ var newInstance = newInstance$1(extend, 'vtkCameraSynchronizer');
123
+ var vtkCameraSynchronizer$1 = {
124
+ newInstance: newInstance,
125
+ extend: extend,
126
+ SynchronizationMode: SynchronizationMode
127
+ };
128
+
129
+ export { DEFAULT_VALUES, MODE_ORIENTATION, MODE_RESET_CAMERA, MODE_SAME, SynchronizationMode, vtkCameraSynchronizer$1 as default, extend, newInstance };