@kitware/vtk.js 34.13.0 → 34.13.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.
|
@@ -19,6 +19,7 @@ function vtkViewStream(publicAPI, model) {
|
|
|
19
19
|
// --------------------------------------------------------------------------
|
|
20
20
|
|
|
21
21
|
function imageLoaded(e) {
|
|
22
|
+
if (model.deleted) return;
|
|
22
23
|
const id = Number(this.dataset.id);
|
|
23
24
|
publicAPI.invokeImageReady(model.eventPool[id]);
|
|
24
25
|
}
|
package/Rendering/Core/Mapper.js
CHANGED
|
@@ -193,12 +193,12 @@ function getOrCreateColorTextureCoordinates(input, component, range, useLogScale
|
|
|
193
193
|
if (useMagnitude) {
|
|
194
194
|
let sum = 0;
|
|
195
195
|
for (let compIdx = 0; compIdx < numComps; ++compIdx) {
|
|
196
|
-
const compValue = inputV[inputIdx + compIdx];
|
|
196
|
+
const compValue = Number(inputV[inputIdx + compIdx]);
|
|
197
197
|
sum += compValue * compValue;
|
|
198
198
|
}
|
|
199
199
|
scalarValue = Math.sqrt(sum);
|
|
200
200
|
} else {
|
|
201
|
-
scalarValue = inputV[inputIdx + component];
|
|
201
|
+
scalarValue = Number(inputV[inputIdx + component]);
|
|
202
202
|
}
|
|
203
203
|
if (useLogScale) {
|
|
204
204
|
scalarValue = Math.log10(scalarValue);
|
|
@@ -176,12 +176,12 @@ function getOrCreateColorTextureCoordinates(input, component, range, useLogScale
|
|
|
176
176
|
if (useMagnitude) {
|
|
177
177
|
let sum = 0;
|
|
178
178
|
for (let compIdx = 0; compIdx < numComps; ++compIdx) {
|
|
179
|
-
const compValue = inputV[inputIdx + compIdx];
|
|
179
|
+
const compValue = Number(inputV[inputIdx + compIdx]);
|
|
180
180
|
sum += compValue * compValue;
|
|
181
181
|
}
|
|
182
182
|
scalarValue = Math.sqrt(sum);
|
|
183
183
|
} else {
|
|
184
|
-
scalarValue = inputV[inputIdx + component];
|
|
184
|
+
scalarValue = Number(inputV[inputIdx + component]);
|
|
185
185
|
}
|
|
186
186
|
if (useLogScale) {
|
|
187
187
|
scalarValue = Math.log10(scalarValue);
|