@kitware/vtk.js 34.5.0 → 34.6.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 (63) hide show
  1. package/Common/Core/CellArray.d.ts +3 -0
  2. package/Common/Core/CellArray.js +12 -1
  3. package/Common/Core/DataArray.d.ts +15 -0
  4. package/Common/Core/DataArray.js +8 -4
  5. package/Common/Core/Math/index.js +1 -1
  6. package/Common/Core/Math.js +1 -1
  7. package/Common/DataModel/Triangle.d.ts +68 -19
  8. package/Common/DataModel/Triangle.js +140 -1
  9. package/Common/DataModel/TriangleStrip.d.ts +180 -0
  10. package/Common/DataModel/TriangleStrip.js +396 -0
  11. package/Common/DataModel.js +3 -1
  12. package/Common/Transform/LandmarkTransform.js +1 -1
  13. package/Common/Transform/Transform.d.ts +112 -1
  14. package/Common/Transform/Transform.js +301 -2
  15. package/Filters/Core/Cutter.js +41 -0
  16. package/Filters/General/OBBTree.js +1 -1
  17. package/Filters/General/TransformPolyDataFilter.d.ts +75 -0
  18. package/Filters/General/TransformPolyDataFilter.js +194 -0
  19. package/Filters/General.js +2 -0
  20. package/Filters/Sources/CircleSource.js +1 -1
  21. package/Filters/Sources/PointSource.js +1 -1
  22. package/Filters/Texture/TextureMapToPlane.js +1 -1
  23. package/IO/Geometry/DracoReader.js +1 -1
  24. package/IO/Geometry/GLTFImporter/Animations.js +1 -1
  25. package/IO/Geometry/GLTFImporter/Reader.js +2 -2
  26. package/IO/Image/HDRReader/Utils.js +1 -1
  27. package/IO/Image/HDRReader.js +1 -1
  28. package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -1
  29. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
  30. package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
  31. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
  32. package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -1
  33. package/Interaction/Widgets/PiecewiseGaussianWidget.js +1 -1
  34. package/Proxy/Core/View2DProxy.js +1 -1
  35. package/Rendering/Core/AbstractImageMapper.js +1 -1
  36. package/Rendering/Core/AbstractMapper3D.js +1 -1
  37. package/Rendering/Core/ColorTransferFunction/CssFilters.js +1 -1
  38. package/Rendering/Core/ColorTransferFunction.js +1 -1
  39. package/Rendering/Core/Coordinate.js +1 -1
  40. package/Rendering/Core/CubeAxesActor.js +1 -1
  41. package/Rendering/Core/Glyph3DMapper.js +1 -1
  42. package/Rendering/Core/ImageArrayMapper.js +1 -1
  43. package/Rendering/Core/ImageMapper.js +1 -1
  44. package/Rendering/Core/Mapper.js +1 -1
  45. package/Rendering/Core/Prop3D.js +1 -1
  46. package/Rendering/Core/RenderWindowInteractor.js +3 -3
  47. package/Rendering/Core/Renderer.js +1 -1
  48. package/Rendering/Core/ScalarBarActor.js +1 -1
  49. package/Rendering/Core/TextActor.js +1 -1
  50. package/Rendering/Core/VectorText/Utils.js +1 -1
  51. package/Rendering/Core/VolumeProperty.js +1 -1
  52. package/Rendering/OpenGL/PolyDataMapper2D.js +1 -1
  53. package/Rendering/OpenGL/Texture.js +1 -1
  54. package/Rendering/OpenGL/VolumeMapper.js +21 -19
  55. package/Widgets/Manipulators/LineManipulator.js +1 -1
  56. package/Widgets/Representations/PolyLineRepresentation.js +1 -1
  57. package/Widgets/Widgets3D/AngleWidget.js +1 -1
  58. package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
  59. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  60. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
  61. package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
  62. package/index.d.ts +2 -0
  63. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
3
3
  import vtkMatrixBuilder from '../../Common/Core/MatrixBuilder.js';
4
- import { w as multiplyScalar } from '../../Common/Core/Math/index.js';
4
+ import { x as multiplyScalar } from '../../Common/Core/Math/index.js';
5
5
 
6
6
  // ----------------------------------------------------------------------------
7
7
  // vtkCircleSource methods
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { x as random } from '../../Common/Core/Math/index.js';
2
+ import { y as random } from '../../Common/Core/Math/index.js';
3
3
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
4
4
 
5
5
  // ----------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkDataArray from '../../Common/Core/DataArray.js';
3
- import { l as normalize, d as dot, j as cross, e as distance2BetweenPoints, y as determinant3x3, z as rowsToMat3 } from '../../Common/Core/Math/index.js';
3
+ import { l as normalize, d as dot, j as cross, e as distance2BetweenPoints, z as determinant3x3, A as rowsToMat3 } from '../../Common/Core/Math/index.js';
4
4
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
5
5
 
6
6
  const {
@@ -137,7 +137,7 @@ function getPolyDataFromDracoGeometry(decoder, dracoGeometry) {
137
137
  const indices = decodeIndices(decoder, dracoGeometry);
138
138
  const nCells = indices.length - 2;
139
139
  const cells = vtkCellArray.newInstance();
140
- cells.resize(4 * indices.length / 3);
140
+ cells.allocate(4 * indices.length / 3);
141
141
  for (let cellId = 0; cellId < nCells; cellId += 3) {
142
142
  const cell = indices.slice(cellId, cellId + 3);
143
143
  cells.insertNextCell(cell);
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../../macros2.js';
2
- import { A as degreesFromRadians } from '../../../Common/Core/Math/index.js';
2
+ import { B as degreesFromRadians } from '../../../Common/Core/Math/index.js';
3
3
  import { quat, vec3 } from 'gl-matrix';
4
4
 
5
5
  const {
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../../macros2.js';
2
- import { A as degreesFromRadians } from '../../../Common/Core/Math/index.js';
2
+ import { B as degreesFromRadians } from '../../../Common/Core/Math/index.js';
3
3
  import vtkActor from '../../../Rendering/Core/Actor.js';
4
4
  import vtkCamera from '../../../Rendering/Core/Camera.js';
5
5
  import vtkDataArray from '../../../Common/Core/DataArray.js';
@@ -125,7 +125,7 @@ async function createPolyDataFromGLTFMesh(primitive) {
125
125
  vtkWarningMacro('GL_LINE_LOOP not implemented');
126
126
  break;
127
127
  default:
128
- cells.resize(4 * indices.length / 3);
128
+ cells.allocate(4 * indices.length / 3);
129
129
  for (let cellId = 0; cellId < nCells; cellId += 3) {
130
130
  const cell = indices.slice(cellId, cellId + 3);
131
131
  cells.insertNextCell(cell);
@@ -1,4 +1,4 @@
1
- import { B as ldexp } from '../../../Common/Core/Math/index.js';
1
+ import { C as ldexp } from '../../../Common/Core/Math/index.js';
2
2
 
3
3
  /**
4
4
  * Read a line from a Uint8Array
@@ -1,7 +1,7 @@
1
1
  import '../Core/DataAccessHelper/LiteHttpDataAccessHelper.js';
2
2
  import { m as macro } from '../../macros2.js';
3
3
  import DataAccessHelper from '../Core/DataAccessHelper.js';
4
- import { C as xyz2rgb } from '../../Common/Core/Math/index.js';
4
+ import { D as xyz2rgb } from '../../Common/Core/Math/index.js';
5
5
  import vtkImageData from '../../Common/DataModel/ImageData.js';
6
6
  import vtkDataArray from '../../Common/Core/DataArray.js';
7
7
  import { readLine, rgbe2float } from './HDRReader/Utils.js';
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import { m as macro } from '../../macros2.js';
3
3
  import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
4
4
  import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
5
- import { r as radiansFromDegrees, A as degreesFromRadians } from '../../Common/Core/Math/index.js';
5
+ import { r as radiansFromDegrees, B as degreesFromRadians } from '../../Common/Core/Math/index.js';
6
6
 
7
7
  // ----------------------------------------------------------------------------
8
8
  // vtkMouseCameraTrackballRollManipulator methods
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import { m as macro } from '../../macros2.js';
3
3
  import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
4
4
  import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
5
- import { w as multiplyScalar, d as dot, k as add, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
5
+ import { x as multiplyScalar, d as dot, k as add, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
6
6
 
7
7
  // ----------------------------------------------------------------------------
8
8
  // vtkMouseCameraTrackballRotateManipulator methods
@@ -3,7 +3,7 @@ import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
3
3
  import vtkInteractorStyleConstants from '../../Rendering/Core/InteractorStyle/Constants.js';
4
4
  import vtkMouseCameraUnicamRotateManipulator from './MouseCameraUnicamRotateManipulator.js';
5
5
  import { m as macro } from '../../macros2.js';
6
- import { s as subtract, w as multiplyScalar, l as normalize, d as dot, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
6
+ import { s as subtract, x as multiplyScalar, l as normalize, d as dot, r as radiansFromDegrees, j as cross } from '../../Common/Core/Math/index.js';
7
7
 
8
8
  const {
9
9
  States
@@ -8,7 +8,7 @@ import vtkSphereSource from '../../Filters/Sources/SphereSource.js';
8
8
  import { FieldAssociations } from '../../Common/DataModel/DataSet/Constants.js';
9
9
  import { mat4, vec3 } from 'gl-matrix';
10
10
  import { m as macro } from '../../macros2.js';
11
- import { D as areEquals, l as normalize, d as dot, E as clampValue, s as subtract, j as cross, w as multiplyScalar, e as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
11
+ import { E as areEquals, l as normalize, d as dot, F as clampValue, s as subtract, j as cross, x as multiplyScalar, e as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
12
12
 
13
13
  const {
14
14
  States
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkInteractorStyle from '../../Rendering/Core/InteractorStyle.js';
3
3
  import vtkInteractorStyleConstants from '../../Rendering/Core/InteractorStyle/Constants.js';
4
- import { A as degreesFromRadians } from '../../Common/Core/Math/index.js';
4
+ import { B as degreesFromRadians } from '../../Common/Core/Math/index.js';
5
5
  import { Device, Input } from '../../Rendering/Core/RenderWindowInteractor/Constants.js';
6
6
 
7
7
  const {
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { F as arrayRange } from '../../Common/Core/Math/index.js';
2
+ import { G as arrayRange } from '../../Common/Core/Math/index.js';
3
3
  import WebworkerPromise from 'webworker-promise';
4
4
  import { W as WorkerFactory } from '../../_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkMouseRangeManipulator from '../../Interaction/Manipulators/MouseRangeManipulator.js';
3
3
  import vtkViewProxy from './ViewProxy.js';
4
- import { j as cross, G as getMajorAxisIndex, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
4
+ import { j as cross, H as getMajorAxisIndex, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
5
5
  import { mat4, vec3 } from 'gl-matrix';
6
6
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
7
7
 
@@ -1,6 +1,6 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkAbstractMapper3D from './AbstractMapper3D.js';
3
- import { H as createUninitializedBounds } from '../../Common/Core/Math/index.js';
3
+ import { I as createUninitializedBounds } from '../../Common/Core/Math/index.js';
4
4
 
5
5
  // ----------------------------------------------------------------------------
6
6
  // vtkAbstractImageMapper methods
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkAbstractMapper from './AbstractMapper.js';
3
3
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
4
- import { H as createUninitializedBounds } from '../../Common/Core/Math/index.js';
4
+ import { I as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
5
 
6
6
  // ----------------------------------------------------------------------------
7
7
  // vtkAbstractMapper methods
@@ -1,4 +1,4 @@
1
- import { I as identity, J as multiplyMatrix } from '../../../Common/Core/Math/index.js';
1
+ import { J as identity, K as multiplyMatrix } from '../../../Common/Core/Math/index.js';
2
2
 
3
3
  /**
4
4
  * A helper file to transform RGBA points using CSS filters equivalent
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { h as hsv2rgb, i as isNan, K as floor, L as isInf, M as rgb2hsv, N as rgb2lab, O as lab2rgb } from '../../Common/Core/Math/index.js';
2
+ import { h as hsv2rgb, i as isNan, L as floor, M as isInf, N as rgb2hsv, O as rgb2lab, P as lab2rgb } from '../../Common/Core/Math/index.js';
3
3
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors.js';
4
4
  import Constants from './ColorTransferFunction/Constants.js';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import Constants from './Coordinate/Constants.js';
3
- import { P as round, K as floor } from '../../Common/Core/Math/index.js';
3
+ import { Q as round, L as floor } from '../../Common/Core/Math/index.js';
4
4
 
5
5
  const {
6
6
  Coordinate
@@ -1,6 +1,6 @@
1
1
  import { vec3, mat4 } from 'gl-matrix';
2
2
  import * as d3 from 'd3-scale';
3
- import { Q as normalize2D, R as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
3
+ import { R as normalize2D, S as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
4
4
  import { m as macro } from '../../macros2.js';
5
5
  import vtkActor from './Actor.js';
6
6
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
@@ -2,7 +2,7 @@ import { mat4, vec3, mat3 } from 'gl-matrix';
2
2
  import Constants from './Glyph3DMapper/Constants.js';
3
3
  import { m as macro } from '../../macros2.js';
4
4
  import vtkMapper from './Mapper.js';
5
- import { H as createUninitializedBounds, n as norm } from '../../Common/Core/Math/index.js';
5
+ import { I as createUninitializedBounds, n as norm } from '../../Common/Core/Math/index.js';
6
6
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
7
7
 
8
8
  const {
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkAbstractImageMapper from './AbstractImageMapper.js';
3
3
  import vtkImageMapper from './ImageMapper.js';
4
- import { H as createUninitializedBounds } from '../../Common/Core/Math/index.js';
4
+ import { I as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
5
  import { intersectWithLineForPointPicking, intersectWithLineForCellPicking } from './AbstractImageMapper/helper.js';
6
6
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
7
7
 
@@ -2,7 +2,7 @@ import Constants from './ImageMapper/Constants.js';
2
2
  import { m as macro } from '../../macros2.js';
3
3
  import vtkAbstractImageMapper from './AbstractImageMapper.js';
4
4
  import { intersectWithLineForPointPicking, intersectWithLineForCellPicking } from './AbstractImageMapper/helper.js';
5
- import { E as clampValue, S as multiply3x3_vect3, H as createUninitializedBounds, T as getSparseOrthogonalMatrix } from '../../Common/Core/Math/index.js';
5
+ import { F as clampValue, T as multiply3x3_vect3, I as createUninitializedBounds, U as getSparseOrthogonalMatrix } from '../../Common/Core/Math/index.js';
6
6
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
7
7
 
8
8
  const {
@@ -3,7 +3,7 @@ import vtkAbstractMapper3D from './AbstractMapper3D.js';
3
3
  import vtkDataArray from '../../Common/Core/DataArray.js';
4
4
  import vtkImageData from '../../Common/DataModel/ImageData.js';
5
5
  import vtkLookupTable from '../../Common/Core/LookupTable.js';
6
- import { H as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
6
+ import { I as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
7
7
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors/Constants.js';
8
8
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
9
9
  import Constants from './Mapper/Constants.js';
@@ -1,7 +1,7 @@
1
1
  import { mat4, quat } from 'gl-matrix';
2
2
  import { m as macro } from '../../macros2.js';
3
3
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
4
- import { A as degreesFromRadians, r as radiansFromDegrees, a as areMatricesEqual } from '../../Common/Core/Math/index.js';
4
+ import { B 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
  const VTK_EPSILON = 1e-6;
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { A as degreesFromRadians } from '../../Common/Core/Math/index.js';
2
+ import { B as degreesFromRadians } from '../../Common/Core/Math/index.js';
3
3
  import Constants from './RenderWindowInteractor/Constants.js';
4
4
 
5
5
  const {
@@ -238,9 +238,9 @@ function vtkRenderWindowInteractor(publicAPI, model) {
238
238
  });
239
239
  container.removeEventListener('pointerup', publicAPI.handlePointerUp);
240
240
  container.removeEventListener('pointercancel', publicAPI.handlePointerCancel);
241
+ container.removeEventListener('keypress', publicAPI.handleKeyPress);
242
+ container.removeEventListener('keydown', publicAPI.handleKeyDown);
241
243
  }
242
- container.removeEventListener('keypress', publicAPI.handleKeyPress);
243
- container.removeEventListener('keydown', publicAPI.handleKeyDown);
244
244
  document.removeEventListener('keyup', publicAPI.handleKeyUp);
245
245
  document.removeEventListener('pointerlockchange', publicAPI.handlePointerLockChange);
246
246
  pointerCache.clear();
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import { n as newInstance$1, g as get, e as setGet, k as getArray, l as setGetArray, i as moveToProtected, c as macro } from '../../macros2.js';
3
3
  import vtkCamera from './Camera.js';
4
4
  import vtkLight from './Light.js';
5
- import { U as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, H as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
+ import { V as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, I 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,5 +1,5 @@
1
1
  import * as d3 from 'd3-scale';
2
- import { R as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
2
+ import { S as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
3
3
  import { m as macro } from '../../macros2.js';
4
4
  import vtkActor from './Actor.js';
5
5
  import vtkDataArray from '../../Common/Core/DataArray.js';
@@ -5,7 +5,7 @@ import vtkActor2D from './Actor2D.js';
5
5
  import vtkMapper2D from './Mapper2D.js';
6
6
  import vtkTextProperty from './TextProperty.js';
7
7
  import ImageHelper from '../../Common/Core/ImageHelper.js';
8
- import { V as floatRGB2HexCode } from '../../Common/Core/Math/index.js';
8
+ import { W as floatRGB2HexCode } from '../../Common/Core/Math/index.js';
9
9
 
10
10
  // ----------------------------------------------------------------------------
11
11
  // vtkTextActor methods
@@ -1,4 +1,4 @@
1
- import { D as areEquals } from '../../../Common/Core/Math/index.js';
1
+ import { E as areEquals } from '../../../Common/Core/Math/index.js';
2
2
 
3
3
  /**
4
4
  * Computes UV coordinates for top/bottom faces
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { E as clampValue, K as floor } from '../../Common/Core/Math/index.js';
2
+ import { F as clampValue, L as floor } from '../../Common/Core/Math/index.js';
3
3
  import vtkColorTransferFunction from './ColorTransferFunction.js';
4
4
  import vtkPiecewiseFunction from '../../Common/DataModel/PiecewiseFunction.js';
5
5
  import Constants from './VolumeProperty/Constants.js';
@@ -8,7 +8,7 @@ import vtkReplacementShaderMapper from './ReplacementShaderMapper.js';
8
8
  import vtkShaderProgram from './ShaderProgram.js';
9
9
  import vtkViewNode from '../SceneGraph/ViewNode.js';
10
10
  import vtkOpenGLTexture from './Texture.js';
11
- import { P as round } from '../../Common/Core/Math/index.js';
11
+ import { Q 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 { n as newInstance$1, o as obj, s as set, e as setGet, g as get, i as moveToProtected, a as newTypedArray, c as macro } from '../../macros2.js';
5
5
  import vtkDataArray from '../../Common/Core/DataArray.js';
6
- import { W as isPowerOfTwo, R as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
6
+ import { X as isPowerOfTwo, S 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
  import supportsNorm16LinearCached from './Texture/supportsNorm16Linear.js';
@@ -958,20 +958,28 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
958
958
  });
959
959
  }
960
960
  }
961
- const volumeProperties = actor.getProperties();
962
- const firstValidInput = model.currentValidInputs[0];
963
- const firstImageData = firstValidInput.imageData;
964
- const firstScalars = firstImageData.getPointData().getScalars();
965
- const firstVolumeProperty = volumeProperties[firstValidInput.inputIndex];
966
-
967
- // Get the number of lights
968
961
  let newNumberOfLights = 0;
969
- if (firstVolumeProperty.getShade() && model.renderable.getBlendMode() === BlendMode.COMPOSITE_BLEND) {
970
- ren.getLights().forEach(light => {
971
- if (light.getSwitch() > 0) {
972
- newNumberOfLights++;
973
- }
974
- });
962
+ if (model.currentValidInputs.length > 0) {
963
+ const volumeProperties = actor.getProperties();
964
+ const firstValidInput = model.currentValidInputs[0];
965
+ const firstImageData = firstValidInput.imageData;
966
+ const firstScalars = firstImageData.getPointData().getScalars();
967
+ const firstVolumeProperty = volumeProperties[firstValidInput.inputIndex];
968
+
969
+ // Get the number of lights
970
+ if (firstVolumeProperty.getShade() && model.renderable.getBlendMode() === BlendMode.COMPOSITE_BLEND) {
971
+ ren.getLights().forEach(light => {
972
+ if (light.getSwitch() > 0) {
973
+ newNumberOfLights++;
974
+ }
975
+ });
976
+ }
977
+
978
+ // Number of components
979
+ const numberOfValidInputs = model.currentValidInputs.length;
980
+ const multiTexturePerVolumeEnabled = numberOfValidInputs > 1;
981
+ model.numberOfComponents = multiTexturePerVolumeEnabled ? numberOfValidInputs : firstScalars.getNumberOfComponents();
982
+ model.useIndependentComponents = getUseIndependentComponents(firstVolumeProperty, model.numberOfComponents);
975
983
  }
976
984
  if (newNumberOfLights !== model.numberOfLights) {
977
985
  model.numberOfLights = newNumberOfLights;
@@ -983,12 +991,6 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
983
991
  if (model.currentValidInputs.length === 0) {
984
992
  return;
985
993
  }
986
-
987
- // Number of components
988
- const numberOfValidInputs = model.currentValidInputs.length;
989
- const multiTexturePerVolumeEnabled = numberOfValidInputs > 1;
990
- model.numberOfComponents = multiTexturePerVolumeEnabled ? numberOfValidInputs : firstScalars.getNumberOfComponents();
991
- model.useIndependentComponents = getUseIndependentComponents(firstVolumeProperty, model.numberOfComponents);
992
994
  publicAPI.renderPieceStart(ren, actor);
993
995
  publicAPI.renderPieceDraw(ren, actor);
994
996
  publicAPI.renderPieceFinish(ren, actor);
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { d as dot, s as subtract, j as cross, w as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
2
+ import { d as dot, s as subtract, j as cross, x as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
3
3
  import vtkAbstractManipulator from './AbstractManipulator.js';
4
4
  import { EPSILON } from '../../Common/Core/Math/Constants.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkActor from '../../Rendering/Core/Actor.js';
3
3
  import vtkMapper from '../../Rendering/Core/Mapper.js';
4
- import { D as areEquals } from '../../Common/Core/Math/index.js';
4
+ import { E as areEquals } from '../../Common/Core/Math/index.js';
5
5
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
6
6
  import vtkTubeFilter from '../../Filters/General/TubeFilter.js';
7
7
  import { getPixelWorldHeightAtCoord } from '../Core/WidgetManager.js';
@@ -3,7 +3,7 @@ import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
3
3
  import vtkPlanePointManipulator from '../Manipulators/PlaneManipulator.js';
4
4
  import vtkPolyLineRepresentation from '../Representations/PolyLineRepresentation.js';
5
5
  import vtkSphereHandleRepresentation from '../Representations/SphereHandleRepresentation.js';
6
- import { s as subtract, X as angleBetweenVectors } from '../../Common/Core/Math/index.js';
6
+ import { s as subtract, Y as angleBetweenVectors } from '../../Common/Core/Math/index.js';
7
7
  import widgetBehavior from './AngleWidget/behavior.js';
8
8
  import generateState from './AngleWidget/state.js';
9
9
  import { ViewTypes } from '../Core/WidgetManager/Constants.js';
@@ -1,4 +1,4 @@
1
- import { s as subtract, w as multiplyScalar, k as add, D as areEquals } from '../../../Common/Core/Math/index.js';
1
+ import { s as subtract, x as multiplyScalar, k as add, E as areEquals } from '../../../Common/Core/Math/index.js';
2
2
 
3
3
  function calculateTextPosition(model) {
4
4
  const vector = [0, 0, 0];
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../../macros2.js';
2
2
  import vtkBoundingBox from '../../../Common/DataModel/BoundingBox.js';
3
3
  import vtkLine from '../../../Common/DataModel/Line.js';
4
- import { k as add, l as normalize, s as subtract, d as dot, j as cross, m as multiplyAccumulate, w as multiplyScalar, Y as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
4
+ import { k as add, l as normalize, s as subtract, d as dot, j as cross, m as multiplyAccumulate, x as multiplyScalar, Z as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
5
5
  import { getLineNames, getOtherLineName, updateState, boundPointOnPlane, getLinePlaneName, getLineInPlaneName, rotateVector } from './helpers.js';
6
6
  import { InteractionMethodsName, ScrollingMethods, planeNameToViewType } from './Constants.js';
7
7
 
@@ -2,7 +2,7 @@ import vtkBoundingBox, { STATIC } from '../../../Common/DataModel/BoundingBox.js
2
2
  import vtkCubeSource from '../../../Filters/Sources/CubeSource.js';
3
3
  import vtkCutter from '../../../Filters/Core/Cutter.js';
4
4
  import vtkPlane from '../../../Common/DataModel/Plane.js';
5
- import { s as subtract, l as normalize, j as cross, w as multiplyScalar, m as multiplyAccumulate, Y as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
5
+ import { s as subtract, l as normalize, j as cross, x as multiplyScalar, m as multiplyAccumulate, Z as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
6
6
  import vtkMatrixBuilder from '../../../Common/Core/MatrixBuilder.js';
7
7
  import { viewTypeToPlaneName, planeNameToViewType, planeNames } from './Constants.js';
8
8
 
@@ -7,7 +7,7 @@ import vtkPlaneSource from '../../Filters/Sources/PlaneSource.js';
7
7
  import vtkPlanePointManipulator from '../Manipulators/PlaneManipulator.js';
8
8
  import vtkLineHandleRepresentation from '../Representations/LineHandleRepresentation.js';
9
9
  import vtkSphereHandleRepresentation from '../Representations/SphereHandleRepresentation.js';
10
- import { e as distance2BetweenPoints, m as multiplyAccumulate, s as subtract, l as normalize, w as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
10
+ import { e as distance2BetweenPoints, m as multiplyAccumulate, s as subtract, l as normalize, x as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
11
11
  import widgetBehavior from './ResliceCursorWidget/behavior.js';
12
12
  import generateState from './ResliceCursorWidget/state.js';
13
13
  import { updateState, transformPlane, boundPlane } from './ResliceCursorWidget/helpers.js';
package/index.d.ts CHANGED
@@ -52,6 +52,7 @@
52
52
  /// <reference path="./Common/DataModel/Spline3D/Constants.d.ts" />
53
53
  /// <reference path="./Common/DataModel/Spline3D.d.ts" />
54
54
  /// <reference path="./Common/DataModel/Triangle.d.ts" />
55
+ /// <reference path="./Common/DataModel/TriangleStrip.d.ts" />
55
56
  /// <reference path="./Common/Transform/LandmarkTransform.d.ts" />
56
57
  /// <reference path="./Common/Transform/Transform.d.ts" />
57
58
  /// <reference path="./Filters/Core/ThresholdPoints.d.ts" />
@@ -66,6 +67,7 @@
66
67
  /// <reference path="./Filters/General/ImageStreamline.d.ts" />
67
68
  /// <reference path="./Filters/General/LineFilter.d.ts" />
68
69
  /// <reference path="./Filters/General/OutlineFilter.d.ts" />
70
+ /// <reference path="./Filters/General/TransformPolyDataFilter.d.ts" />
69
71
  /// <reference path="./Filters/General/TriangleFilter.d.ts" />
70
72
  /// <reference path="./Filters/General/TubeFilter.d.ts" />
71
73
  /// <reference path="./Filters/Sources/Arrow2DSource.d.ts" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "34.5.0",
3
+ "version": "34.6.0",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",