@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "1.76.0",
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": "97c7f819997bdff7dda77b94e99c5ae2f7502fc5"
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 { imagePositionPatient: origin, sliceThickness } = metaData.get(
146
- 'imagePlaneModule',
147
- sortedImageIds[0]
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 sliceThickness');
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(