@kitware/vtk.js 30.4.0 → 30.4.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.
|
@@ -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);
|