@cornerstonejs/tools 0.61.10 → 0.61.11

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/tools",
3
- "version": "0.61.10",
3
+ "version": "0.61.11",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "main": "dist/umd/index.js",
6
6
  "types": "dist/esm/index.d.ts",
@@ -52,5 +52,5 @@
52
52
  "type": "individual",
53
53
  "url": "https://ohif.org/donate"
54
54
  },
55
- "gitHead": "b373fe93e26607632d50befa270f23f9deb92abc"
55
+ "gitHead": "f3d10f612cf03767108e076ef8b9370c6247bdd0"
56
56
  }
@@ -13,7 +13,12 @@ function getSegmentationIndices(segmentationId) {
13
13
  const scalarData = volume.getScalarData();
14
14
 
15
15
  const keySet = {};
16
- scalarData.forEach((it) => (keySet[it] = it));
16
+ for (let i = 0; i < scalarData.length; i++) {
17
+ const segmentIndex = scalarData[i];
18
+ if (segmentIndex !== 0 && !keySet[segmentIndex]) {
19
+ keySet[segmentIndex] = true;
20
+ }
21
+ }
17
22
  return Object.keys(keySet).map((it) => parseInt(it, 10));
18
23
  } else if (segmentation.type === SegmentationRepresentations.Contour) {
19
24
  const geometryIds = segmentation.representationData.CONTOUR?.geometryIds;