@cornerstonejs/tools 4.22.12 → 4.22.13

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.
@@ -548,11 +548,13 @@ class EllipticalROITool extends AnnotationTool {
548
548
  const { worldWidth, worldHeight } = getWorldWidthAndHeightFromTwoPoints(viewPlaneNormal, viewUp, worldPos1, worldPos2);
549
549
  const isEmptyArea = worldWidth === 0 && worldHeight === 0;
550
550
  const handles = [pos1Index, pos2Index];
551
- const { scale, areaUnit } = getCalibratedLengthUnitsAndScale(image, handles);
551
+ const calibrate = getCalibratedLengthUnitsAndScale(image, handles);
552
+ const { areaUnit } = calibrate;
552
553
  const aspect = getCalibratedAspect(image);
553
- const area = Math.abs(Math.PI *
554
- (worldWidth / scale / 2) *
555
- (worldHeight / aspect / scale / 2));
554
+ const indexHandles = points.map((p) => imageData.worldToIndex(p));
555
+ const width = EllipticalROITool.calculateLengthInIndex(calibrate, indexHandles.slice(2, 4));
556
+ const height = EllipticalROITool.calculateLengthInIndex(calibrate, indexHandles.slice(0, 2));
557
+ const area = Math.abs(Math.PI * (width / 2) * (height / aspect / 2));
556
558
  const pixelUnitsOptions = {
557
559
  isPreScaled: isViewportPreScaled(viewport, targetId),
558
560
  isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
@@ -1 +1 @@
1
- export declare const version = "4.22.12";
1
+ export declare const version = "4.22.13";
@@ -1 +1 @@
1
- export const version = '4.22.12';
1
+ export const version = '4.22.13';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "4.22.12",
3
+ "version": "4.22.13",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -105,11 +105,11 @@
105
105
  "lodash.get": "4.4.2"
106
106
  },
107
107
  "devDependencies": {
108
- "@cornerstonejs/core": "4.22.12",
108
+ "@cornerstonejs/core": "4.22.13",
109
109
  "canvas": "3.2.0"
110
110
  },
111
111
  "peerDependencies": {
112
- "@cornerstonejs/core": "4.22.12",
112
+ "@cornerstonejs/core": "4.22.13",
113
113
  "@kitware/vtk.js": "34.15.1",
114
114
  "@types/d3-array": "3.2.1",
115
115
  "@types/d3-interpolate": "3.0.4",
@@ -128,5 +128,5 @@
128
128
  "type": "individual",
129
129
  "url": "https://ohif.org/donate"
130
130
  },
131
- "gitHead": "5cb108650fe38eac81881750b859b08de4c45cce"
131
+ "gitHead": "6f7ce81ce424eb37a67ba59e6b7946de474a4578"
132
132
  }