@bettermedicine/imeasure 0.0.2 → 0.0.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.
@@ -32,7 +32,10 @@ export const extractWorldMetaFromImageDataAndDisplaySet = (imageData, displaySet
32
32
  worldShape: imageData.getDimensions(),
33
33
  worldSpacing: imageData.getSpacing(),
34
34
  imageCount,
35
- worldBoundingImagePositions: [firstDsPosition, lastDsPosition],
35
+ worldBoundingImagePositions: [
36
+ ensureNumberArray(firstDsPosition),
37
+ ensureNumberArray(lastDsPosition),
38
+ ],
36
39
  rescaleIntercept: ensureNumber(rescaleIntercept),
37
40
  rescaleSlope: ensureNumber(rescaleSlope),
38
41
  imageOrientationPatient: ensureNumberArray(imageOrientationPatient),
@@ -1,13 +1,12 @@
1
- import type { vec3 } from "gl-matrix";
2
1
  import { Point3D } from "./cornerstone";
3
2
  export type TWorldMetadata = {
4
- worldOrigin: vec3;
5
- worldShape: vec3;
6
- worldSpacing: vec3;
3
+ worldOrigin: Point3D;
4
+ worldShape: Point3D;
5
+ worldSpacing: Point3D;
7
6
  rescaleIntercept: number;
8
7
  rescaleSlope: number;
9
8
  imageOrientationPatient: [number, number, number, number, number, number];
10
- worldBoundingImagePositions: [vec3, vec3];
9
+ worldBoundingImagePositions: [Point3D, Point3D];
11
10
  imageCount: number;
12
11
  };
13
12
  export type TCropMetadata = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bettermedicine/imeasure",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "prepack": "npm run build",
@@ -48,7 +48,10 @@ export const extractWorldMetaFromImageDataAndDisplaySet = (
48
48
  worldShape: imageData.getDimensions(),
49
49
  worldSpacing: imageData.getSpacing(),
50
50
  imageCount,
51
- worldBoundingImagePositions: [firstDsPosition, lastDsPosition],
51
+ worldBoundingImagePositions: [
52
+ ensureNumberArray(firstDsPosition) as [number, number, number],
53
+ ensureNumberArray(lastDsPosition) as [number, number, number],
54
+ ],
52
55
  rescaleIntercept: ensureNumber(rescaleIntercept),
53
56
  rescaleSlope: ensureNumber(rescaleSlope),
54
57
  imageOrientationPatient: ensureNumberArray(imageOrientationPatient) as [
@@ -1,14 +1,13 @@
1
- import type { vec3 } from "gl-matrix";
2
1
  import { Point3D } from "./cornerstone";
3
2
 
4
3
  export type TWorldMetadata = {
5
- worldOrigin: vec3;
6
- worldShape: vec3;
7
- worldSpacing: vec3;
4
+ worldOrigin: Point3D;
5
+ worldShape: Point3D;
6
+ worldSpacing: Point3D;
8
7
  rescaleIntercept: number;
9
8
  rescaleSlope: number;
10
9
  imageOrientationPatient: [number, number, number, number, number, number];
11
- worldBoundingImagePositions: [vec3, vec3];
10
+ worldBoundingImagePositions: [Point3D, Point3D];
12
11
  imageCount: number;
13
12
  };
14
13