@kitware/vtk.js 22.6.1 → 23.1.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 (157) hide show
  1. package/Common/Core/CellArray.d.ts +2 -2
  2. package/Common/Core/DataArray.d.ts +2 -2
  3. package/Common/Core/Endian.d.ts +3 -1
  4. package/Common/Core/ImageHelper.d.ts +1 -1
  5. package/Common/Core/LookupTable.d.ts +2 -2
  6. package/Common/Core/Math.d.ts +1 -1
  7. package/Common/Core/MatrixBuilder.d.ts +1 -1
  8. package/Common/Core/Points.d.ts +2 -2
  9. package/Common/Core/PriorityQueue.d.ts +1 -1
  10. package/Common/Core/ProgressHandler.d.ts +1 -1
  11. package/Common/Core/ScalarsToColors.d.ts +3 -3
  12. package/Common/Core/StringArray.d.ts +1 -1
  13. package/Common/Core/VariantArray.d.ts +1 -1
  14. package/Common/DataModel/Box.d.ts +2 -2
  15. package/Common/DataModel/CardinalSpline1D.d.ts +2 -2
  16. package/Common/DataModel/Cell.d.ts +3 -3
  17. package/Common/DataModel/Cone.d.ts +2 -2
  18. package/Common/DataModel/Cylinder.d.ts +2 -2
  19. package/Common/DataModel/DataSet.d.ts +2 -2
  20. package/Common/DataModel/DataSetAttributes/FieldData.d.ts +1 -1
  21. package/Common/DataModel/DataSetAttributes.d.ts +3 -3
  22. package/Common/DataModel/ITKHelper.js +16 -20
  23. package/Common/DataModel/ImageData.d.ts +36 -36
  24. package/Common/DataModel/KochanekSpline1D.d.ts +1 -1
  25. package/Common/DataModel/Line.d.ts +2 -2
  26. package/Common/DataModel/PiecewiseFunction.d.ts +2 -2
  27. package/Common/DataModel/Plane.d.ts +2 -2
  28. package/Common/DataModel/PointSet.d.ts +3 -3
  29. package/Common/DataModel/PolyData.d.ts +3 -3
  30. package/Common/DataModel/Polygon.d.ts +2 -2
  31. package/Common/DataModel/SelectionNode.d.ts +2 -2
  32. package/Common/DataModel/Sphere.d.ts +2 -2
  33. package/Common/DataModel/Spline1D.d.ts +1 -1
  34. package/Common/DataModel/Spline3D.d.ts +1 -1
  35. package/Common/DataModel/Triangle.d.ts +2 -2
  36. package/Common/Transform/LandmarkTransform.d.ts +2 -2
  37. package/Filters/General/AppendPolyData.d.ts +1 -1
  38. package/Filters/General/ImageCropFilter.d.ts +1 -1
  39. package/Filters/General/ImageOutlineFilter.d.ts +1 -1
  40. package/Filters/General/ImageSliceFilter.d.ts +2 -2
  41. package/Filters/General/ImageStreamline.d.ts +135 -0
  42. package/Filters/General/LineFilter.d.ts +1 -1
  43. package/Filters/General/OutlineFilter.d.ts +1 -1
  44. package/Filters/General/TriangleFilter.d.ts +1 -1
  45. package/Filters/General/TubeFilter.d.ts +2 -2
  46. package/Filters/Sources/Arrow2DSource.d.ts +2 -2
  47. package/Filters/Sources/ArrowSource.d.ts +2 -2
  48. package/Filters/Sources/CircleSource.d.ts +2 -2
  49. package/Filters/Sources/ConeSource.d.ts +2 -2
  50. package/Filters/Sources/CubeSource.d.ts +2 -2
  51. package/Filters/Sources/Cursor3D.d.ts +3 -3
  52. package/Filters/Sources/CylinderSource.d.ts +2 -2
  53. package/Filters/Sources/LineSource.d.ts +2 -2
  54. package/Filters/Sources/PlaneSource.d.ts +2 -2
  55. package/Filters/Sources/PointSource.d.ts +2 -2
  56. package/Filters/Sources/SphereSource.d.ts +2 -2
  57. package/Filters/Texture/TextureMapToPlane.d.ts +1 -1
  58. package/Filters/Texture/TextureMapToSphere.d.ts +1 -1
  59. package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.d.ts +9 -0
  60. package/IO/Core/DataAccessHelper/HttpDataAccessHelper.d.ts +9 -0
  61. package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.d.ts +13 -0
  62. package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.d.ts +9 -0
  63. package/IO/Core/DataAccessHelper.d.ts +32 -0
  64. package/IO/Core/HttpDataSetReader.d.ts +226 -0
  65. package/IO/Core/HttpSceneLoader.d.ts +5 -5
  66. package/IO/Core/ImageStream/DefaultProtocol.d.ts +1 -1
  67. package/IO/Core/ImageStream/ViewStream.d.ts +4 -4
  68. package/IO/Core/ImageStream.d.ts +3 -3
  69. package/IO/Core/WSLinkClient.d.ts +1 -1
  70. package/IO/Geometry/DracoReader.d.ts +13 -9
  71. package/IO/Geometry/PLYReader.d.ts +13 -9
  72. package/IO/Geometry/PLYWriter.d.ts +2 -2
  73. package/IO/Geometry/STLReader.d.ts +14 -9
  74. package/IO/Geometry/STLWriter.d.ts +2 -2
  75. package/IO/Misc/ElevationReader.d.ts +11 -6
  76. package/IO/Misc/ITKImageReader.d.ts +1 -1
  77. package/IO/Misc/ITKPolyDataReader.d.ts +1 -1
  78. package/IO/Misc/JSONNucleoReader.d.ts +13 -9
  79. package/IO/Misc/JSONReader.d.ts +4 -4
  80. package/IO/Misc/MTLReader.d.ts +11 -7
  81. package/IO/Misc/OBJReader.d.ts +10 -6
  82. package/IO/Misc/PDBReader.d.ts +10 -6
  83. package/IO/XML/XMLImageDataReader.d.ts +1 -1
  84. package/IO/XML/XMLPolyDataReader.d.ts +1 -1
  85. package/IO/XML/XMLReader.d.ts +20 -16
  86. package/Interaction/Manipulators/MouseRangeManipulator.js +55 -1
  87. package/Interaction/Widgets/OrientationMarkerWidget.d.ts +22 -8
  88. package/Interaction/Widgets/OrientationMarkerWidget.js +62 -37
  89. package/Rendering/Core/AbstractMapper.d.ts +2 -2
  90. package/Rendering/Core/AbstractMapper3D.d.ts +2 -2
  91. package/Rendering/Core/AbstractPicker.d.ts +4 -4
  92. package/Rendering/Core/Actor.d.ts +21 -18
  93. package/Rendering/Core/Actor2D.d.ts +5 -5
  94. package/Rendering/Core/AnnotatedCubeActor.d.ts +1 -1
  95. package/Rendering/Core/AxesActor.d.ts +1 -1
  96. package/Rendering/Core/Camera.d.ts +2 -2
  97. package/Rendering/Core/CellPicker.d.ts +5 -5
  98. package/Rendering/Core/ColorTransferFunction.d.ts +1 -1
  99. package/Rendering/Core/Coordinate.d.ts +2 -2
  100. package/Rendering/Core/Follower.d.ts +2 -2
  101. package/Rendering/Core/Glyph3DMapper.d.ts +2 -2
  102. package/Rendering/Core/ImageMapper.d.ts +3 -3
  103. package/Rendering/Core/ImageProperty.d.ts +11 -2
  104. package/Rendering/Core/ImageProperty.js +3 -2
  105. package/Rendering/Core/ImageSlice.d.ts +4 -4
  106. package/Rendering/Core/Light.d.ts +2 -2
  107. package/Rendering/Core/Mapper.d.ts +5 -5
  108. package/Rendering/Core/Mapper2D.d.ts +4 -3
  109. package/Rendering/Core/Picker.d.ts +5 -5
  110. package/Rendering/Core/PixelSpaceCallbackMapper.d.ts +2 -2
  111. package/Rendering/Core/PointPicker.d.ts +3 -3
  112. package/Rendering/Core/Prop.d.ts +5 -5
  113. package/Rendering/Core/Prop3D.d.ts +2 -2
  114. package/Rendering/Core/Property.d.ts +2 -2
  115. package/Rendering/Core/Property2D.d.ts +2 -2
  116. package/Rendering/Core/RenderWindow.d.ts +4 -4
  117. package/Rendering/Core/RenderWindowInteractor.d.ts +2 -2
  118. package/Rendering/Core/Renderer.d.ts +17 -16
  119. package/Rendering/Core/ScalarBarActor.d.ts +3 -3
  120. package/Rendering/Core/Skybox.d.ts +1 -1
  121. package/Rendering/Core/SphereMapper.d.ts +1 -1
  122. package/Rendering/Core/StickMapper.d.ts +1 -1
  123. package/Rendering/Core/Texture.d.ts +1 -1
  124. package/Rendering/Core/Viewport.d.ts +4 -4
  125. package/Rendering/Core/Volume.d.ts +4 -4
  126. package/Rendering/Core/VolumeMapper.d.ts +2 -2
  127. package/Rendering/Core/VolumeProperty.d.ts +1 -1
  128. package/Rendering/Misc/CanvasView.d.ts +2 -2
  129. package/Rendering/Misc/FullScreenRenderWindow.d.ts +8 -8
  130. package/Rendering/Misc/GenericRenderWindow.d.ts +6 -6
  131. package/Rendering/Misc/RemoteView.d.ts +3 -3
  132. package/Rendering/Misc/RenderWindowWithControlBar.d.ts +2 -2
  133. package/Rendering/Misc/SynchronizableRenderWindow.d.ts +4 -3
  134. package/Rendering/Misc/TextureLODsDownloader.d.ts +4 -4
  135. package/Rendering/OpenGL/ImageMapper.js +1 -1
  136. package/Rendering/OpenGL/RenderWindow.d.ts +18 -18
  137. package/Rendering/OpenGL/VolumeMapper.js +16 -1
  138. package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
  139. package/Rendering/SceneGraph/RenderPass.d.ts +2 -2
  140. package/Rendering/SceneGraph/ViewNode.d.ts +2 -2
  141. package/Rendering/SceneGraph/ViewNodeFactory.d.ts +1 -1
  142. package/Rendering/WebGPU/HardwareSelectionPass.js +0 -1
  143. package/Rendering/WebGPU/ImageMapper.js +1 -1
  144. package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -3
  145. package/Rendering/WebGPU/RenderEncoder.js +1 -4
  146. package/Widgets/Core/AbstractWidgetFactory.js +5 -3
  147. package/Widgets/Manipulators/LineManipulator.d.ts +1 -1
  148. package/Widgets/Manipulators/PlaneManipulator.d.ts +1 -1
  149. package/Widgets/Manipulators/TrackballManipulator.d.ts +1 -1
  150. package/Widgets/Representations/ResliceCursorContextRepresentation.d.ts +1 -1
  151. package/Widgets/Representations/WidgetRepresentation.d.ts +1 -1
  152. package/index.d.ts +7 -0
  153. package/interfaces.d.ts +4 -4
  154. package/macros.d.ts +1 -1
  155. package/package.json +1 -1
  156. package/types.d.ts +22 -1
  157. package/vtk.d.ts +7 -2
@@ -1,5 +1,5 @@
1
- import { TypedArray } from '@kitware/vtk.js/types';
2
- import vtkDataArray from '@kitware/vtk.js/Common/Core/DataArray';
1
+ import { TypedArray } from '../../types';
2
+ import vtkDataArray from '../Core/DataArray';
3
3
 
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { vtkObject, vtkRange } from '@kitware/vtk.js/interfaces';
2
- import { TypedArray } from '@kitware/vtk.js/types';
1
+ import { vtkObject, vtkRange } from '../../interfaces';
2
+ import { TypedArray } from '../../types';
3
3
 
4
4
 
5
5
  /**
@@ -1,7 +1,9 @@
1
+ import { Nullable } from '../../types';
2
+
1
3
  /**
2
4
  * Get the endianness
3
5
  */
4
- export function getEndianness(): string | null;
6
+ export function getEndianness(): Nullable<string>;
5
7
 
6
8
  export const ENDIANNESS : string;
7
9
 
@@ -1,4 +1,4 @@
1
- import vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
1
+ import vtkImageData from '../../Common/DataModel/ImageData';
2
2
 
3
3
  interface ITransform {
4
4
  flipX: boolean;
@@ -1,5 +1,5 @@
1
- import { Range, RGBAColor } from '@kitware/vtk.js/types';
2
- import vtkScalarsToColors from '@kitware/vtk.js/Common/Core/ScalarsToColors';
1
+ import { Range, RGBAColor } from '../../types';
2
+ import vtkScalarsToColors from './ScalarsToColors';
3
3
 
4
4
  /**
5
5
  *
@@ -1,4 +1,4 @@
1
- import { Bounds, Extent, HSVColor, RGBAColor, RGBColor, Matrix, Matrix3x3, Range, Vector2, Vector3, Vector4 } from '@kitware/vtk.js/types';
1
+ import { Bounds, Extent, HSVColor, RGBAColor, RGBColor, Matrix, Matrix3x3, Range, Vector2, Vector3, Vector4 } from '../../types';
2
2
 
3
3
  /**
4
4
  *
@@ -1,5 +1,5 @@
1
1
  import { mat4 } from 'gl-matrix';
2
- import { TypedArray, Vector3 } from '@kitware/vtk.js/types';
2
+ import { TypedArray, Vector3 } from '../../types';
3
3
 
4
4
  declare interface Transform {
5
5
 
@@ -1,5 +1,5 @@
1
- import vtkDataArray from '@kitware/vtk.js/Common/Core/DataArray';
2
- import { Bounds } from '@kitware/vtk.js/types';
1
+ import vtkDataArray from '../../Common/Core/DataArray';
2
+ import { Bounds } from '../../types';
3
3
 
4
4
  /**
5
5
  *
@@ -1,4 +1,4 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
1
+ import { vtkObject } from '../../interfaces' ;
2
2
 
3
3
  /**
4
4
  *
@@ -1,4 +1,4 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
1
+ import { vtkObject } from '../../interfaces' ;
2
2
 
3
3
  /**
4
4
  *
@@ -1,6 +1,6 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { ColorMode } from '@kitware/vtk.js/Rendering/Core/Mapper';
3
- import { Range } from '@kitware/vtk.js/types' ;
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { ColorMode } from '../../Rendering/Core/Mapper';
3
+ import { Range } from '../../types' ;
4
4
 
5
5
  export enum VectorMode {
6
6
  MAGNITUDE,
@@ -1,4 +1,4 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
1
+ import { vtkObject } from '../../interfaces' ;
2
2
 
3
3
  /**
4
4
  *
@@ -1,4 +1,4 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
1
+ import { vtkObject } from '../../interfaces' ;
2
2
 
3
3
  /**
4
4
  *
@@ -1,5 +1,5 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { Bounds, Point } from '@kitware/vtk.js/types';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { Bounds, Point } from '../../types';
3
3
 
4
4
 
5
5
  export interface IBoxInitialValues {
@@ -1,5 +1,5 @@
1
- import { Vector3 } from '@kitware/vtk.js/types';
2
- import vtkSpline1D, { ISpline1DInitialValues } from '@kitware/vtk.js/Common/DataModel/Spline1D';
1
+ import { Vector3 } from '../../types';
2
+ import vtkSpline1D, { ISpline1DInitialValues } from './Spline1D';
3
3
 
4
4
 
5
5
  export interface ICardinalSpline1DInitialValues extends ISpline1DInitialValues {}
@@ -1,6 +1,6 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { Bounds, Vector3 } from '@kitware/vtk.js/types';
3
- import vtkPoints from '@kitware/vtk.js/Common/Core/Points';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { Bounds, Vector3 } from '../../types';
3
+ import vtkPoints from '../Core/Points';
4
4
 
5
5
  export interface ICellInitialValues {
6
6
  bounds?: Bounds;
@@ -1,5 +1,5 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { Vector3 } from '@kitware/vtk.js/types';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { Vector3 } from '../../types';
3
3
 
4
4
  /**
5
5
  *
@@ -1,5 +1,5 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { Vector3 } from '@kitware/vtk.js/types';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { Vector3 } from '../../types';
3
3
 
4
4
  /**
5
5
  *
@@ -1,5 +1,5 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import vtkDataSetAttributes from '@kitware/vtk.js/Common/DataModel/DataSetAttributes';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import vtkDataSetAttributes from './DataSetAttributes';
3
3
 
4
4
  export enum FieldDataTypes {
5
5
  UNIFORM,
@@ -1,4 +1,4 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
1
+ import { vtkObject } from '../../interfaces' ;
2
2
 
3
3
  /**
4
4
  *
@@ -1,6 +1,6 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { IFieldDataInitialValues, vtkFieldData } from '@kitware/vtk.js/Common/DataModel/DataSetAttributes/FieldData';
3
- import vtkDataArray from '@kitware/vtk.js/Common/Core/DataArray';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { IFieldDataInitialValues, vtkFieldData } from '././FieldData';
3
+ import vtkDataArray from '../Core/DataArray';
4
4
 
5
5
  export enum AttributeTypes {
6
6
  SCALARS,
@@ -41,10 +41,11 @@ var ITKWASMPixelTypes = {
41
41
  VariableLengthVector: 'VariableLengthVector',
42
42
  VariableSizeMatrix: 'VariableSizeMatrix'
43
43
  };
44
+ var vtkArrayTypeToItkComponentType = new Map([['Uint8Array', 'uint8'], ['Int8Array', 'int8'], ['Uint16Array', 'uint16'], ['Int16Array', 'int16'], ['Uint32Array', 'uint32'], ['Int32Array', 'int32'], ['Float32Array', 'float32'], ['Float64Array', 'float64']]);
44
45
  /**
45
- * Converts an itk.js image to a vtk.js image.
46
+ * Converts an itk-wasm Image to a vtk.js vtkImageData.
46
47
  *
47
- * Requires an itk.js image as input.
48
+ * Requires an itk-wasm Image as input.
48
49
  */
49
50
 
50
51
  function convertItkToVtkImage(itkImage) {
@@ -161,40 +162,35 @@ function convertItkToVtkImage(itkImage) {
161
162
 
162
163
  return imageData;
163
164
  }
164
-
165
- var vtkArrayTypeToItkComponentType = new Map([['Uint8Array', 'uint8_t'], ['Int8Array', 'int8_t'], ['Uint16Array', 'uint16_t'], ['Int16Array', 'int16_t'], ['Uint32Array', 'uint32_t'], ['Int32Array', 'int32_t'], ['Float32Array', 'float'], ['Float64Array', 'double']]);
166
165
  /**
167
- * Converts a vtk.js image to an itk.js image.
166
+ * Converts a vtk.js vtkImageData to an itk-wasm Image.
167
+ *
168
+ * Requires a vtk.js vtkImageData as input.
168
169
  *
169
- * Requires a vtk.js image as input.
170
170
  */
171
171
 
172
+
172
173
  function convertVtkToItkImage(vtkImage) {
173
174
  var copyData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
175
+ var dimension = 3;
174
176
  var itkImage = {
175
177
  imageType: {
176
- dimension: 3,
177
- pixelType: ITKJSPixelTypes.Scalar,
178
+ dimension: dimension,
179
+ pixelType: ITKWASMPixelTypes.Scalar,
178
180
  componentType: '',
179
181
  components: 1
180
182
  },
181
- name: 'name',
183
+ name: 'vtkImageData',
182
184
  origin: vtkImage.getOrigin(),
183
185
  spacing: vtkImage.getSpacing(),
184
- direction: {
185
- data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
186
- },
186
+ direction: new Float64Array(9),
187
187
  size: vtkImage.getDimensions()
188
188
  };
189
- var direction = vtkImage.getDirection();
190
- var dimension = itkImage.size.length;
191
- itkImage.imageType.dimension = dimension;
192
- itkImage.direction.rows = dimension;
193
- itkImage.direction.columns = dimension; // Transpose the direction matrix from column-major to row-major
189
+ var direction = vtkImage.getDirection(); // Transpose the direction matrix from column-major to row-major
194
190
 
195
191
  for (var idx = 0; idx < dimension; ++idx) {
196
192
  for (var idy = 0; idy < dimension; ++idy) {
197
- itkImage.direction.data[idx + idy * dimension] = direction[idy + idx * dimension];
193
+ itkImage.direction[idx + idy * dimension] = direction[idy + idx * dimension];
198
194
  }
199
195
  }
200
196
 
@@ -202,10 +198,10 @@ function convertVtkToItkImage(vtkImage) {
202
198
  var vtkArray;
203
199
 
204
200
  if (pointData.getTensors() !== null) {
205
- itkImage.imageType.pixelType = ITKJSPixelTypes.DiffusionTensor3D;
201
+ itkImage.imageType.pixelType = ITKWASMPixelTypes.DiffusionTensor3D;
206
202
  vtkArray = pointData.getTensors();
207
203
  } else if (pointData.getVectors() != null) {
208
- itkImage.imageType.pixelType = ITKJSPixelTypes.Vector;
204
+ itkImage.imageType.pixelType = ITKWASMPixelTypes.Vector;
209
205
  vtkArray = pointData.getVectors();
210
206
  } else {
211
207
  vtkArray = pointData.getScalars();
@@ -1,6 +1,6 @@
1
1
  import { mat3, mat4, ReadonlyVec3, vec3 } from 'gl-matrix';
2
- import { Bounds, Vector3 } from '@kitware/vtk.js/types';
3
- import vtkDataSet, { IDataSetInitialValues } from '@kitware/vtk.js/Common/DataModel/DataSet';
2
+ import { Bounds, Extent, Vector3 } from '../../types';
3
+ import vtkDataSet, { IDataSetInitialValues } from './DataSet';
4
4
 
5
5
  /**
6
6
  *
@@ -28,29 +28,29 @@ export interface vtkImageData extends vtkDataSet {
28
28
  * `voxelFunc(index, bounds)` is an optional function that is called with
29
29
  * the `[i,j,k]` index and index `bounds`, expected to return truthy if the
30
30
  * data point should be counted in the histogram, and falsey if not.
31
- * @param {Number[]} worldBounds The bounds of the world.
31
+ * @param {Bounds} worldBounds The bounds of the world.
32
32
  * @param [voxelFunc]
33
33
  */
34
- computeHistogram(worldBounds: number[], voxelFunc?: any): IComputeHistogram;
34
+ computeHistogram(worldBounds: Bounds, voxelFunc?: any): IComputeHistogram;
35
35
 
36
36
  /**
37
37
  * Returns an `array[3]` of values to multiply an `[i,j,k]` index to convert
38
38
  * into the actual data array index, from the provided extent.
39
39
  * `numberOfComponents` should match the Scalar components.
40
40
  * @internal
41
- * @param {Number[]} extent
41
+ * @param {Extent} extent
42
42
  * @param {Number} [numberOfComponents]
43
43
  */
44
- computeIncrements(extent: number[], numberOfComponents?: number): number[]
44
+ computeIncrements(extent: Extent, numberOfComponents?: number): number[]
45
45
 
46
46
  /**
47
47
  * Converts an `[i,j,k]` index to the flat data array index. Returns `NaN`
48
48
  * if any of the i,j,k bounds are outside the data Extent.
49
49
  * @internal
50
- * @param {Number[]} ijk The localized `[i,j,k]` pixel array position. Float values will be rounded.
50
+ * @param {Vector3} ijk The localized `[i,j,k]` pixel array position. Float values will be rounded.
51
51
  * @return {Number} the corresponding flattened index in the scalar array
52
52
  */
53
- computeOffsetIndex(ijk: number[]): number;
53
+ computeOffsetIndex(ijk: Vector3): number;
54
54
 
55
55
  /**
56
56
  * Calculates the `indexToWorld` and `worldToIndex` conversion matrices from
@@ -64,9 +64,9 @@ export interface vtkImageData extends vtkDataSet {
64
64
  * Returns a bounds array from a given Extent, useful if you need to
65
65
  * calculate the world bounds of a subset of the imageData's data.
66
66
  * @internal
67
- * @param {Number[]} ex
67
+ * @param {Extent} ex
68
68
  */
69
- extentToBounds(ex: number[]): number[];
69
+ extentToBounds(ex: Extent): Bounds;
70
70
 
71
71
  /**
72
72
  * The Bounds of a vtkImage are returned as pairs of world coordinates
@@ -96,14 +96,14 @@ export interface vtkImageData extends vtkDataSet {
96
96
  /**
97
97
  * Get the `[x,y,z]` location of the center of the imageData.
98
98
  */
99
- getCenter(): number[];
99
+ getCenter(): Vector3;
100
100
 
101
101
  /**
102
102
  * Get dimensions of this structured points dataset. It is the number of
103
103
  * points on each axis. Dimensions are computed from Extents during this
104
104
  * call.
105
105
  */
106
- getDimensions(): number[];
106
+ getDimensions(): Vector3;
107
107
 
108
108
  /**
109
109
  * Direction is a `mat3` matrix corresponding to the axes directions in
@@ -116,20 +116,20 @@ export interface vtkImageData extends vtkDataSet {
116
116
  * The maximal extent of the projection.
117
117
  * @default [0, -1, 0, -1, 0, -1]
118
118
  */
119
- getExtent(): number[];
119
+ getExtent(): Extent;
120
120
 
121
121
  /**
122
122
  *
123
123
  * @default [0, -1, 0, -1, 0, -1]
124
124
  */
125
- getExtentByReference(): number[];
125
+ getExtentByReference(): Extent;
126
126
 
127
127
  /**
128
128
  * Returns the data array index for the point at the provided world position.
129
- * @param {Number[]} xyz The [x,y,z] array in world coordinates.
130
- * @return {number|NaN} the corresponding pixel's index in the scalar array.
129
+ * @param {Vector3} xyz The [x,y,z] array in world coordinates.
130
+ * @return {number} the corresponding pixel's index in the scalar array.
131
131
  */
132
- getOffsetIndexFromWorld(xyz: number[]): number;
132
+ getOffsetIndexFromWorld(xyz: Vector3): number;
133
133
 
134
134
  /**
135
135
  *
@@ -144,9 +144,9 @@ export interface vtkImageData extends vtkDataSet {
144
144
  /**
145
145
  * Get the world position of a data point. Index is the point's index in the
146
146
  * 1D data array.
147
- * @param index
147
+ * @param {Number} index
148
148
  */
149
- getPoint(index: number): number[];
149
+ getPoint(index: number): Vector3;
150
150
 
151
151
  /**
152
152
  * Get the origin of the dataset. The origin is the position in world
@@ -156,33 +156,33 @@ export interface vtkImageData extends vtkDataSet {
156
156
  * box. The origin plus spacing determine the position in space of the
157
157
  * points.
158
158
  */
159
- getOrigin(): number[];
159
+ getOrigin(): Vector3;
160
160
 
161
161
  /**
162
162
  * Get the origin of the dataset. The origin is the position in world
163
163
  */
164
- getOriginByReference(): number[];
164
+ getOriginByReference(): Vector3;
165
165
 
166
166
  /**
167
167
  * Returns the scalar value for the point at the provided world position, or
168
168
  * `NaN` if the world bounds are outside the volumeData bounds. `comp` is
169
169
  * the scalar component index, for multi-component scalar data.
170
- * @param {Number[]} xyz The [x,y,z] array in world coordinates.
170
+ * @param {Vector3} xyz The [x,y,z] array in world coordinates.
171
171
  * @param {Number} [comp] The scalar component index for multi-component scalars.
172
172
  * @return {number|NaN} The corresponding pixel's scalar value.
173
173
  */
174
- getScalarValueFromWorld(xyz: number[], comp?: number): number;
174
+ getScalarValueFromWorld(xyz: Vector3, comp?: number): number;
175
175
 
176
176
  /**
177
177
  * Set the spacing [width, height, length] of the cubical cells that compose
178
178
  * the data set.
179
179
  */
180
- getSpacing(): number[];
180
+ getSpacing(): Vector3;
181
181
 
182
182
  /**
183
183
  *
184
184
  */
185
- getSpacingByReference(): number[];
185
+ getSpacingByReference(): Vector3;
186
186
 
187
187
  /**
188
188
  * Returns the `mat4` matrices used to convert between world and index.
@@ -218,10 +218,10 @@ export interface vtkImageData extends vtkDataSet {
218
218
  * Calculate the corresponding world bounds for the given index bounds
219
219
  * `[i_min, i_max, j_min, j_max, k_min, k_max]`. Modifies `out` in place if
220
220
  * provided, or returns a new array.
221
- * @param {Number[]} bin
222
- * @param {Number[]} [bout]
221
+ * @param {Bounds} bin
222
+ * @param {Bounds} [bout]
223
223
  */
224
- indexToWorldBounds(bin: number[], bout?: number[]): number[];
224
+ indexToWorldBounds(bin: Bounds, bout?: Bounds): Bounds;
225
225
 
226
226
  /**
227
227
  * Set the values of the extent, from `0` to `(i-1)`, etc.
@@ -231,9 +231,9 @@ export interface vtkImageData extends vtkDataSet {
231
231
 
232
232
  /**
233
233
  * Set the values of the extent, from `0` to `(i-1)`, etc.
234
- * @param i
235
- * @param j
236
- * @param k
234
+ * @param {Number} i
235
+ * @param {Number} j
236
+ * @param {Number} k
237
237
  */
238
238
  setDimensions(i: number, j: number, k: number): void;
239
239
 
@@ -267,9 +267,9 @@ export interface vtkImageData extends vtkDataSet {
267
267
 
268
268
  /**
269
269
  * Set the extent.
270
- * @param extent
270
+ * @param {Extent} extent
271
271
  */
272
- setExtent(extent: number[]): boolean;
272
+ setExtent(extent: Extent): boolean;
273
273
 
274
274
  /**
275
275
  *
@@ -327,10 +327,10 @@ export interface vtkImageData extends vtkDataSet {
327
327
  * Calculate the corresponding index bounds for the given world bounds
328
328
  * `[x_min, x_max, y_min, y_max, z_min, z_max]`. Modifies `out` in place if
329
329
  * provided, or returns a new array.
330
- * @param {Number[]} bin
331
- * @param {Number[]} [bout]
330
+ * @param {Bounds} bin
331
+ * @param {Bounds} [bout]
332
332
  */
333
- worldToIndexBounds(bin: number[], bout?: number[]): number[];
333
+ worldToIndexBounds(bin: Bounds, bout?: Bounds): number[];
334
334
  }
335
335
 
336
336
  /**
@@ -1,4 +1,4 @@
1
- import vtkSpline1D, { ISpline1DInitialValues } from '@kitware/vtk.js/Common/DataModel/Spline1D';
1
+ import vtkSpline1D, { ISpline1DInitialValues } from './Spline1D';
2
2
 
3
3
 
4
4
  export interface IKochanekSpline1DInitialValues extends ISpline1DInitialValues {
@@ -1,5 +1,5 @@
1
- import { Vector3 } from '@kitware/vtk.js/types';
2
- import vtkCell from '@kitware/vtk.js/Common/DataModel/Cell';
1
+ import { Vector3 } from '../../types';
2
+ import vtkCell from './Cell';
3
3
 
4
4
  export enum IntersectionState {
5
5
  NO_INTERSECTION,
@@ -1,5 +1,5 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { Range } from '@kitware/vtk.js/types';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { Range } from '../../types';
3
3
 
4
4
  export interface IPiecewiseFunctionInitialValues {
5
5
  range?: Range,
@@ -1,5 +1,5 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { Vector3 } from '@kitware/vtk.js/types';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { Vector3 } from '../../types';
3
3
 
4
4
  /**
5
5
  *
@@ -1,6 +1,6 @@
1
- import { Bounds } from '@kitware/vtk.js/types';
2
- import vtkPoints from '@kitware/vtk.js/Common/Core/Points';
3
- import vtkDataSet, { IDataSetInitialValues } from '@kitware/vtk.js/Common/DataModel/DataSet';
1
+ import { Bounds } from '../../types';
2
+ import vtkPoints from '../Core/Points';
3
+ import vtkDataSet, { IDataSetInitialValues } from './DataSet';
4
4
 
5
5
  /**
6
6
  *
@@ -1,6 +1,6 @@
1
- import { Vector3 } from '@kitware/vtk.js/types';
2
- import vtkCellArray from '@kitware/vtk.js/Common/Core/CellArray';
3
- import vtkPointSet, { IPointSetInitialValues } from '@kitware/vtk.js/Common/DataModel/PointSet';
1
+ import { Vector3 } from '../../types';
2
+ import vtkCellArray from '../Core/CellArray';
3
+ import vtkPointSet, { IPointSetInitialValues } from './PointSet';
4
4
 
5
5
  /**
6
6
  *
@@ -1,5 +1,5 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { Vector3 } from '@kitware/vtk.js/types';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { Vector3 } from '../../types';
3
3
 
4
4
 
5
5
  export interface IPolygonInitialValues {
@@ -1,5 +1,5 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { Bounds } from '@kitware/vtk.js/types';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { Bounds } from '../../types';
3
3
 
4
4
  export enum SelectionContent {
5
5
  GLOBALIDS,
@@ -1,5 +1,5 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
2
- import { Bounds, Vector3 } from '@kitware/vtk.js/types';
1
+ import { vtkObject } from '../../interfaces' ;
2
+ import { Bounds, Vector3 } from '../../types';
3
3
 
4
4
 
5
5
  export interface ISphereInitialValues {
@@ -1,4 +1,4 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
1
+ import { vtkObject } from '../../interfaces' ;
2
2
 
3
3
 
4
4
  export interface ISpline1DInitialValues {}
@@ -1,4 +1,4 @@
1
- import { vtkObject } from '@kitware/vtk.js/interfaces' ;
1
+ import { vtkObject } from '../../interfaces' ;
2
2
 
3
3
  export enum splineKind {
4
4
  CARDINAL_SPLINE,
@@ -1,5 +1,5 @@
1
- import { Vector3 } from '@kitware/vtk.js/types';
2
- import vtkCell, { ICellInitialValues } from '@kitware/vtk.js/Common/DataModel/Cell';
1
+ import { Vector3 } from '../../types';
2
+ import vtkCell, { ICellInitialValues } from './Cell';
3
3
 
4
4
  export interface ITriangleInitialValues extends ICellInitialValues {}
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { mat4 } from 'gl-matrix';
2
- import { vtkObject } from '@kitware/vtk.js/interfaces';
3
- import vtkPoints from '@kitware/vtk.js/Common/Core/Points';
2
+ import { vtkObject } from '../../interfaces';
3
+ import vtkPoints from '../Core/Points';
4
4
 
5
5
  export enum Mode {
6
6
  RIGID_BODY,
@@ -1,4 +1,4 @@
1
- import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
1
+ import { vtkAlgorithm, vtkObject } from '../../interfaces';
2
2
 
3
3
  export enum DesiredOutputPrecision {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
1
+ import { vtkAlgorithm, vtkObject } from '../../interfaces';
2
2
 
3
3
  /**
4
4
  *
@@ -1,4 +1,4 @@
1
- import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
1
+ import { vtkAlgorithm, vtkObject } from '../../interfaces';
2
2
 
3
3
  /**
4
4
  *
@@ -1,6 +1,6 @@
1
- import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
1
+ import { vtkAlgorithm, vtkObject } from '../../interfaces';
2
2
 
3
- /*
3
+ /**
4
4
  *
5
5
  */
6
6
  export interface IImageSliceFilterInitialValues {