@kitware/vtk.js 30.4.0 → 30.4.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.
|
@@ -342,7 +342,7 @@ export interface vtkDataArray extends vtkObject {
|
|
|
342
342
|
* @param {Number} [component] (default: 0) indice to use inside tuple size
|
|
343
343
|
* @param {Number} [numberOfComponents] (default: 1) size of the tuple
|
|
344
344
|
*/
|
|
345
|
-
export function computeRange(values: number
|
|
345
|
+
export function computeRange(values: ArrayLike<number>, component?: number, numberOfComponents?: number): vtkRange;
|
|
346
346
|
|
|
347
347
|
/**
|
|
348
348
|
* Compute range of a given array, it only supports 1D arrays.
|
|
@@ -351,7 +351,7 @@ export function computeRange(values: number[], component?: number, numberOfCompo
|
|
|
351
351
|
* @param {Number} offset offset index to select the desired component in the tuple
|
|
352
352
|
* @param {Number} numberOfComponents size of tuple in a multi-channel array
|
|
353
353
|
*/
|
|
354
|
-
export function fastComputeRange(values: number
|
|
354
|
+
export function fastComputeRange(values: ArrayLike<number>, offset: number, numberOfComponents: number): vtkRange;
|
|
355
355
|
|
|
356
356
|
/**
|
|
357
357
|
* @deprecated please use `fastComputeRange` instead
|
|
@@ -18,9 +18,10 @@ export interface IViewportInitialValues {
|
|
|
18
18
|
export interface vtkViewport extends vtkObject {
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Adds a 2D actor to the scene.
|
|
22
|
+
* @param prop
|
|
22
23
|
*/
|
|
23
|
-
addActor2D():
|
|
24
|
+
addActor2D(prop: vtkActor2D): void;
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Add a prop to the list of props.
|
|
@@ -923,8 +923,8 @@ function vtkOpenGLImageMapper(publicAPI, model) {
|
|
|
923
923
|
// Assuming labelOutlineThicknessArray contains the thickness for each segment
|
|
924
924
|
for (let i = 0; i < lWidth; ++i) {
|
|
925
925
|
// Retrieve the thickness value for the current segment index.
|
|
926
|
-
// If the value is undefined,
|
|
927
|
-
const thickness = labelOutlineThicknessArray[i]
|
|
926
|
+
// If the value is undefined, use the first element's value as a default, otherwise use the value (even if 0)
|
|
927
|
+
const thickness = typeof labelOutlineThicknessArray[i] !== 'undefined' ? labelOutlineThicknessArray[i] : labelOutlineThicknessArray[0];
|
|
928
928
|
lTable[i] = thickness;
|
|
929
929
|
}
|
|
930
930
|
model.labelOutlineThicknessTexture.releaseGraphicsResources(model._openGLRenderWindow);
|
|
@@ -1212,8 +1212,8 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
1212
1212
|
// Assuming labelOutlineThicknessArray contains the thickness for each segment
|
|
1213
1213
|
for (let i = 0; i < lWidth; ++i) {
|
|
1214
1214
|
// Retrieve the thickness value for the current segment index.
|
|
1215
|
-
// If the value is undefined,
|
|
1216
|
-
const thickness = labelOutlineThicknessArray[i]
|
|
1215
|
+
// If the value is undefined, use the first element's value as a default, otherwise use the value (even if 0)
|
|
1216
|
+
const thickness = typeof labelOutlineThicknessArray[i] !== 'undefined' ? labelOutlineThicknessArray[i] : labelOutlineThicknessArray[0];
|
|
1217
1217
|
lTable[i] = thickness;
|
|
1218
1218
|
}
|
|
1219
1219
|
model.labelOutlineThicknessTexture.releaseGraphicsResources(model._openGLRenderWindow);
|