@cornerstonejs/tools 1.43.1 → 1.43.2

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.43.1",
3
+ "version": "1.43.2",
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.43.1",
32
+ "@cornerstonejs/core": "^1.43.2",
33
33
  "comlink": "^4.4.1",
34
34
  "lodash.clonedeep": "4.5.0",
35
35
  "lodash.get": "^4.4.2"
@@ -53,5 +53,5 @@
53
53
  "type": "individual",
54
54
  "url": "https://ohif.org/donate"
55
55
  },
56
- "gitHead": "ebb1c8fd94162c195ddae365ab20c2007da13800"
56
+ "gitHead": "616be56e9a25f634b109f7378cc4464d34a1f085"
57
57
  }
@@ -73,11 +73,12 @@ class WindowLevelTool extends BaseTool {
73
73
  throw new Error('Viewport is not a valid type');
74
74
  }
75
75
 
76
- // If modality is PT, treat it special to not include the canvas delta in
76
+ // If modality is PT an the viewport is pre-scaled (SUV),
77
+ // treat it special to not include the canvas delta in
77
78
  // the x direction. For other modalities, use the canvas delta in both
78
79
  // directions, and if the viewport is a volumeViewport, the multiplier
79
80
  // is calculate using the volume min and max.
80
- if (modality === PT) {
81
+ if (modality === PT && isPreScaled) {
81
82
  newRange = this.getPTScaledNewRange({
82
83
  deltaPointsCanvas: deltaPoints.canvas,
83
84
  lower,
@@ -190,12 +191,7 @@ class WindowLevelTool extends BaseTool {
190
191
 
191
192
  const ratio = imageDynamicRange / DEFAULT_IMAGE_DYNAMIC_RANGE;
192
193
 
193
- let multiplier = DEFAULT_MULTIPLIER;
194
-
195
- if (ratio > 1) {
196
- multiplier = Math.round(ratio);
197
- }
198
- return multiplier;
194
+ return ratio > 1 ? Math.round(ratio) : ratio;
199
195
  }
200
196
 
201
197
  _getImageDynamicRangeFromViewport(viewport) {