@kitware/vtk.js 26.2.1 → 26.3.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 (76) hide show
  1. package/Common/Core/Math/index.js +5 -1
  2. package/Common/Core/Math.d.ts +1 -0
  3. package/Common/Core/Math.js +1 -1
  4. package/Common/DataModel/BoundingBox.js +28 -4
  5. package/Common/DataModel/ImageData.js +4 -30
  6. package/Common/DataModel/IncrementalOctreeNode.js +1 -1
  7. package/Common/DataModel/IncrementalOctreePointLocator.js +1 -1
  8. package/Common/DataModel/Line.js +1 -1
  9. package/Common/DataModel/Plane.js +1 -1
  10. package/Common/DataModel/Polygon.js +1 -1
  11. package/Common/DataModel/Quad.js +1 -1
  12. package/Common/DataModel/Triangle.js +1 -1
  13. package/Common/Transform/LandmarkTransform.js +1 -1
  14. package/Common/Transform/Transform.js +1 -1
  15. package/Filters/Core/PolyDataNormals.js +1 -1
  16. package/Filters/General/ClipClosedSurface.js +1 -1
  17. package/Filters/General/ContourTriangulator/helper.js +1 -1
  18. package/Filters/General/ImageMarchingCubes.js +1 -1
  19. package/Filters/General/MoleculeToRepresentation.js +1 -1
  20. package/Filters/General/OBBTree.js +1 -1
  21. package/Filters/General/TubeFilter.js +1 -1
  22. package/Filters/General/WindowedSincPolyDataFilter.js +1 -1
  23. package/Filters/Sources/CircleSource.js +1 -1
  24. package/Filters/Sources/PlaneSource.js +1 -1
  25. package/Filters/Sources/PointSource.js +1 -1
  26. package/Filters/Texture/TextureMapToPlane.js +1 -1
  27. package/Filters/Texture/TextureMapToSphere.js +1 -1
  28. package/Imaging/Core/ImageReslice.js +1 -1
  29. package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -1
  30. package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -1
  31. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -1
  32. package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -1
  33. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
  34. package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
  35. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
  36. package/Interaction/Style/InteractorStyleMPRSlice.js +1 -1
  37. package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -1
  38. package/Interaction/Widgets/PiecewiseGaussianWidget.js +1 -1
  39. package/Proxy/Core/View2DProxy.js +117 -3
  40. package/Proxy/Core/ViewProxy.js +64 -20
  41. package/Rendering/Core/Camera.js +1 -1
  42. package/Rendering/Core/CellPicker.js +1 -1
  43. package/Rendering/Core/ColorTransferFunction.js +1 -1
  44. package/Rendering/Core/Coordinate.js +1 -1
  45. package/Rendering/Core/CubeAxesActor.js +1 -1
  46. package/Rendering/Core/Glyph3DMapper.js +1 -1
  47. package/Rendering/Core/ImageMapper.js +1 -1
  48. package/Rendering/Core/Light.js +1 -1
  49. package/Rendering/Core/Mapper.js +1 -1
  50. package/Rendering/Core/Picker.js +1 -1
  51. package/Rendering/Core/Prop3D.js +1 -1
  52. package/Rendering/Core/RenderWindowInteractor.js +1 -1
  53. package/Rendering/Core/Renderer.js +1 -1
  54. package/Rendering/Core/ScalarBarActor.js +1 -1
  55. package/Rendering/Core/VolumeMapper.js +1 -1
  56. package/Rendering/OpenGL/PolyDataMapper.js +1 -1
  57. package/Rendering/OpenGL/PolyDataMapper2D.js +1 -1
  58. package/Rendering/OpenGL/Texture.js +1 -1
  59. package/Rendering/WebGPU/BufferManager.js +1 -1
  60. package/Rendering/WebGPU/VolumePass.js +1 -1
  61. package/Widgets/Core/StateBuilder/orientationMixin.js +1 -1
  62. package/Widgets/Manipulators/LineManipulator.js +1 -1
  63. package/Widgets/Manipulators/TrackballManipulator.js +1 -1
  64. package/Widgets/Representations/PolyLineRepresentation.js +1 -1
  65. package/Widgets/Representations/WidgetRepresentation.js +1 -1
  66. package/Widgets/Widgets3D/AngleWidget.js +1 -1
  67. package/Widgets/Widgets3D/DistanceWidget.js +1 -1
  68. package/Widgets/Widgets3D/LineWidget/behavior.js +1 -1
  69. package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
  70. package/Widgets/Widgets3D/LineWidget.js +1 -1
  71. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  72. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
  73. package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
  74. package/Widgets/Widgets3D/ShapeWidget/behavior.js +4 -4
  75. package/Widgets/Widgets3D/SphereWidget.js +1 -1
  76. package/package.json +1 -1
@@ -1,7 +1,10 @@
1
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
1
2
  import macro from '../../macros.js';
2
3
  import vtkMouseRangeManipulator from '../../Interaction/Manipulators/MouseRangeManipulator.js';
3
4
  import vtkViewProxy from './ViewProxy.js';
4
- import { k as cross, F as getMajorAxisIndex } from '../../Common/Core/Math/index.js';
5
+ import { j as cross, E as getMajorAxisIndex } from '../../Common/Core/Math/index.js';
6
+ import { mat4, vec3 } from 'gl-matrix';
7
+ import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
5
8
 
6
9
  var DEFAULT_STEP_WIDTH = 512;
7
10
 
@@ -23,6 +26,40 @@ function formatAnnotationValue(value) {
23
26
  }
24
27
 
25
28
  return value;
29
+ }
30
+ /**
31
+ * Returns an array of points in world coordinates creating a coarse hull
32
+ * around the prop given in argument
33
+ * The returned array is empty if the prop is not visible or doesn't use bounds
34
+ *
35
+ * How it works: if possible, combine the mapper bounds corners with the prop matrix
36
+ * otherwise, returns the prop bounds corners
37
+ */
38
+
39
+
40
+ function getPropCoarseHull(prop) {
41
+ var _prop$getMapper, _prop$getMapper$call, _prop$getMapper$call$;
42
+
43
+ if (!prop.getVisibility() || !prop.getUseBounds()) {
44
+ return [];
45
+ }
46
+
47
+ var mapperBounds = prop === null || prop === void 0 ? void 0 : (_prop$getMapper = prop.getMapper) === null || _prop$getMapper === void 0 ? void 0 : (_prop$getMapper$call = _prop$getMapper.call(prop)) === null || _prop$getMapper$call === void 0 ? void 0 : (_prop$getMapper$call$ = _prop$getMapper$call.getBounds) === null || _prop$getMapper$call$ === void 0 ? void 0 : _prop$getMapper$call$.call(_prop$getMapper$call);
48
+ var corners = [];
49
+
50
+ if (mapperBounds && vtkBoundingBox.isValid(mapperBounds) && prop.getMatrix) {
51
+ vtkBoundingBox.getCorners(mapperBounds, corners);
52
+ var matrix = prop.getMatrix().slice();
53
+ mat4.transpose(matrix, matrix);
54
+ corners.forEach(function (pt) {
55
+ return vec3.transformMat4(pt, pt, matrix);
56
+ });
57
+ } else {
58
+ var propBounds = prop.getBounds();
59
+ vtkBoundingBox.getCorners(propBounds, corners);
60
+ }
61
+
62
+ return corners;
26
63
  } // ----------------------------------------------------------------------------
27
64
  // vtkView2DProxy methods
28
65
  // ----------------------------------------------------------------------------
@@ -107,6 +144,81 @@ function vtkView2DProxy(publicAPI, model) {
107
144
  }
108
145
  }
109
146
  }
147
+ };
148
+
149
+ var superInternalResetCamera = model._resetCamera;
150
+ /**
151
+ * If fitProps is true, calling resetCamera will exactly fit the bounds in the view
152
+ * Exact fitting requires useParallelRendering, and an active camera
153
+ * Otherwise, the default renderer.resetCamera is used and it uses a larger bounding box
154
+ */
155
+
156
+ model._resetCamera = function () {
157
+ var bounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
158
+ // Always reset camera first to set physicalScale, physicalTranslation and trigger events
159
+ var initialReset = superInternalResetCamera(bounds);
160
+
161
+ if (!model.fitProps || !model.useParallelRendering || !initialReset) {
162
+ return initialReset;
163
+ } // For each visible prop get the smallest possible convex hull using bounds corners
164
+
165
+
166
+ var visiblePoints = [];
167
+
168
+ if (bounds) {
169
+ // Bounds are given as argument, use their corners
170
+ vtkBoundingBox.getCorners(bounds, visiblePoints);
171
+ } else {
172
+ publicAPI.getRepresentations().forEach(function (representationProxy) {
173
+ return [representationProxy.getActors(), representationProxy.getVolumes()].flat().forEach(function (prop) {
174
+ return visiblePoints.push.apply(visiblePoints, _toConsumableArray(getPropCoarseHull(prop)));
175
+ });
176
+ });
177
+ } // Get the bounds in view coordinates
178
+
179
+
180
+ var viewBounds = vtkBoundingBox.reset([]);
181
+ var viewMatrix = model.camera.getViewMatrix();
182
+ mat4.transpose(viewMatrix, viewMatrix);
183
+
184
+ for (var i = 0; i < visiblePoints.length; ++i) {
185
+ var point = visiblePoints[i];
186
+ vec3.transformMat4(point, point, viewMatrix);
187
+ vtkBoundingBox.addPoint.apply(vtkBoundingBox, [viewBounds].concat(_toConsumableArray(point)));
188
+ } // Compute focal point and position
189
+
190
+
191
+ var viewFocalPoint = vtkBoundingBox.getCenter(viewBounds); // Camera position in view coordinates is the center of the bounds in XY
192
+ // and the maximum bound + 1 in Z
193
+
194
+ var viewPosition = [viewFocalPoint[0], viewFocalPoint[1], viewBounds[5] + 1];
195
+ var inverseViewMatrix = new Float64Array(16);
196
+ var worldFocalPoint = new Float64Array(3);
197
+ var worldPosition = new Float64Array(3);
198
+ mat4.invert(inverseViewMatrix, viewMatrix);
199
+ vec3.transformMat4(worldFocalPoint, viewFocalPoint, inverseViewMatrix);
200
+ vec3.transformMat4(worldPosition, viewPosition, inverseViewMatrix); // Compute parallel scale
201
+
202
+ var view = model.renderer.getRenderWindow().getViews()[0];
203
+ var dims = view.getViewportSize(model.renderer);
204
+ var aspect = dims[0] / dims[1];
205
+ var xLength = vtkBoundingBox.getLength(viewBounds, 0);
206
+ var yLength = vtkBoundingBox.getLength(viewBounds, 1);
207
+ var parallelScale = 0.5 * Math.max(yLength, xLength / aspect);
208
+
209
+ if (parallelScale <= 0) {
210
+ return initialReset;
211
+ } // Compute bounds in world coordinates
212
+
213
+
214
+ var worldBounds = vtkBoundingBox.transformBounds(viewBounds, inverseViewMatrix);
215
+ publicAPI.setCameraParameters({
216
+ position: worldPosition,
217
+ focalPoint: worldFocalPoint,
218
+ bounds: worldBounds,
219
+ parallelScale: parallelScale
220
+ });
221
+ return true;
110
222
  }; // --------------------------------------------------------------------------
111
223
  // Range Manipulator setup
112
224
  // -------------------------------------------------------------------------
@@ -243,14 +355,16 @@ var DEFAULT_VALUES = {
243
355
  orientation: -1,
244
356
  viewUp: [0, 1, 0],
245
357
  useParallelRendering: true,
246
- sliceRepresentationSubscriptions: []
358
+ sliceRepresentationSubscriptions: [],
359
+ fitProps: false
247
360
  }; // ----------------------------------------------------------------------------
248
361
 
249
362
  function extend(publicAPI, model) {
250
363
  var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
251
364
  Object.assign(model, DEFAULT_VALUES, initialValues);
252
365
  vtkViewProxy.extend(publicAPI, model, initialValues);
253
- macro.get(publicAPI, model, ['axis']); // Object specific methods
366
+ macro.get(publicAPI, model, ['axis']);
367
+ macro.setGet(publicAPI, model, ['fitProps']); // Object specific methods
254
368
 
255
369
  vtkView2DProxy(publicAPI, model);
256
370
  } // ----------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
- import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
4
4
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
5
  import { newInstance as newInstance$1, obj, setGet, get, moveToProtected, event, proxy, proxyPropertyMapping, chain } from '../../macros.js';
6
6
  import vtkAnnotatedCubeActor from '../../Rendering/Core/AnnotatedCubeActor.js';
@@ -47,7 +47,16 @@ function vtkViewProxy(publicAPI, model) {
47
47
  model.interactor = vtkRenderWindowInteractor.newInstance();
48
48
  model.interactor.setView(model._openGLRenderWindow);
49
49
  model.interactorStyle3D = vtkInteractorStyleManipulator.newInstance();
50
- model.interactorStyle2D = vtkInteractorStyleManipulator.newInstance(); // Apply default interaction styles
50
+ model.interactorStyle2D = vtkInteractorStyleManipulator.newInstance();
51
+ /**
52
+ * Internal function used by publicAPI.resetCamera()
53
+ */
54
+
55
+ model._resetCamera = function () {
56
+ var bounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
57
+ return model.renderer.resetCamera(bounds);
58
+ }; // Apply default interaction styles
59
+
51
60
 
52
61
  InteractionPresets.applyPreset('3D', model.interactorStyle3D);
53
62
  InteractionPresets.applyPreset('2D', model.interactorStyle2D);
@@ -239,9 +248,44 @@ function vtkViewProxy(publicAPI, model) {
239
248
  }; // --------------------------------------------------------------------------
240
249
 
241
250
 
251
+ publicAPI.setCameraParameters = function (_ref) {
252
+ var position = _ref.position,
253
+ focalPoint = _ref.focalPoint,
254
+ bounds = _ref.bounds,
255
+ parallelScale = _ref.parallelScale,
256
+ viewAngle = _ref.viewAngle;
257
+
258
+ if (position != null) {
259
+ var _model$camera;
260
+
261
+ (_model$camera = model.camera).setPosition.apply(_model$camera, _toConsumableArray(position));
262
+ }
263
+
264
+ if (focalPoint != null) {
265
+ var _model$camera2;
266
+
267
+ (_model$camera2 = model.camera).setFocalPoint.apply(_model$camera2, _toConsumableArray(focalPoint));
268
+ }
269
+
270
+ if (bounds != null) {
271
+ model.renderer.resetCameraClippingRange(bounds);
272
+ } else {
273
+ model.renderer.resetCameraClippingRange();
274
+ }
275
+
276
+ if (parallelScale != null) {
277
+ model.camera.setParallelScale(parallelScale);
278
+ }
279
+
280
+ if (viewAngle != null) {
281
+ model.camera.setViewAngle(viewAngle);
282
+ }
283
+ }; // --------------------------------------------------------------------------
284
+
285
+
242
286
  publicAPI.resetCamera = function () {
243
- model.renderer.resetCamera();
244
- model.renderer.resetCameraClippingRange();
287
+ model._resetCamera();
288
+
245
289
  model.interactorStyle2D.setCenterOfRotation(model.camera.getFocalPoint());
246
290
  model.interactorStyle3D.setCenterOfRotation(model.camera.getFocalPoint());
247
291
  publicAPI.renderLater();
@@ -249,10 +293,10 @@ function vtkViewProxy(publicAPI, model) {
249
293
 
250
294
 
251
295
  publicAPI.captureImage = function () {
252
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
253
- _ref$format = _ref.format,
254
- format = _ref$format === void 0 ? 'image/png' : _ref$format,
255
- opts = _objectWithoutProperties(_ref, _excluded);
296
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
297
+ _ref2$format = _ref2.format,
298
+ format = _ref2$format === void 0 ? 'image/png' : _ref2$format,
299
+ opts = _objectWithoutProperties(_ref2, _excluded);
256
300
 
257
301
  return model.renderWindow.captureImages(format, opts)[0];
258
302
  }; // --------------------------------------------------------------------------
@@ -326,7 +370,7 @@ function vtkViewProxy(publicAPI, model) {
326
370
 
327
371
 
328
372
  publicAPI.updateOrientation = function (axisIndex, orientation, viewUp) {
329
- var _model$camera, _model$camera2, _model$camera3, _model$camera4, _model$camera5;
373
+ var _model$camera3, _model$camera4, _model$camera5, _model$camera6, _model$camera7;
330
374
 
331
375
  var animateSteps = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
332
376
 
@@ -343,20 +387,20 @@ function vtkViewProxy(publicAPI, model) {
343
387
  var position = model.camera.getFocalPoint();
344
388
  position[model.axis] += model.orientation;
345
389
 
346
- (_model$camera = model.camera).setPosition.apply(_model$camera, _toConsumableArray(position));
390
+ (_model$camera3 = model.camera).setPosition.apply(_model$camera3, _toConsumableArray(position));
347
391
 
348
- (_model$camera2 = model.camera).setViewUp.apply(_model$camera2, _toConsumableArray(viewUp));
392
+ (_model$camera4 = model.camera).setViewUp.apply(_model$camera4, _toConsumableArray(viewUp));
349
393
 
350
394
  model.renderer.resetCamera();
351
395
  var destFocalPoint = model.camera.getFocalPoint();
352
396
  var destPosition = model.camera.getPosition();
353
397
  var destViewUp = model.camera.getViewUp(); // Reset to original to prevent initial render flash
354
398
 
355
- (_model$camera3 = model.camera).setFocalPoint.apply(_model$camera3, _toConsumableArray(originalFocalPoint));
399
+ (_model$camera5 = model.camera).setFocalPoint.apply(_model$camera5, _toConsumableArray(originalFocalPoint));
356
400
 
357
- (_model$camera4 = model.camera).setPosition.apply(_model$camera4, _toConsumableArray(originalPosition));
401
+ (_model$camera6 = model.camera).setPosition.apply(_model$camera6, _toConsumableArray(originalPosition));
358
402
 
359
- (_model$camera5 = model.camera).setViewUp.apply(_model$camera5, _toConsumableArray(originalViewUp));
403
+ (_model$camera7 = model.camera).setViewUp.apply(_model$camera7, _toConsumableArray(originalViewUp));
360
404
 
361
405
  return publicAPI.moveCamera(destFocalPoint, destPosition, destViewUp, animateSteps);
362
406
  }; // --------------------------------------------------------------------------
@@ -447,18 +491,18 @@ function vtkViewProxy(publicAPI, model) {
447
491
 
448
492
  var consumeAnimationStack = function consumeAnimationStack() {
449
493
  if (animationStack.length) {
450
- var _model$camera6, _model$camera7, _model$camera8;
494
+ var _model$camera8, _model$camera9, _model$camera10;
451
495
 
452
496
  var _animationStack$pop = animationStack.pop(),
453
497
  cameraFocalPoint = _animationStack$pop.focalPoint,
454
498
  cameraPosition = _animationStack$pop.position,
455
499
  cameraViewUp = _animationStack$pop.viewUp;
456
500
 
457
- (_model$camera6 = model.camera).setFocalPoint.apply(_model$camera6, _toConsumableArray(cameraFocalPoint));
501
+ (_model$camera8 = model.camera).setFocalPoint.apply(_model$camera8, _toConsumableArray(cameraFocalPoint));
458
502
 
459
- (_model$camera7 = model.camera).setPosition.apply(_model$camera7, _toConsumableArray(cameraPosition));
503
+ (_model$camera9 = model.camera).setPosition.apply(_model$camera9, _toConsumableArray(cameraPosition));
460
504
 
461
- (_model$camera8 = model.camera).setViewUp.apply(_model$camera8, _toConsumableArray(cameraViewUp));
505
+ (_model$camera10 = model.camera).setViewUp.apply(_model$camera10, _toConsumableArray(cameraViewUp));
462
506
 
463
507
  model.renderer.resetCameraClippingRange();
464
508
 
@@ -484,7 +528,7 @@ function vtkViewProxy(publicAPI, model) {
484
528
 
485
529
 
486
530
  publicAPI.rotate = function (angle) {
487
- var _model$camera9;
531
+ var _model$camera11;
488
532
 
489
533
  var _model$camera$get = model.camera.get('viewUp', 'focalPoint', 'position'),
490
534
  viewUp = _model$camera$get.viewUp,
@@ -494,7 +538,7 @@ function vtkViewProxy(publicAPI, model) {
494
538
  var axis = [focalPoint[0] - position[0], focalPoint[1] - position[1], focalPoint[2] - position[2]];
495
539
  vtkMatrixBuilder.buildFromDegree().rotate(Number.isNaN(angle) ? 90 : angle, axis).apply(viewUp);
496
540
 
497
- (_model$camera9 = model.camera).setViewUp.apply(_model$camera9, _toConsumableArray(viewUp));
541
+ (_model$camera11 = model.camera).setViewUp.apply(_model$camera11, _toConsumableArray(viewUp));
498
542
 
499
543
  model.camera.modified();
500
544
  model.orientationWidget.updateMarkerOrientation();
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import { mat4, vec4, vec3, quat } from 'gl-matrix';
3
3
  import macro from '../../macros.js';
4
- import { r as radiansFromDegrees, l as add, k as cross } from '../../Common/Core/Math/index.js';
4
+ import { r as radiansFromDegrees, k as add, j as cross } from '../../Common/Core/Math/index.js';
5
5
 
6
6
  var vtkDebugMacro = macro.vtkDebugMacro;
7
7
  /* eslint-disable new-cap */
@@ -6,7 +6,7 @@ import vtkPicker from './Picker.js';
6
6
  import vtkPolyLine from '../../Common/DataModel/PolyLine.js';
7
7
  import vtkTriangle from '../../Common/DataModel/Triangle.js';
8
8
  import vtkQuad from '../../Common/DataModel/Quad.js';
9
- import { m as normalize } from '../../Common/Core/Math/index.js';
9
+ import { l as normalize } from '../../Common/Core/Math/index.js';
10
10
  import { CellType } from '../../Common/DataModel/CellTypes/Constants.js';
11
11
  import { vec3 } from 'gl-matrix';
12
12
 
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
- import { h as hsv2rgb, i as isNan, G as isInf, H as rgb2hsv, I as rgb2lab, J as lab2rgb, K as floor } from '../../Common/Core/Math/index.js';
3
+ import { h as hsv2rgb, i as isNan, F as isInf, G as rgb2hsv, H as rgb2lab, I as lab2rgb, J as floor } from '../../Common/Core/Math/index.js';
4
4
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors.js';
5
5
  import Constants from './ColorTransferFunction/Constants.js';
6
6
 
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
3
  import Constants from './Coordinate/Constants.js';
4
- import { L as round, K as floor } from '../../Common/Core/Math/index.js';
4
+ import { K as round, J as floor } from '../../Common/Core/Math/index.js';
5
5
 
6
6
  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; }
7
7
 
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import { vec3, mat4 } from 'gl-matrix';
4
4
  import * as d3 from 'd3-scale';
5
- import { M as normalize2D, N as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
5
+ import { L as normalize2D, M as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
6
6
  import macro from '../../macros.js';
7
7
  import vtkActor from './Actor.js';
8
8
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
@@ -4,7 +4,7 @@ import { mat4, vec3, mat3 } from 'gl-matrix';
4
4
  import Constants from './Glyph3DMapper/Constants.js';
5
5
  import macro from '../../macros.js';
6
6
  import vtkMapper from './Mapper.js';
7
- import { O as createUninitializedBounds, n as norm } from '../../Common/Core/Math/index.js';
7
+ import { N as createUninitializedBounds, n as norm } from '../../Common/Core/Math/index.js';
8
8
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
9
9
 
10
10
  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; }
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import Constants from './ImageMapper/Constants.js';
3
3
  import macro from '../../macros.js';
4
4
  import vtkAbstractMapper from './AbstractMapper.js';
5
- import { D as clampValue, P as multiply3x3_vect3, O as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
+ import { C as clampValue, O as multiply3x3_vect3, N as createUninitializedBounds } from '../../Common/Core/Math/index.js';
6
6
  import vtkPlane from '../../Common/DataModel/Plane.js';
7
7
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
8
8
  import { vec3 } from 'gl-matrix';
@@ -1,5 +1,5 @@
1
1
  import macro from '../../macros.js';
2
- import { m as normalize, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
2
+ import { l as normalize, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
3
3
  import { vec3 } from 'gl-matrix';
4
4
 
5
5
  var LIGHT_TYPES = ['HeadLight', 'CameraLight', 'SceneLight']; // ----------------------------------------------------------------------------
@@ -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 { O 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, m as normalize, n as norm, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
5
+ import { d as dot, l as normalize, n as norm, e 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; }
@@ -1,7 +1,7 @@
1
1
  import { mat4, quat } from 'gl-matrix';
2
2
  import macro from '../../macros.js';
3
3
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
4
- import { B as degreesFromRadians, r as radiansFromDegrees, a as areMatricesEqual } from '../../Common/Core/Math/index.js';
4
+ import { A as degreesFromRadians, r as radiansFromDegrees, a as areMatricesEqual } from '../../Common/Core/Math/index.js';
5
5
  import vtkProp from './Prop.js';
6
6
 
7
7
  // vtkProp3D methods
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import macro from '../../macros.js';
4
- import { B as degreesFromRadians } from '../../Common/Core/Math/index.js';
4
+ import { A as degreesFromRadians } from '../../Common/Core/Math/index.js';
5
5
  import Constants from './RenderWindowInteractor/Constants.js';
6
6
 
7
7
  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; }
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import { newInstance as newInstance$1, get, setGet, getArray, setGetArray, moveToProtected, 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 { Q as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, O as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
+ import { P 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
 
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import * as d3 from 'd3-scale';
4
- import { N as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
4
+ import { M as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
5
5
  import macro from '../../macros.js';
6
6
  import vtkActor from './Actor.js';
7
7
  import vtkDataArray from '../../Common/Core/DataArray.js';
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
- import { O as createUninitializedBounds, D as clampValue, K as floor } from '../../Common/Core/Math/index.js';
3
+ import { N as createUninitializedBounds, C as clampValue, J as floor } from '../../Common/Core/Math/index.js';
4
4
  import Constants from './VolumeMapper/Constants.js';
5
5
  import vtkAbstractMapper from './AbstractMapper.js';
6
6
  import vtkPiecewiseFunction from '../../Common/DataModel/PiecewiseFunction.js';
@@ -4,7 +4,7 @@ import { mat3, mat4, vec3 } from 'gl-matrix';
4
4
  import { newInstance as newInstance$1, setGet, obj, vtkErrorMacro as vtkErrorMacro$1 } from '../../macros.js';
5
5
  import vtkHelper from './Helper.js';
6
6
  import vtkMapper from '../Core/Mapper.js';
7
- import { m as normalize, u as uninitializeBounds } from '../../Common/Core/Math/index.js';
7
+ import { l as normalize, u as uninitializeBounds } from '../../Common/Core/Math/index.js';
8
8
  import vtkOpenGLTexture from './Texture.js';
9
9
  import vtkProp from '../Core/Prop.js';
10
10
  import vtkProperty from '../Core/Property.js';
@@ -8,7 +8,7 @@ import { v as vtkPolyData2DVS } from './glsl/vtkPolyData2DVS.glsl.js';
8
8
  import vtkReplacementShaderMapper from './ReplacementShaderMapper.js';
9
9
  import vtkShaderProgram from './ShaderProgram.js';
10
10
  import vtkViewNode from '../SceneGraph/ViewNode.js';
11
- import { L as round } from '../../Common/Core/Math/index.js';
11
+ import { K as round } from '../../Common/Core/Math/index.js';
12
12
  import { DisplayLocation } from '../Core/Property2D/Constants.js';
13
13
  import { registerOverride } from './ViewNodeFactory.js';
14
14
 
@@ -3,7 +3,7 @@ import Constants from './Texture/Constants.js';
3
3
  import HalfFloat from '../../Common/Core/HalfFloat.js';
4
4
  import { newInstance as newInstance$1, obj, set, setGet, get, moveToProtected, newTypedArray, vtkDebugMacro as vtkDebugMacro$1, vtkErrorMacro as vtkErrorMacro$1, vtkWarningMacro as vtkWarningMacro$1 } from '../../macros.js';
5
5
  import vtkDataArray from '../../Common/Core/DataArray.js';
6
- import { R as isPowerOfTwo, N as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
6
+ import { Q as isPowerOfTwo, M as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
7
7
  import vtkViewNode from '../SceneGraph/ViewNode.js';
8
8
  import { registerOverride } from './ViewNodeFactory.js';
9
9
 
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import { newInstance as newInstance$1, obj, setGet, vtkErrorMacro as vtkErrorMacro$1, newTypedArray } from '../../macros.js';
3
- import { k as cross, m as normalize } from '../../Common/Core/Math/index.js';
3
+ import { j as cross, l as normalize } from '../../Common/Core/Math/index.js';
4
4
  import vtkDataArray from '../../Common/Core/DataArray.js';
5
5
  import vtkWebGPUBuffer from './Buffer.js';
6
6
  import vtkWebGPUIndexBuffer from './IndexBuffer.js';
@@ -11,7 +11,7 @@ import vtkWebGPUTexture from './Texture.js';
11
11
  import vtkWebGPUUniformBuffer from './UniformBuffer.js';
12
12
  import vtkWebGPUFullScreenQuad from './FullScreenQuad.js';
13
13
  import vtkWebGPUVolumePassFSQ from './VolumePassFSQ.js';
14
- import { f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
14
+ import { e as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
15
15
 
16
16
  var Representation = vtkProperty.Representation;
17
17
  var BufferUsage = vtkWebGPUBufferManager.BufferUsage,
@@ -1,5 +1,5 @@
1
1
  import macro from '../../../macros.js';
2
- import { m as normalize, k as cross } from '../../../Common/Core/Math/index.js';
2
+ import { l as normalize, j as cross } from '../../../Common/Core/Math/index.js';
3
3
 
4
4
  function eq(v1, v2) {
5
5
  return v1.length === 3 && v2.length === 3 && v1[0] === v2[0] && v1[1] === v2[1] && v1[2] === v2[2];
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
- import { s as subtract, k as cross, d as dot, x as multiplyScalar, l as add } from '../../Common/Core/Math/index.js';
3
+ import { s as subtract, j as cross, d as dot, w as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
4
4
  import vtkAbstractManipulator from './AbstractManipulator.js';
5
5
 
6
6
  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; }
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import { mat4, vec3 } from 'gl-matrix';
3
3
  import macro from '../../macros.js';
4
- import { k as cross, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
4
+ import { j as cross, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
5
5
  import vtkAbstractManipulator from './AbstractManipulator.js';
6
6
 
7
7
  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; }
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import macro from '../../macros.js';
3
3
  import vtkActor from '../../Rendering/Core/Actor.js';
4
4
  import vtkMapper from '../../Rendering/Core/Mapper.js';
5
- import { C as areEquals } from '../../Common/Core/Math/index.js';
5
+ import { B as areEquals } from '../../Common/Core/Math/index.js';
6
6
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
7
7
  import vtkTubeFilter from '../../Filters/General/TubeFilter.js';
8
8
  import vtkWidgetRepresentation, { allocateArray, getPixelWorldHeightAtCoord } from './WidgetRepresentation.js';
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
3
  import macro from '../../macros.js';
4
4
  import vtkProp from '../../Rendering/Core/Prop.js';
5
- import { g as vtkMath } from '../../Common/Core/Math/index.js';
5
+ import { f as vtkMath } from '../../Common/Core/Math/index.js';
6
6
  import vtkCellArray from '../../Common/Core/CellArray.js';
7
7
  import vtkDataArray from '../../Common/Core/DataArray.js';
8
8
  import vtkPoints from '../../Common/Core/Points.js';
@@ -4,7 +4,7 @@ import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
4
4
  import vtkPlanePointManipulator from '../Manipulators/PlaneManipulator.js';
5
5
  import vtkPolyLineRepresentation from '../Representations/PolyLineRepresentation.js';
6
6
  import vtkSphereHandleRepresentation from '../Representations/SphereHandleRepresentation.js';
7
- import { s as subtract, S as angleBetweenVectors } from '../../Common/Core/Math/index.js';
7
+ import { s as subtract, R as angleBetweenVectors } from '../../Common/Core/Math/index.js';
8
8
  import widgetBehavior from './AngleWidget/behavior.js';
9
9
  import generateState from './AngleWidget/state.js';
10
10
  import { ViewTypes } from '../Core/WidgetManager/Constants.js';
@@ -4,7 +4,7 @@ import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
4
4
  import vtkPlanePointManipulator from '../Manipulators/PlaneManipulator.js';
5
5
  import vtkPolyLineRepresentation from '../Representations/PolyLineRepresentation.js';
6
6
  import vtkSphereHandleRepresentation from '../Representations/SphereHandleRepresentation.js';
7
- import { f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
7
+ import { e as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
8
8
  import widgetBehavior from './DistanceWidget/behavior.js';
9
9
  import generateState from './DistanceWidget/state.js';
10
10
  import { ViewTypes } from '../Core/WidgetManager/Constants.js';
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import Constants from './Constants.js';
3
3
  import macro from '../../../macros.js';
4
- import { s as subtract, l as add, m as normalize } from '../../../Common/Core/Math/index.js';
4
+ import { s as subtract, k as add, l as normalize } from '../../../Common/Core/Math/index.js';
5
5
  import { getNumberOfPlacedHandles, isHandlePlaced, calculateTextPosition, updateTextPosition, getPoint } from './helpers.js';
6
6
 
7
7
  var ShapeType = Constants.ShapeType; // Total number of points to place
@@ -1,4 +1,4 @@
1
- import { s as subtract, x as multiplyScalar, l as add, C as areEquals } from '../../../Common/Core/Math/index.js';
1
+ import { s as subtract, w as multiplyScalar, k as add, B as areEquals } from '../../../Common/Core/Math/index.js';
2
2
 
3
3
  function calculateTextPosition(model) {
4
4
  var vector = [0, 0, 0];
@@ -1,5 +1,5 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import { f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
2
+ import { e as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
3
3
  import macro from '../../macros.js';
4
4
  import generateState from './LineWidget/state.js';
5
5
  import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
@@ -3,7 +3,7 @@ import macro from '../../../macros.js';
3
3
  import vtkBoundingBox from '../../../Common/DataModel/BoundingBox.js';
4
4
  import vtkLine from '../../../Common/DataModel/Line.js';
5
5
  import vtkPlanePointManipulator from '../../Manipulators/PlaneManipulator.js';
6
- import { l as add, m as normalize, d as dot, k as cross, s as subtract, o as multiplyAccumulate, x as multiplyScalar, T as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
6
+ import { k as add, l as normalize, d as dot, j as cross, s as subtract, m as multiplyAccumulate, w as multiplyScalar, S as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
7
7
  import { getOtherLineName, updateState, boundPointOnPlane, getLinePlaneName, getLineInPlaneName, rotateVector } from './helpers.js';
8
8
  import { InteractionMethodsName, lineNames, ScrollingMethods, planeNameToViewType } from './Constants.js';
9
9