@cornerstonejs/tools 1.64.0 → 1.64.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.64.0",
3
+ "version": "1.64.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.64.0",
32
+ "@cornerstonejs/core": "^1.64.2",
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": "997836e0c4aa342a1af3bc436a6c06112b24cfbc"
62
+ "gitHead": "6a440908bd9438a92286f55a0b6b1930dbd61544"
63
63
  }
@@ -34,7 +34,7 @@ export default interface IToolGroup {
34
34
  };
35
35
  /** Add tool instance, if you want to create more than one instance from the same tool e.g., brush/eraser tool */
36
36
  addToolInstance: {
37
- (ttoolName: string, parentClassName: string, configuration?: any): void;
37
+ (toolName: string, parentClassName: string, configuration?: any): void;
38
38
  };
39
39
  /** Add viewports to share the tools for the ToolGroup */
40
40
  addViewport: {
@@ -173,7 +173,13 @@ const getCalibratedLengthUnitsAndScale = (image, handles) => {
173
173
  }
174
174
  } else if (calibration.scale) {
175
175
  scale = calibration.scale;
176
- calibrationType = calibration?.type;
176
+ }
177
+
178
+ // everything except REGION/Uncalibratted
179
+ const types = [CalibrationTypes.ERMF, CalibrationTypes.USER, CalibrationTypes.ERROR, CalibrationTypes.PROJECTION];
180
+
181
+ if (types.includes(calibration?.type)) {
182
+ calibrationType = calibration.type;
177
183
  }
178
184
 
179
185
  return {