@kitware/vtk.js 30.9.0 → 30.9.2
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vtkObject } from './../../interfaces';
|
|
2
|
+
import { Nullable } from './../../types';
|
|
2
3
|
import vtkColorTransferFunction from './ColorTransferFunction';
|
|
3
4
|
import vtkPiecewiseFunction from './../../Common/DataModel/PiecewiseFunction';
|
|
4
5
|
import { InterpolationType } from './ImageProperty/Constants';
|
|
@@ -79,13 +80,13 @@ export interface vtkImageProperty extends vtkObject {
|
|
|
79
80
|
* Get the component weighting function.
|
|
80
81
|
* @param {Number} [idx]
|
|
81
82
|
*/
|
|
82
|
-
getPiecewiseFunction(idx?: number): vtkPiecewiseFunction
|
|
83
|
+
getPiecewiseFunction(idx?: number): Nullable<vtkPiecewiseFunction>;
|
|
83
84
|
|
|
84
85
|
/**
|
|
85
86
|
* Get the currently set RGB transfer function.
|
|
86
87
|
* @param {Number} [idx]
|
|
87
88
|
*/
|
|
88
|
-
getRGBTransferFunction(idx?: number): vtkColorTransferFunction
|
|
89
|
+
getRGBTransferFunction(idx?: number): Nullable<vtkColorTransferFunction>;
|
|
89
90
|
|
|
90
91
|
/**
|
|
91
92
|
* Alias to get the piecewise function (backwards compatibility)
|
|
@@ -176,7 +177,10 @@ export interface vtkImageProperty extends vtkObject {
|
|
|
176
177
|
* @param {Number} index
|
|
177
178
|
* @param {vtkPiecewiseFunction} func
|
|
178
179
|
*/
|
|
179
|
-
setPiecewiseFunction(
|
|
180
|
+
setPiecewiseFunction(
|
|
181
|
+
index: number,
|
|
182
|
+
func: Nullable<vtkPiecewiseFunction>
|
|
183
|
+
): boolean;
|
|
180
184
|
|
|
181
185
|
/**
|
|
182
186
|
* Set the color of a volume to an RGB transfer function
|
|
@@ -185,7 +189,7 @@ export interface vtkImageProperty extends vtkObject {
|
|
|
185
189
|
*/
|
|
186
190
|
setRGBTransferFunction(
|
|
187
191
|
index: number,
|
|
188
|
-
func: vtkColorTransferFunction
|
|
192
|
+
func: Nullable<vtkColorTransferFunction>
|
|
189
193
|
): boolean;
|
|
190
194
|
|
|
191
195
|
/**
|
|
@@ -193,7 +197,10 @@ export interface vtkImageProperty extends vtkObject {
|
|
|
193
197
|
* @param {Number} index
|
|
194
198
|
* @param {vtkPiecewiseFunction} func
|
|
195
199
|
*/
|
|
196
|
-
setScalarOpacity(
|
|
200
|
+
setScalarOpacity(
|
|
201
|
+
index: number,
|
|
202
|
+
func: Nullable<vtkPiecewiseFunction>
|
|
203
|
+
): boolean;
|
|
197
204
|
|
|
198
205
|
/**
|
|
199
206
|
* Use the range that is set on the lookup table, instead of setting the range from the
|
|
@@ -326,7 +326,7 @@ function vtkOpenGLCellArrayBufferObject(publicAPI, model) {
|
|
|
326
326
|
// Browse the cell array: the index is at the beginning of a cell
|
|
327
327
|
// The value of 'array' at the position 'index' is the number of points in the cell
|
|
328
328
|
for (let index = 0; index < size; index += array[index] + 1, cellCount++) {
|
|
329
|
-
func(array[index], array, index + 1, cellCount);
|
|
329
|
+
func(array[index], array, index + 1, cellCount + options.cellOffset);
|
|
330
330
|
}
|
|
331
331
|
model.elementCount = caboCount;
|
|
332
332
|
publicAPI.upload(packedVBO, ObjectType.ARRAY_BUFFER);
|