@cornerstonejs/core 2.11.0 → 2.11.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.
|
@@ -18,6 +18,13 @@ function vtkStreamingOpenGLTexture(publicAPI, model) {
|
|
|
18
18
|
model.inputNumComps = numberOfComponents;
|
|
19
19
|
superCreate3DFilterableFromRaw(width, height, depth, numberOfComponents, dataType, data, preferSizeOverAccuracy);
|
|
20
20
|
};
|
|
21
|
+
const superUpdate = publicAPI.updateVolumeInfoForGL;
|
|
22
|
+
publicAPI.updateVolumeInfoForGL = (dataType, numComps) => {
|
|
23
|
+
const isScalingApplied = superUpdate(dataType, numComps);
|
|
24
|
+
model.volumeInfo.dataComputedScale = [1];
|
|
25
|
+
model.volumeInfo.dataComputedOffset = [0];
|
|
26
|
+
return isScalingApplied;
|
|
27
|
+
};
|
|
21
28
|
publicAPI.update3DFromRaw = () => {
|
|
22
29
|
const { volumeId } = model;
|
|
23
30
|
if (!volumeId) {
|
|
@@ -459,6 +459,9 @@ export default class VoxelManager {
|
|
|
459
459
|
let maxValue = -Infinity;
|
|
460
460
|
for (const imageId of imageIds) {
|
|
461
461
|
const image = cache.getImage(imageId);
|
|
462
|
+
if (!image) {
|
|
463
|
+
continue;
|
|
464
|
+
}
|
|
462
465
|
if (image.minPixelValue < minValue) {
|
|
463
466
|
minValue = image.minPixelValue;
|
|
464
467
|
}
|
|
@@ -466,6 +469,9 @@ export default class VoxelManager {
|
|
|
466
469
|
maxValue = image.maxPixelValue;
|
|
467
470
|
}
|
|
468
471
|
}
|
|
472
|
+
if (minValue === Infinity && maxValue === -Infinity) {
|
|
473
|
+
return [0, 0];
|
|
474
|
+
}
|
|
469
475
|
return [minValue, maxValue];
|
|
470
476
|
};
|
|
471
477
|
voxelManager._getScalarDataLength = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2",
|
|
4
4
|
"description": "Cornerstone3D Core",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"type": "individual",
|
|
83
83
|
"url": "https://ohif.org/donate"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "e0522fd764aae828ac93e05003593f21fc1b406f"
|
|
86
86
|
}
|