@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.
- package/CONTRIBUTING.md +2 -2
- package/Common/Core/CellArray.js +2 -2
- package/Common/Core/DataArray.js +2 -2
- package/Common/Core/MatrixBuilder.d.ts +1 -1
- package/Common/Core/ScalarsToColors.js +12 -11
- package/Common/DataModel/BoundingBox.js +2 -2
- package/Common/DataModel/Box.js +2 -2
- package/Common/DataModel/CellTypes.js +2 -2
- package/Common/DataModel/Cylinder.js +2 -2
- package/Common/DataModel/DataSet.js +2 -2
- package/Common/DataModel/DataSetAttributes.js +2 -2
- package/Common/DataModel/ImplicitBoolean.js +2 -2
- package/Common/DataModel/Line.js +2 -2
- package/Common/DataModel/PiecewiseFunction.js +3 -3
- package/Common/DataModel/Plane.js +2 -2
- package/Common/DataModel/SelectionNode.js +2 -2
- package/Common/DataModel/Sphere.js +2 -2
- package/Common/DataModel/StructuredData.js +2 -2
- package/Common/DataModel/Triangle.js +2 -2
- package/Common/Transform/LandmarkTransform.js +2 -2
- package/Filters/Core/Cutter.js +2 -2
- package/Filters/General/Calculator.js +2 -2
- package/Filters/Sources/Arrow2DSource.js +2 -2
- package/Filters/Sources/CircleSource.js +2 -2
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +6 -12
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +11 -19
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +8 -15
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js +11 -19
- package/IO/Core/HttpSceneLoader.js +2 -2
- package/IO/Core/ImageStream/DefaultProtocol.js +2 -6
- package/IO/Geometry/PLYWriter/Constants.js +19 -0
- package/IO/Geometry/PLYWriter.d.ts +203 -0
- package/IO/Geometry/PLYWriter.js +323 -0
- package/IO/Geometry/STLWriter.js +2 -2
- package/IO/Geometry.js +3 -1
- package/IO/XML/XMLImageDataWriter.js +2 -2
- package/IO/XML/XMLPolyDataWriter.js +2 -2
- package/Imaging/Core/AbstractImageInterpolator/InterpolationInfo.js +2 -2
- package/Imaging/Core/AbstractImageInterpolator.js +2 -2
- package/Imaging/Core/ImageInterpolator.js +12 -12
- package/Imaging/Core/ImageReslice.js +10 -10
- package/Imaging/Hybrid/SampleFunction.js +2 -2
- package/Interaction/Animations/TimeStepBasedAnimationHandler.js +2 -2
- package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +2 -2
- package/Interaction/Style/InteractorStyleManipulator.js +2 -2
- package/Interaction/Style/InteractorStyleRemoteMouse.js +2 -2
- package/Interaction/UI/FPSMonitor.js +2 -2
- package/Interaction/UI/Slider.js +2 -2
- package/Interaction/Widgets/AbstractWidget.js +2 -2
- package/Interaction/Widgets/DistanceRepresentation.js +2 -2
- package/Interaction/Widgets/DistanceWidget.js +2 -2
- package/Interaction/Widgets/HandleRepresentation.js +2 -2
- package/Interaction/Widgets/HandleWidget.js +2 -2
- package/Interaction/Widgets/ImageCroppingRegionsWidget.js +2 -2
- package/Interaction/Widgets/LabelRepresentation.js +2 -2
- package/Interaction/Widgets/LabelWidget.js +2 -2
- package/Interaction/Widgets/LineRepresentation.js +2 -2
- package/Interaction/Widgets/LineWidget.js +2 -2
- package/Interaction/Widgets/OrientationMarkerWidget.js +2 -2
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +2 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +2 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursorActor.js +2 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursorPolyDataAlgorithm.js +2 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget.js +2 -2
- package/Interaction/Widgets/SphereHandleRepresentation.js +2 -2
- package/Proxy/Core/PiecewiseFunctionProxy.js +2 -2
- package/Proxy/Core/ProxyManager/core.js +2 -2
- package/Proxy/Core/ProxyManager/properties.js +2 -2
- package/Proxy/Core/ProxyManager/state.js +2 -2
- package/Proxy/Representations/SliceRepresentationProxy.js +2 -2
- package/Rendering/Core/AbstractMapper.d.ts +4 -4
- package/Rendering/Core/AbstractMapper.js +18 -7
- package/Rendering/Core/Actor.js +2 -2
- package/Rendering/Core/AnnotatedCubeActor.js +2 -2
- package/Rendering/Core/AxesActor.js +2 -2
- package/Rendering/Core/CellPicker.js +2 -2
- package/Rendering/Core/ColorTransferFunction.d.ts +312 -259
- package/Rendering/Core/ColorTransferFunction.js +2 -2
- package/Rendering/Core/Coordinate.js +2 -2
- package/Rendering/Core/CubeAxesActor.js +2 -2
- package/Rendering/Core/Follower.js +2 -2
- package/Rendering/Core/Glyph3DMapper.js +2 -2
- package/Rendering/Core/ImageMapper.js +2 -2
- package/Rendering/Core/InteractorObserver.js +2 -2
- package/Rendering/Core/InteractorStyle.js +2 -2
- package/Rendering/Core/Mapper.js +2 -2
- package/Rendering/Core/Picker.js +2 -2
- package/Rendering/Core/Property.js +2 -2
- package/Rendering/Core/RenderWindowInteractor.js +9 -9
- package/Rendering/Core/ScalarBarActor.js +2 -2
- package/Rendering/Core/VolumeMapper.js +1 -4
- package/Rendering/Core/VolumeProperty.js +2 -2
- package/Rendering/Core.js +2 -2
- package/Rendering/Misc/RenderWindowWithControlBar.js +2 -2
- package/Rendering/Misc/SynchronizableRenderWindow/vtkObjectManager.js +2 -2
- package/Rendering/Misc/SynchronizableRenderWindow.js +2 -2
- package/Rendering/OpenGL/BufferObject.js +5 -5
- package/Rendering/OpenGL/CellArrayBufferObject.js +2 -1
- package/Rendering/OpenGL/Glyph3DMapper.js +2 -2
- package/Rendering/OpenGL/HardwareSelector.js +2 -2
- package/Rendering/OpenGL/RenderWindow.js +49 -5
- package/Rendering/OpenGL/SphereMapper.js +2 -2
- package/Rendering/OpenGL/StickMapper.js +2 -2
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +2 -2
- package/Rendering/OpenGL/Texture.js +2 -2
- package/Rendering/OpenGL/VolumeMapper.js +11 -18
- package/Rendering/WebGPU/Buffer.js +2 -2
- package/Rendering/WebGPU/BufferManager.js +2 -2
- package/Rendering/WebGPU/Glyph3DMapper.js +2 -2
- package/Rendering/WebGPU/HardwareSelector.js +1 -1
- package/Rendering/WebGPU/MapperHelper.js +2 -1
- package/Rendering/WebGPU/PolyDataMapper.js +1 -1
- package/Rendering/WebGPU/StorageBuffer.js +1 -1
- package/Rendering/WebGPU/TextureManager.js +1 -1
- package/Rendering/WebGPU/UniformBuffer.js +69 -52
- package/Rendering/WebGPU/VolumePass.js +55 -12
- package/Rendering/WebGPU/VolumePassFSQ.js +4 -1
- package/Widgets/Core/AbstractWidgetFactory.js +2 -2
- package/Widgets/Representations/ArrowHandleRepresentation.js +2 -2
- package/Widgets/Representations/ContextRepresentation.js +2 -2
- package/Widgets/Representations/HandleRepresentation.js +2 -2
- package/Widgets/Representations/PolyLineRepresentation.js +2 -2
- package/Widgets/Representations/ResliceCursorContextRepresentation.js +2 -2
- package/Widgets/SVG/SVGLandmarkRepresentation.js +2 -2
- package/Widgets/Widgets3D/EllipseWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/EllipseWidget.js +2 -2
- package/Widgets/Widgets3D/InteractiveOrientationWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/LineWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/RectangleWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/RectangleWidget.js +2 -2
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/ShapeWidget.js +2 -2
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +44 -44
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +1 -1
- package/macros.js +2 -2
- package/package.json +52 -54
- package/vtk.js +2 -2
- 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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
RGB,
|
|
5
|
+
HSV,
|
|
6
|
+
LAB,
|
|
7
|
+
DIVERGING,
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export enum Scale {
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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(
|
|
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
|
-
|
|
307
|
-
|
|
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);
|
|
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]
|
|
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);
|
|
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]
|
|
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);
|
|
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]
|
|
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
|