@cornerstonejs/tools 1.61.1 → 1.61.3

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": "1.61.1",
3
+ "version": "1.61.3",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "main": "src/index.ts",
6
6
  "types": "dist/types/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
30
30
  },
31
31
  "dependencies": {
32
- "@cornerstonejs/core": "^1.61.1",
32
+ "@cornerstonejs/core": "^1.61.3",
33
33
  "@icr/polyseg-wasm": "0.4.0",
34
34
  "@types/offscreencanvas": "2019.7.3",
35
35
  "comlink": "^4.4.1",
@@ -59,5 +59,5 @@
59
59
  "type": "individual",
60
60
  "url": "https://ohif.org/donate"
61
61
  },
62
- "gitHead": "62079a4d30f890ecd5de763dd8e6ad932377b50a"
62
+ "gitHead": "fb8ba8ba19974d073bb1bdf8b9e6efa2a63d9f94"
63
63
  }
@@ -204,7 +204,8 @@ class WindowLevelTool extends BaseTool {
204
204
  const dimensions = imageData.getDimensions();
205
205
 
206
206
  if (imageData.getRange) {
207
- return imageData.getRange();
207
+ const imageDataRange = imageData.getRange();
208
+ return imageDataRange[1] - imageDataRange[0];
208
209
  }
209
210
  let scalarData;
210
211
  // if getScalarData is a method on imageData
@@ -233,10 +233,6 @@ function completeDrawClosedContour(
233
233
  ? getInterpolatedPoints(this.configuration, clockwise)
234
234
  : clockwise;
235
235
 
236
- // Note: -> This is pretty expensive and may not scale well with hundreds of
237
- // contours. A future optimization if we use this for segmentation is to re-do
238
- // this rendering with the GPU rather than SVG.
239
-
240
236
  this.updateContourPolyline(
241
237
  annotation,
242
238
  {
@@ -9,10 +9,11 @@ export function shouldSmooth(
9
9
  if (annotation?.autoGenerated) {
10
10
  return false;
11
11
  }
12
- return (
12
+ const shouldSmooth =
13
13
  configuration?.smoothing?.smoothOnAdd === true ||
14
- configuration?.smoothing?.smoothOnEdit === true
15
- );
14
+ configuration?.smoothing?.smoothOnEdit === true;
15
+
16
+ return shouldSmooth;
16
17
  }
17
18
 
18
19
  /**
@@ -177,7 +178,7 @@ export function getInterpolatedPoints(
177
178
  points: Types.Point2[],
178
179
  pointsOfReference?: Types.Point2[]
179
180
  ): Types.Point2[] {
180
- const { interpolation } = configuration;
181
+ const { interpolation, smoothing } = configuration;
181
182
 
182
183
  const result = points;
183
184
 
@@ -187,7 +188,7 @@ export function getInterpolatedPoints(
187
188
  knotsRatioPercentageOnEdit,
188
189
  smoothOnAdd = false,
189
190
  smoothOnEdit = false,
190
- } = interpolation;
191
+ } = smoothing;
191
192
 
192
193
  const knotsRatioPercentage = pointsOfReference
193
194
  ? knotsRatioPercentageOnEdit