@cornerstonejs/core 1.76.0 → 1.77.0
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.
- package/dist/cjs/utilities/sortImageIdsAndGetSpacing.js +7 -3
- package/dist/cjs/utilities/sortImageIdsAndGetSpacing.js.map +1 -1
- package/dist/esm/utilities/sortImageIdsAndGetSpacing.js +7 -3
- package/dist/esm/utilities/sortImageIdsAndGetSpacing.js.map +1 -1
- package/dist/types/utilities/sortImageIdsAndGetSpacing.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
- package/src/utilities/sortImageIdsAndGetSpacing.ts +12 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.77.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"type": "individual",
|
|
48
48
|
"url": "https://ohif.org/donate"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "87ade54eba0f00647355408ddc812444d474f1c6"
|
|
51
51
|
}
|
|
@@ -142,10 +142,11 @@ export default function sortImageIdsAndGetSpacing(
|
|
|
142
142
|
Math.floor(imageIds.length / 2);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
const {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
const {
|
|
146
|
+
imagePositionPatient: origin,
|
|
147
|
+
sliceThickness,
|
|
148
|
+
spacingBetweenSlices,
|
|
149
|
+
} = metaData.get('imagePlaneModule', sortedImageIds[0]);
|
|
149
150
|
|
|
150
151
|
const { strictZSpacingForVolumeViewport } = getConfiguration().rendering;
|
|
151
152
|
|
|
@@ -154,8 +155,13 @@ export default function sortImageIdsAndGetSpacing(
|
|
|
154
155
|
// If possible, we use the sliceThickness, but we warn about this dicom file
|
|
155
156
|
// weirdness. If sliceThickness is not available, we set to 1 just to render
|
|
156
157
|
if (zSpacing === 0 && !strictZSpacingForVolumeViewport) {
|
|
157
|
-
if (sliceThickness) {
|
|
158
|
-
console.log('Could not calculate zSpacing. Using
|
|
158
|
+
if (sliceThickness && spacingBetweenSlices) {
|
|
159
|
+
console.log('Could not calculate zSpacing. Using spacingBetweenSlices');
|
|
160
|
+
zSpacing = spacingBetweenSlices;
|
|
161
|
+
} else if (sliceThickness) {
|
|
162
|
+
console.log(
|
|
163
|
+
'Could not calculate zSpacing and no spacingBetweenSlices. Using sliceThickness'
|
|
164
|
+
);
|
|
159
165
|
zSpacing = sliceThickness;
|
|
160
166
|
} else {
|
|
161
167
|
console.log(
|