@kitware/vtk.js 21.5.1 → 22.0.1

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 (138) hide show
  1. package/CONTRIBUTING.md +2 -2
  2. package/Common/Core/CellArray.js +2 -2
  3. package/Common/Core/DataArray.js +2 -2
  4. package/Common/Core/MatrixBuilder.d.ts +1 -1
  5. package/Common/Core/ScalarsToColors.js +12 -11
  6. package/Common/DataModel/BoundingBox.js +2 -2
  7. package/Common/DataModel/Box.js +2 -2
  8. package/Common/DataModel/CellTypes.js +2 -2
  9. package/Common/DataModel/Cylinder.js +2 -2
  10. package/Common/DataModel/DataSet.js +2 -2
  11. package/Common/DataModel/DataSetAttributes.js +2 -2
  12. package/Common/DataModel/ImplicitBoolean.js +2 -2
  13. package/Common/DataModel/Line.js +2 -2
  14. package/Common/DataModel/PiecewiseFunction.js +3 -3
  15. package/Common/DataModel/Plane.js +2 -2
  16. package/Common/DataModel/SelectionNode.js +2 -2
  17. package/Common/DataModel/Sphere.js +2 -2
  18. package/Common/DataModel/StructuredData.js +2 -2
  19. package/Common/DataModel/Triangle.js +2 -2
  20. package/Common/Transform/LandmarkTransform.js +2 -2
  21. package/Filters/Core/Cutter.js +2 -2
  22. package/Filters/General/Calculator.js +2 -2
  23. package/Filters/Sources/Arrow2DSource.js +2 -2
  24. package/Filters/Sources/CircleSource.js +2 -2
  25. package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +6 -12
  26. package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +11 -19
  27. package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +8 -15
  28. package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js +11 -19
  29. package/IO/Core/HttpSceneLoader.js +2 -2
  30. package/IO/Core/ImageStream/DefaultProtocol.js +2 -6
  31. package/IO/Geometry/PLYWriter/Constants.js +19 -0
  32. package/IO/Geometry/PLYWriter.d.ts +203 -0
  33. package/IO/Geometry/PLYWriter.js +323 -0
  34. package/IO/Geometry/STLWriter.js +2 -2
  35. package/IO/Geometry.js +3 -1
  36. package/IO/XML/XMLImageDataWriter.js +2 -2
  37. package/IO/XML/XMLPolyDataWriter.js +2 -2
  38. package/Imaging/Core/AbstractImageInterpolator/InterpolationInfo.js +2 -2
  39. package/Imaging/Core/AbstractImageInterpolator.js +2 -2
  40. package/Imaging/Core/ImageInterpolator.js +12 -12
  41. package/Imaging/Core/ImageReslice.js +10 -10
  42. package/Imaging/Hybrid/SampleFunction.js +2 -2
  43. package/Interaction/Animations/TimeStepBasedAnimationHandler.js +2 -2
  44. package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +2 -2
  45. package/Interaction/Style/InteractorStyleManipulator.js +2 -2
  46. package/Interaction/Style/InteractorStyleRemoteMouse.js +2 -2
  47. package/Interaction/UI/FPSMonitor.js +2 -2
  48. package/Interaction/UI/Slider.js +2 -2
  49. package/Interaction/Widgets/AbstractWidget.js +2 -2
  50. package/Interaction/Widgets/DistanceRepresentation.js +2 -2
  51. package/Interaction/Widgets/DistanceWidget.js +2 -2
  52. package/Interaction/Widgets/HandleRepresentation.js +2 -2
  53. package/Interaction/Widgets/HandleWidget.js +2 -2
  54. package/Interaction/Widgets/ImageCroppingRegionsWidget.js +2 -2
  55. package/Interaction/Widgets/LabelRepresentation.js +2 -2
  56. package/Interaction/Widgets/LabelWidget.js +2 -2
  57. package/Interaction/Widgets/LineRepresentation.js +2 -2
  58. package/Interaction/Widgets/LineWidget.js +2 -2
  59. package/Interaction/Widgets/OrientationMarkerWidget.js +2 -2
  60. package/Interaction/Widgets/PiecewiseGaussianWidget.js +2 -2
  61. package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +2 -2
  62. package/Interaction/Widgets/ResliceCursor/ResliceCursorActor.js +2 -2
  63. package/Interaction/Widgets/ResliceCursor/ResliceCursorPolyDataAlgorithm.js +2 -2
  64. package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget.js +2 -2
  65. package/Interaction/Widgets/SphereHandleRepresentation.js +2 -2
  66. package/Proxy/Core/PiecewiseFunctionProxy.js +2 -2
  67. package/Proxy/Core/ProxyManager/core.js +2 -2
  68. package/Proxy/Core/ProxyManager/properties.js +2 -2
  69. package/Proxy/Core/ProxyManager/state.js +2 -2
  70. package/Proxy/Representations/SliceRepresentationProxy.js +2 -2
  71. package/Rendering/Core/AbstractMapper.d.ts +4 -4
  72. package/Rendering/Core/AbstractMapper.js +18 -7
  73. package/Rendering/Core/Actor.js +2 -2
  74. package/Rendering/Core/AnnotatedCubeActor.js +2 -2
  75. package/Rendering/Core/AxesActor.js +2 -2
  76. package/Rendering/Core/CellPicker.js +2 -2
  77. package/Rendering/Core/ColorTransferFunction.d.ts +312 -259
  78. package/Rendering/Core/ColorTransferFunction.js +2 -2
  79. package/Rendering/Core/Coordinate.js +2 -2
  80. package/Rendering/Core/CubeAxesActor.js +2 -2
  81. package/Rendering/Core/Follower.js +2 -2
  82. package/Rendering/Core/Glyph3DMapper.js +2 -2
  83. package/Rendering/Core/ImageMapper.js +2 -2
  84. package/Rendering/Core/InteractorObserver.js +2 -2
  85. package/Rendering/Core/InteractorStyle.js +2 -2
  86. package/Rendering/Core/Mapper.js +2 -2
  87. package/Rendering/Core/Picker.js +2 -2
  88. package/Rendering/Core/Property.js +2 -2
  89. package/Rendering/Core/RenderWindowInteractor.js +9 -9
  90. package/Rendering/Core/ScalarBarActor.js +2 -2
  91. package/Rendering/Core/VolumeMapper.js +1 -4
  92. package/Rendering/Core/VolumeProperty.js +2 -2
  93. package/Rendering/Core.js +2 -2
  94. package/Rendering/Misc/RenderWindowWithControlBar.js +2 -2
  95. package/Rendering/Misc/SynchronizableRenderWindow/vtkObjectManager.js +2 -2
  96. package/Rendering/Misc/SynchronizableRenderWindow.js +2 -2
  97. package/Rendering/OpenGL/BufferObject.js +5 -5
  98. package/Rendering/OpenGL/CellArrayBufferObject.js +2 -1
  99. package/Rendering/OpenGL/Glyph3DMapper.js +2 -2
  100. package/Rendering/OpenGL/HardwareSelector.js +2 -2
  101. package/Rendering/OpenGL/RenderWindow.js +49 -5
  102. package/Rendering/OpenGL/SphereMapper.js +2 -2
  103. package/Rendering/OpenGL/StickMapper.js +2 -2
  104. package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +2 -2
  105. package/Rendering/OpenGL/Texture.js +2 -2
  106. package/Rendering/OpenGL/VolumeMapper.js +11 -18
  107. package/Rendering/WebGPU/Buffer.js +2 -2
  108. package/Rendering/WebGPU/BufferManager.js +2 -2
  109. package/Rendering/WebGPU/Glyph3DMapper.js +2 -2
  110. package/Rendering/WebGPU/HardwareSelector.js +1 -1
  111. package/Rendering/WebGPU/MapperHelper.js +2 -1
  112. package/Rendering/WebGPU/PolyDataMapper.js +1 -1
  113. package/Rendering/WebGPU/StorageBuffer.js +1 -1
  114. package/Rendering/WebGPU/TextureManager.js +1 -1
  115. package/Rendering/WebGPU/UniformBuffer.js +69 -52
  116. package/Rendering/WebGPU/VolumePass.js +55 -12
  117. package/Rendering/WebGPU/VolumePassFSQ.js +4 -1
  118. package/Widgets/Core/AbstractWidgetFactory.js +2 -2
  119. package/Widgets/Representations/ArrowHandleRepresentation.js +2 -2
  120. package/Widgets/Representations/ContextRepresentation.js +2 -2
  121. package/Widgets/Representations/HandleRepresentation.js +2 -2
  122. package/Widgets/Representations/PolyLineRepresentation.js +2 -2
  123. package/Widgets/Representations/ResliceCursorContextRepresentation.js +2 -2
  124. package/Widgets/SVG/SVGLandmarkRepresentation.js +2 -2
  125. package/Widgets/Widgets3D/EllipseWidget/behavior.js +2 -2
  126. package/Widgets/Widgets3D/EllipseWidget.js +2 -2
  127. package/Widgets/Widgets3D/InteractiveOrientationWidget/behavior.js +2 -2
  128. package/Widgets/Widgets3D/LineWidget/behavior.js +2 -2
  129. package/Widgets/Widgets3D/RectangleWidget/behavior.js +2 -2
  130. package/Widgets/Widgets3D/RectangleWidget.js +2 -2
  131. package/Widgets/Widgets3D/ShapeWidget/behavior.js +2 -2
  132. package/Widgets/Widgets3D/ShapeWidget.js +2 -2
  133. package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +44 -44
  134. package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +1 -1
  135. package/macros.js +2 -2
  136. package/package.json +52 -54
  137. package/vtk.js +2 -2
  138. package/Utilities/config/rules-linter.js +0 -13
@@ -1,269 +1,318 @@
1
1
  import { vtkObject } from '@kitware/vtk.js/interfaces';
2
2
 
3
3
  export enum ColorSpace {
4
- RGB,
5
- HSV,
6
- LAB,
7
- DIVERGING,
4
+ RGB,
5
+ HSV,
6
+ LAB,
7
+ DIVERGING,
8
8
  }
9
9
 
10
10
  export enum Scale {
11
- LINEAR,
12
- LOG10,
11
+ LINEAR,
12
+ LOG10,
13
13
  }
14
14
 
15
15
  /* TODO: use VtkScalarsToColors instead of VtkObject */
16
16
  export interface vtkColorTransferFunction extends vtkObject {
17
-
18
- /**
19
- * Add a point defined in RGB
20
- * @param {Number} x The index of the point.
21
- * @param {Number} r Defines the red component (between 0 and 1).
22
- * @param {Number} g Defines the green component (between 0 and 1).
23
- * @param {Number} b Defines the blue component (between 0 and 1).
24
- */
25
- addRGBPoint(x: number, r: number, g: number, b: number): number;
26
-
27
- /**
28
- * Add a point defined in RGB
29
- * @param {Number} x The index of the point.
30
- * @param {Number} r Defines the red component (between 0 and 1).
31
- * @param {Number} g Defines the green component (between 0 and 1).
32
- * @param {Number} b Defines the blue component (between 0 and 1).
33
- * @param {Number} [midpoint]
34
- * @param {Number} [sharpness]
35
- */
36
- addRGBPointLong(x: number, r: number, g: number, b: number, midpoint?: number, sharpness?: number): number;
37
-
38
- /**
39
- * Add a point defined in HSV
40
- * @param {Number} x The index of the point.
41
- * @param {Number} h Defines the hue of the color (between 0 and 1).
42
- * @param {Number} s Defines the saturation of the color (between 0 and 1).
43
- * @param {Number} v Defines the value of the color (between 0 and 1).
44
- */
45
- addHSVPoint(x: number, h: number, s: number, v: number): number;
46
-
47
- /**
48
- * Add a line defined in RGB
49
- * @param {Number} x1 The index of the first point.
50
- * @param {Number} r1 Defines the red component of the first point(between 0 and 1).
51
- * @param {Number} g1 Defines the green component of the first point(between 0 and 1).
52
- * @param {Number} b1 Defines the red component of the first point (between 0 and 1).
53
- * @param {Number} x2 The index of the second point.
54
- * @param {Number} r2 Defines the red component of the second point (between 0 and 1).
55
- * @param {Number} g2 Defines the green component of the second point (between 0 and 1).
56
- * @param {Number} b2 Defines the blue component of the second point (between 0 and 1).
57
- */
58
- addRGBSegment(x1: number, r1: number, g1: number, b1: number, x2: number, r2: number, g2: number, b2: number): void;
59
-
60
- /**
61
- * Add a line defined in HSV
62
- * @param {Number} x1 The index of the first point.
63
- * @param {Number} h1 Defines the hue of the color of the first point (between 0 and 1).
64
- * @param {Number} s1 Defines the saturation of the color of the first point (between 0 and 1).
65
- * @param {Number} v1 Defines the value of the color of the first point (between 0 and 1).
66
- * @param {Number} x2 The index of the second point.
67
- * @param {Number} h2 Defines the hue of the colorof the second point (between 0 and 1).
68
- * @param {Number} s2 Defines the saturation of the color of the second point (between 0 and 1).
69
- * @param {Number} v2 Defines the value of the color of the second point (between 0 and 1).
70
- */
71
- addHSVSegment(x1: number, h1: number, s1: number, v1: number, x2: number, h2: number, s2: number, v2: number): void;
72
-
73
-
74
- /**
75
- * Add a point defined in HSV
76
- * @param {Number} x The index of the point.
77
- * @param {Number} h Defines the hue of the color (between 0 and 1).
78
- * @param {Number} s Defines the saturation of the color (between 0 and 1).
79
- * @param {Number} v Defines the value of the color (between 0 and 1).
80
- * @param {Number} [midpoint]
81
- * @param {Number} [sharpness]
82
- */
83
- addHSVPointLong(x: number, h: number, s: number, v: number, midpoint?: number, sharpness?: number): number;
84
-
85
- /**
86
- * Get the number of points which specify this function
87
- */
88
- getSize(): number;
89
-
90
- /**
91
- * Set nodes directly
92
- * @param nodes
93
- */
94
- setNodes(nodes: any): void;
95
-
96
- /**
97
- * Sort the vector in increasing order, then fill in
98
- * the Range
99
- */
100
- sortAndUpdateRange(): void;
101
-
102
- /**
103
- *
104
- */
105
- updateRange(): boolean;
106
-
107
- /**
108
- * Remove a point
109
- * @param {Number} x The index of the point.
110
- */
111
- removePoint(x: number): number;
112
-
113
- /**
114
- * Moves point from oldX to newX.
115
- *
116
- * It removed the point from oldX. If any point existed at newX, it will also be removed.
117
- * @param {Number} oldX The old index of the point.
118
- * @param {Number} newX The new index of the point.
119
- */
120
- movePoint(oldX: number, newX: number): void;
121
-
122
- /**
123
- * Remove all points
124
- */
125
- removeAllPoints(): void;
126
-
127
- /**
128
- * Get the RGBA color evaluated at the specified location
129
- * @param {Number} x The index of the point.
130
- */
131
- mapValue(x: number): any;
132
-
133
- /**
134
- * Get the RGB color evaluated at the specified location
135
- * @param {Number} x The index of the point.
136
- * @param {Number[]} rgb The Array of the RGB color to fill.
137
- */
138
- getColor(x: number, rgb: number[]): void;
139
-
140
- /**
141
- * Get the red color evaluated at the specified location
142
- * @param {Number} x The index of the point.
143
- */
144
- getRedValue(x: number): number;
145
-
146
- /**
147
- * Get the green color evaluated at the specified location
148
- * @param {Number} x The index of the point.
149
- */
150
- getGreenValue(x: number): number;
151
-
152
- /**
153
- * Get the blue color evaluated at the specified location
154
- * @param {Number} x The index of the point.
155
- */
156
- getBlueValue(x: number): number;
157
-
158
- /**
159
- * Get a table of RGB colors at regular intervals along the function
160
- * @param {Number} xStart The index of the first point.
161
- * @param {Number} xEnd The index of the second point.
162
- * @param {Number} size
163
- * @param {Number[]} table
164
- */
165
- getTable(xStart: number, xEnd: number, size: number, table: number[]): void;
166
-
167
- /**
168
- * @param {Number} xStart The index of the first point.
169
- * @param {Number} xEnd The index of the first point.
170
- * @param {Number} size
171
- * @param {Boolean} withAlpha
172
- */
173
- getUint8Table(xStart: number, xEnd: number, size: number, withAlpha: boolean): Float32Array;
174
-
175
- /**
176
- * Construct a color transfer function from a table.
177
- * @param {Number} xStart The index of the first point.
178
- * @param {Number} xEnd The index of the first point.
179
- * @param {Number} size
180
- * @param {Number[]} table
181
- */
182
- buildFunctionFromTable(xStart: number, xEnd: number, size: number, table: number[]): void;
183
-
184
- /**
185
- * For the node specified by index, set/get the location (X), R, G, and B
186
- * values, midpoint, and sharpness values at the node.
187
- * @param {Number} index
188
- * @param {Number[]} val
189
- */
190
- getNodeValue(index: number, val: number[]): number;
191
-
192
- /**
193
- * For a specified index value, set the node parameters
194
- * @param {Number} index
195
- * @param {Number[]} val
196
- */
197
- setNodeValue(index: number, val: number[]): number;
198
-
199
- /**
200
- * Get the number of available colors for mapping to.
201
- */
202
- getNumberOfAvailableColors(): number;
203
-
204
- /**
205
- * Get the color given an integer index.
206
- * @param {Number} idx The index of the point.
207
- * @param {Number[]} rgba An Array of the RGBA color.
208
- */
209
- getIndexedColor(idx: number, rgba: number[]): void;
210
-
211
- /**
212
- * Defines the nodes from an array ptr with the layout [X1, R1, G1, B1, X2,
213
- * R2, G2, B2, ..., Xn, Rn, Gn, Bn] where n is the number of nodes.
214
- * @param {Number} nb
215
- * @param ptr
216
- */
217
- fillFromDataPointer(nb: number, ptr: any): void;
218
-
219
- /**
220
- * Set the range of scalars being mapped.
221
- * @param {Number} min
222
- * @param {Number} max
223
- */
224
- setMappingRange(min: number, max: number): void;
225
-
226
- /**
227
- * Remove all points out of the new range, and make sure there is a point at
228
- * each end of that range.
229
- * @param {Number[]} range
230
- */
231
- adjustRange(range: number[]): number;
232
-
233
- /**
234
- * Estimates the minimum size of a table such that it would correctly sample this function.
235
- * @param {Number} x1
236
- * @param {Number} x2
237
- */
238
- estimateMinNumberOfSamples(x1: number, x2: number): number;
239
-
240
- /**
241
- * Traverses the nodes to find the minimum distance.
242
- */
243
- findMinimumXDistance(): number;
244
-
245
- /**
246
- *
247
- * @param input
248
- * @param output
249
- * @param outFormat
250
- * @param inputOffset
251
- */
252
- mapScalarsThroughTable(input: any, output: any, outFormat: any, inputOffset: any): void;
253
-
254
- /**
255
- * Map a set of scalars through the lookup table.
256
- * @param input
257
- * @param output
258
- * @param outFormat
259
- * @param inputOffset
260
- */
261
- mapData(input: any, output: any, outFormat: any, inputOffset: any): void;
262
-
263
- /**
264
- * @param colorMap
265
- */
266
- applyColorMap(colorMap: any): void;
17
+ /**
18
+ * Add a point defined in RGB
19
+ * @param {Number} x The index of the point.
20
+ * @param {Number} r Defines the red component (between 0 and 1).
21
+ * @param {Number} g Defines the green component (between 0 and 1).
22
+ * @param {Number} b Defines the blue component (between 0 and 1).
23
+ */
24
+ addRGBPoint(x: number, r: number, g: number, b: number): number;
25
+
26
+ /**
27
+ * Add a point defined in RGB
28
+ * @param {Number} x The index of the point.
29
+ * @param {Number} r Defines the red component (between 0 and 1).
30
+ * @param {Number} g Defines the green component (between 0 and 1).
31
+ * @param {Number} b Defines the blue component (between 0 and 1).
32
+ * @param {Number} [midpoint]
33
+ * @param {Number} [sharpness]
34
+ */
35
+ addRGBPointLong(
36
+ x: number,
37
+ r: number,
38
+ g: number,
39
+ b: number,
40
+ midpoint?: number,
41
+ sharpness?: number
42
+ ): number;
43
+
44
+ /**
45
+ * Add a point defined in HSV
46
+ * @param {Number} x The index of the point.
47
+ * @param {Number} h Defines the hue of the color (between 0 and 1).
48
+ * @param {Number} s Defines the saturation of the color (between 0 and 1).
49
+ * @param {Number} v Defines the value of the color (between 0 and 1).
50
+ */
51
+ addHSVPoint(x: number, h: number, s: number, v: number): number;
52
+
53
+ /**
54
+ * Add a line defined in RGB
55
+ * @param {Number} x1 The index of the first point.
56
+ * @param {Number} r1 Defines the red component of the first point(between 0 and 1).
57
+ * @param {Number} g1 Defines the green component of the first point(between 0 and 1).
58
+ * @param {Number} b1 Defines the red component of the first point (between 0 and 1).
59
+ * @param {Number} x2 The index of the second point.
60
+ * @param {Number} r2 Defines the red component of the second point (between 0 and 1).
61
+ * @param {Number} g2 Defines the green component of the second point (between 0 and 1).
62
+ * @param {Number} b2 Defines the blue component of the second point (between 0 and 1).
63
+ */
64
+ addRGBSegment(
65
+ x1: number,
66
+ r1: number,
67
+ g1: number,
68
+ b1: number,
69
+ x2: number,
70
+ r2: number,
71
+ g2: number,
72
+ b2: number
73
+ ): void;
74
+
75
+ /**
76
+ * Add a line defined in HSV
77
+ * @param {Number} x1 The index of the first point.
78
+ * @param {Number} h1 Defines the hue of the color of the first point (between 0 and 1).
79
+ * @param {Number} s1 Defines the saturation of the color of the first point (between 0 and 1).
80
+ * @param {Number} v1 Defines the value of the color of the first point (between 0 and 1).
81
+ * @param {Number} x2 The index of the second point.
82
+ * @param {Number} h2 Defines the hue of the colorof the second point (between 0 and 1).
83
+ * @param {Number} s2 Defines the saturation of the color of the second point (between 0 and 1).
84
+ * @param {Number} v2 Defines the value of the color of the second point (between 0 and 1).
85
+ */
86
+ addHSVSegment(
87
+ x1: number,
88
+ h1: number,
89
+ s1: number,
90
+ v1: number,
91
+ x2: number,
92
+ h2: number,
93
+ s2: number,
94
+ v2: number
95
+ ): void;
96
+
97
+ /**
98
+ * Add a point defined in HSV
99
+ * @param {Number} x The index of the point.
100
+ * @param {Number} h Defines the hue of the color (between 0 and 1).
101
+ * @param {Number} s Defines the saturation of the color (between 0 and 1).
102
+ * @param {Number} v Defines the value of the color (between 0 and 1).
103
+ * @param {Number} [midpoint]
104
+ * @param {Number} [sharpness]
105
+ */
106
+ addHSVPointLong(
107
+ x: number,
108
+ h: number,
109
+ s: number,
110
+ v: number,
111
+ midpoint?: number,
112
+ sharpness?: number
113
+ ): number;
114
+
115
+ /**
116
+ * Get the number of points which specify this function
117
+ */
118
+ getSize(): number;
119
+
120
+ /**
121
+ * Set nodes directly
122
+ * @param nodes
123
+ *
124
+ * @returns true if a change happen
125
+ */
126
+ setNodes(nodes: any): boolean;
127
+
128
+ /**
129
+ * Sort the vector in increasing order, then fill in
130
+ * the Range
131
+ *
132
+ * @returns true if a change happen
133
+ */
134
+ sortAndUpdateRange(): boolean;
135
+
136
+ /**
137
+ * @returns true if a change happen
138
+ */
139
+ updateRange(): boolean;
140
+
141
+ /**
142
+ * Remove a point
143
+ * @param {Number} x The index of the point.
144
+ */
145
+ removePoint(x: number): number;
146
+
147
+ /**
148
+ * Moves point from oldX to newX.
149
+ *
150
+ * It removed the point from oldX. If any point existed at newX, it will also be removed.
151
+ * @param {Number} oldX The old index of the point.
152
+ * @param {Number} newX The new index of the point.
153
+ */
154
+ movePoint(oldX: number, newX: number): void;
155
+
156
+ /**
157
+ * Remove all points
158
+ */
159
+ removeAllPoints(): void;
160
+
161
+ /**
162
+ * Get the RGBA color evaluated at the specified location
163
+ * @param {Number} x The index of the point.
164
+ */
165
+ mapValue(x: number): any;
166
+
167
+ /**
168
+ * Get the RGB color evaluated at the specified location
169
+ * @param {Number} x The index of the point.
170
+ * @param {Number[]} rgb The Array of the RGB color to fill.
171
+ */
172
+ getColor(x: number, rgb: number[]): void;
173
+
174
+ /**
175
+ * Get the red color evaluated at the specified location
176
+ * @param {Number} x The index of the point.
177
+ */
178
+ getRedValue(x: number): number;
179
+
180
+ /**
181
+ * Get the green color evaluated at the specified location
182
+ * @param {Number} x The index of the point.
183
+ */
184
+ getGreenValue(x: number): number;
185
+
186
+ /**
187
+ * Get the blue color evaluated at the specified location
188
+ * @param {Number} x The index of the point.
189
+ */
190
+ getBlueValue(x: number): number;
191
+
192
+ /**
193
+ * Get a table of RGB colors at regular intervals along the function
194
+ * @param {Number} xStart The index of the first point.
195
+ * @param {Number} xEnd The index of the second point.
196
+ * @param {Number} size
197
+ * @param {Number[]} table
198
+ */
199
+ getTable(xStart: number, xEnd: number, size: number, table: number[]): void;
200
+
201
+ /**
202
+ * @param {Number} xStart The index of the first point.
203
+ * @param {Number} xEnd The index of the first point.
204
+ * @param {Number} size
205
+ * @param {Boolean} withAlpha
206
+ */
207
+ getUint8Table(
208
+ xStart: number,
209
+ xEnd: number,
210
+ size: number,
211
+ withAlpha: boolean
212
+ ): Float32Array;
213
+
214
+ /**
215
+ * Construct a color transfer function from a table.
216
+ * @param {Number} xStart The index of the first point.
217
+ * @param {Number} xEnd The index of the first point.
218
+ * @param {Number} size
219
+ * @param {Number[]} table
220
+ */
221
+ buildFunctionFromTable(
222
+ xStart: number,
223
+ xEnd: number,
224
+ size: number,
225
+ table: number[]
226
+ ): void;
227
+
228
+ /**
229
+ * For the node specified by index, set/get the location (X), R, G, and B
230
+ * values, midpoint, and sharpness values at the node.
231
+ * @param {Number} index
232
+ * @param {Number[]} val
233
+ */
234
+ getNodeValue(index: number, val: number[]): number;
235
+
236
+ /**
237
+ * For a specified index value, set the node parameters
238
+ * @param {Number} index
239
+ * @param {Number[]} val
240
+ */
241
+ setNodeValue(index: number, val: number[]): number;
242
+
243
+ /**
244
+ * Get the number of available colors for mapping to.
245
+ */
246
+ getNumberOfAvailableColors(): number;
247
+
248
+ /**
249
+ * Get the color given an integer index.
250
+ * @param {Number} idx The index of the point.
251
+ * @param {Number[]} rgba An Array of the RGBA color.
252
+ */
253
+ getIndexedColor(idx: number, rgba: number[]): void;
254
+
255
+ /**
256
+ * Defines the nodes from an array ptr with the layout [X1, R1, G1, B1, X2,
257
+ * R2, G2, B2, ..., Xn, Rn, Gn, Bn] where n is the number of nodes.
258
+ * @param {Number} nb
259
+ * @param ptr
260
+ */
261
+ fillFromDataPointer(nb: number, ptr: any): void;
262
+
263
+ /**
264
+ * Set the range of scalars being mapped.
265
+ * @param {Number} min
266
+ * @param {Number} max
267
+ */
268
+ setMappingRange(min: number, max: number): void;
269
+
270
+ /**
271
+ * Remove all points out of the new range, and make sure there is a point at
272
+ * each end of that range.
273
+ * @param {Number[]} range
274
+ */
275
+ adjustRange(range: number[]): number;
276
+
277
+ /**
278
+ * Estimates the minimum size of a table such that it would correctly sample this function.
279
+ * @param {Number} x1
280
+ * @param {Number} x2
281
+ */
282
+ estimateMinNumberOfSamples(x1: number, x2: number): number;
283
+
284
+ /**
285
+ * Traverses the nodes to find the minimum distance.
286
+ */
287
+ findMinimumXDistance(): number;
288
+
289
+ /**
290
+ *
291
+ * @param input
292
+ * @param output
293
+ * @param outFormat
294
+ * @param inputOffset
295
+ */
296
+ mapScalarsThroughTable(
297
+ input: any,
298
+ output: any,
299
+ outFormat: any,
300
+ inputOffset: any
301
+ ): void;
302
+
303
+ /**
304
+ * Map a set of scalars through the lookup table.
305
+ * @param input
306
+ * @param output
307
+ * @param outFormat
308
+ * @param inputOffset
309
+ */
310
+ mapData(input: any, output: any, outFormat: any, inputOffset: any): void;
311
+
312
+ /**
313
+ * @param colorMap
314
+ */
315
+ applyColorMap(colorMap: any): void;
267
316
  }
268
317
 
269
318
  /**
@@ -273,7 +322,11 @@ export interface vtkColorTransferFunction extends vtkObject {
273
322
  * @param model object on which data structure will be bounds (protected)
274
323
  * @param {object} [initialValues] (default: {})
275
324
  */
276
- export function extend(publicAPI: object, model: object, initialValues?: object): void;
325
+ export function extend(
326
+ publicAPI: object,
327
+ model: object,
328
+ initialValues?: object
329
+ ): void;
277
330
 
278
331
  /**
279
332
  * Method use to create a new instance of vtkColorTransferFunction
@@ -303,7 +356,7 @@ export function newInstance(initialValues?: object): vtkColorTransferFunction;
303
356
  */
304
357
 
305
358
  export declare const vtkColorTransferFunction: {
306
- newInstance: typeof newInstance,
307
- extend: typeof extend,
359
+ newInstance: typeof newInstance;
360
+ extend: typeof extend;
308
361
  };
309
362
  export default vtkColorTransferFunction;
@@ -4,9 +4,9 @@ import { h as hsv2rgb, i as isNan, E as isInf, F as rgb2hsv, G as rgb2lab, H as
4
4
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors.js';
5
5
  import Constants from './ColorTransferFunction/Constants.js';
6
6
 
7
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
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; }
8
8
 
9
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
10
  var ColorSpace = Constants.ColorSpace,
11
11
  Scale = Constants.Scale;
12
12
  var ScalarMappingTarget = vtkScalarsToColors.ScalarMappingTarget;
@@ -3,9 +3,9 @@ import macro from '../../macros.js';
3
3
  import Constants from './Coordinate/Constants.js';
4
4
  import { J as round, I as floor } from '../../Common/Core/Math/index.js';
5
5
 
6
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
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
 
8
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
8
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
9
  var Coordinate = Constants.Coordinate;
10
10
  var vtkErrorMacro = macro.vtkErrorMacro; // ----------------------------------------------------------------------------
11
11
  // vtkActor methods
@@ -12,9 +12,9 @@ import vtkPixelSpaceCallbackMapper from './PixelSpaceCallbackMapper.js';
12
12
  import vtkPolyData from '../../Common/DataModel/PolyData.js';
13
13
  import vtkTexture from './Texture.js';
14
14
 
15
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
+ 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; }
16
16
 
17
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18
18
  // vtkCubeAxesActor
19
19
  // ----------------------------------------------------------------------------
20
20
  // faces are -x x -y y -z z