@cornerstonejs/core 2.1.22 → 2.2.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.
|
@@ -34,14 +34,16 @@ function generateVolumePropsFromImageIds(imageIds, volumeId) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
function _determineDataType(imageIds, volumeMetadata) {
|
|
37
|
-
const { BitsAllocated, PixelRepresentation
|
|
37
|
+
const { BitsAllocated, PixelRepresentation } = volumeMetadata;
|
|
38
38
|
const signed = PixelRepresentation === 1;
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
39
|
+
const [firstIndex, middleIndex, lastIndex] = [
|
|
40
|
+
0,
|
|
41
|
+
Math.floor(imageIds.length / 2),
|
|
42
|
+
imageIds.length - 1,
|
|
43
|
+
];
|
|
44
|
+
const scalingParameters = [firstIndex, middleIndex, lastIndex].map((index) => getScalingParameters(imageIds[index]));
|
|
45
|
+
const hasNegativeRescale = scalingParameters.some((params) => params.rescaleIntercept < 0 || params.rescaleSlope < 0);
|
|
46
|
+
const floatAfterScale = scalingParameters.some((params) => hasFloatScalingParameters(params));
|
|
45
47
|
const canRenderFloat = canRenderFloatTextures();
|
|
46
48
|
switch (BitsAllocated) {
|
|
47
49
|
case 8:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"type": "individual",
|
|
84
84
|
"url": "https://ohif.org/donate"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "0fa3e29d97908f58933e38f4acf128aff1f523d0"
|
|
87
87
|
}
|