@kitware/vtk.js 28.2.4 → 28.2.5
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.
|
@@ -68,13 +68,14 @@ function vtkLookupTable(publicAPI, model) {
|
|
|
68
68
|
|
|
69
69
|
publicAPI.linearIndexLookup = function (v, p) {
|
|
70
70
|
var dIndex = 0;
|
|
71
|
+
var nv = Number(v);
|
|
71
72
|
|
|
72
|
-
if (
|
|
73
|
+
if (nv < p.range[0]) {
|
|
73
74
|
dIndex = p.maxIndex + BELOW_RANGE_COLOR_INDEX + 1.5;
|
|
74
|
-
} else if (
|
|
75
|
+
} else if (nv > p.range[1]) {
|
|
75
76
|
dIndex = p.maxIndex + ABOVE_RANGE_COLOR_INDEX + 1.5;
|
|
76
77
|
} else {
|
|
77
|
-
dIndex = (
|
|
78
|
+
dIndex = (nv + p.shift) * p.scale; // This conditional is needed because when v is very close to
|
|
78
79
|
// p.Range[1], it may map above p.MaxIndex in the linear mapping
|
|
79
80
|
// above.
|
|
80
81
|
|