@cornerstonejs/core 2.16.0 → 2.16.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.
@@ -71,6 +71,7 @@ export default class VoxelManager {
71
71
  ],
72
72
  pointInShapeFn: isInObject,
73
73
  callback,
74
+ returnPoints,
74
75
  });
75
76
  return pointsInShape;
76
77
  }
@@ -29,10 +29,11 @@ export declare function iterateOverPointsInShape({ imageData, bounds, scalarData
29
29
  pointInShapeFn: any;
30
30
  callback: any;
31
31
  }): PointInShape[];
32
- export declare function iterateOverPointsInShapeVoxelManager({ voxelManager, bounds, imageData, pointInShapeFn, callback, }: {
32
+ export declare function iterateOverPointsInShapeVoxelManager({ voxelManager, bounds, imageData, pointInShapeFn, callback, returnPoints, }: {
33
33
  voxelManager: any;
34
34
  bounds: any;
35
35
  imageData: any;
36
36
  pointInShapeFn: any;
37
37
  callback: any;
38
+ returnPoints: any;
38
39
  }): PointInShape[];
@@ -73,7 +73,7 @@ export function iterateOverPointsInShape({ imageData, bounds, scalarData, pointI
73
73
  }
74
74
  return pointsInShape;
75
75
  }
76
- export function iterateOverPointsInShapeVoxelManager({ voxelManager, bounds, imageData, pointInShapeFn, callback, }) {
76
+ export function iterateOverPointsInShapeVoxelManager({ voxelManager, bounds, imageData, pointInShapeFn, callback, returnPoints, }) {
77
77
  const [[iMin, iMax], [jMin, jMax], [kMin, kMax]] = bounds;
78
78
  const indexToWorld = createPositionCallback(imageData);
79
79
  const pointIJK = [0, 0, 0];
@@ -88,12 +88,14 @@ export function iterateOverPointsInShapeVoxelManager({ voxelManager, bounds, ima
88
88
  if (pointInShapeFn(pointLPS, pointIJK)) {
89
89
  const index = voxelManager.toIndex(pointIJK);
90
90
  const value = voxelManager.getAtIndex(index);
91
- pointsInShape.push({
92
- value,
93
- index,
94
- pointIJK: [...pointIJK],
95
- pointLPS: pointLPS.slice(),
96
- });
91
+ if (returnPoints) {
92
+ pointsInShape.push({
93
+ value,
94
+ index,
95
+ pointIJK: [...pointIJK],
96
+ pointLPS: pointLPS.slice(),
97
+ });
98
+ }
97
99
  callback?.({ value, index, pointIJK, pointLPS });
98
100
  }
99
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "2.16.0",
3
+ "version": "2.16.1",
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": "9cbc1919dc5f7a19762d526e3e3d42eec05a0e21"
85
+ "gitHead": "bbe715cbc6c3e791783196b5016a1bdec47f46be"
86
86
  }