@cornerstonejs/adapters 5.0.9 → 5.0.11
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/dist/esm/adapters/Cornerstone3D/Angle.js +2 -2
- package/dist/esm/adapters/Cornerstone3D/BaseAdapter3D.d.ts +1 -0
- package/dist/esm/adapters/Cornerstone3D/BaseAdapter3D.js +5 -0
- package/dist/esm/adapters/Cornerstone3D/Bidirectional.js +4 -4
- package/dist/esm/adapters/Cornerstone3D/CircleROI.js +10 -10
- package/dist/esm/adapters/Cornerstone3D/EllipticalROI.js +8 -8
- package/dist/esm/adapters/Cornerstone3D/Length.js +2 -2
- package/dist/esm/adapters/Cornerstone3D/PlanarFreehandROI.js +9 -9
- package/dist/esm/adapters/Cornerstone3D/RectangleROI.js +8 -8
- package/dist/esm/version.d.ts +1 -1
- package/package.json +6 -6
|
@@ -33,7 +33,6 @@ class Angle extends BaseAdapter3D {
|
|
|
33
33
|
return state;
|
|
34
34
|
}
|
|
35
35
|
static getTID300RepresentationArguments(tool) {
|
|
36
|
-
var _cachedStats;
|
|
37
36
|
let is3DMeasurement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
38
37
|
const data = tool.data,
|
|
39
38
|
finding = tool.finding,
|
|
@@ -51,7 +50,8 @@ class Angle extends BaseAdapter3D {
|
|
|
51
50
|
const point2 = toScoord(scoordProps, handles.points[1]);
|
|
52
51
|
const point3 = toScoord(scoordProps, handles.points[1]);
|
|
53
52
|
const point4 = toScoord(scoordProps, handles.points[2]);
|
|
54
|
-
const
|
|
53
|
+
const _super$getCachedStats = super.getCachedStats(cachedStats, metadata),
|
|
54
|
+
angle = _super$getCachedStats.angle;
|
|
55
55
|
return {
|
|
56
56
|
point1,
|
|
57
57
|
point2,
|
|
@@ -114,6 +114,11 @@ class BaseAdapter3D {
|
|
|
114
114
|
};
|
|
115
115
|
return tidArguments;
|
|
116
116
|
}
|
|
117
|
+
static getCachedStats(cachedStats, metadata) {
|
|
118
|
+
const referencedImageId = metadata.referencedImageId,
|
|
119
|
+
volumeId = metadata.volumeId;
|
|
120
|
+
return cachedStats["imageId:".concat(referencedImageId)] || cachedStats["volumeId:".concat(volumeId)] || {};
|
|
121
|
+
}
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
export { BaseAdapter3D as default };
|
|
@@ -78,10 +78,10 @@ class Bidirectional extends BaseAdapter3D {
|
|
|
78
78
|
const longAxisEndImage = toScoord(scoordProps, shortAxisPoints[1]);
|
|
79
79
|
const shortAxisStartImage = toScoord(scoordProps, longAxisPoints[0]);
|
|
80
80
|
const shortAxisEndImage = toScoord(scoordProps, longAxisPoints[1]);
|
|
81
|
-
const
|
|
82
|
-
length =
|
|
83
|
-
width =
|
|
84
|
-
unit =
|
|
81
|
+
const _super$getCachedStats = super.getCachedStats(cachedStats, metadata),
|
|
82
|
+
length = _super$getCachedStats.length,
|
|
83
|
+
width = _super$getCachedStats.width,
|
|
84
|
+
unit = _super$getCachedStats.unit;
|
|
85
85
|
return {
|
|
86
86
|
longAxis: {
|
|
87
87
|
point1: longAxisStartImage,
|
|
@@ -55,16 +55,16 @@ class CircleROI extends BaseAdapter3D {
|
|
|
55
55
|
};
|
|
56
56
|
const center = toScoord(scoordProps, handles.points[0]);
|
|
57
57
|
const end = toScoord(scoordProps, handles.points[1]);
|
|
58
|
-
const
|
|
59
|
-
area =
|
|
60
|
-
radius =
|
|
61
|
-
max =
|
|
62
|
-
min =
|
|
63
|
-
stdDev =
|
|
64
|
-
mean =
|
|
65
|
-
modalityUnit =
|
|
66
|
-
radiusUnit =
|
|
67
|
-
areaUnit =
|
|
58
|
+
const _super$getCachedStats = super.getCachedStats(cachedStats, metadata),
|
|
59
|
+
area = _super$getCachedStats.area,
|
|
60
|
+
radius = _super$getCachedStats.radius,
|
|
61
|
+
max = _super$getCachedStats.max,
|
|
62
|
+
min = _super$getCachedStats.min,
|
|
63
|
+
stdDev = _super$getCachedStats.stdDev,
|
|
64
|
+
mean = _super$getCachedStats.mean,
|
|
65
|
+
modalityUnit = _super$getCachedStats.modalityUnit,
|
|
66
|
+
radiusUnit = _super$getCachedStats.radiusUnit,
|
|
67
|
+
areaUnit = _super$getCachedStats.areaUnit;
|
|
68
68
|
const perimeter = 2 * Math.PI * radius;
|
|
69
69
|
return {
|
|
70
70
|
area,
|
|
@@ -70,14 +70,14 @@ class EllipticalROI extends BaseAdapter3D {
|
|
|
70
70
|
} else {
|
|
71
71
|
points.push(left, right, top, bottom);
|
|
72
72
|
}
|
|
73
|
-
const
|
|
74
|
-
area =
|
|
75
|
-
max =
|
|
76
|
-
min =
|
|
77
|
-
mean =
|
|
78
|
-
stdDev =
|
|
79
|
-
modalityUnit =
|
|
80
|
-
areaUnit =
|
|
73
|
+
const _super$getCachedStats = super.getCachedStats(cachedStats, metadata),
|
|
74
|
+
area = _super$getCachedStats.area,
|
|
75
|
+
max = _super$getCachedStats.max,
|
|
76
|
+
min = _super$getCachedStats.min,
|
|
77
|
+
mean = _super$getCachedStats.mean,
|
|
78
|
+
stdDev = _super$getCachedStats.stdDev,
|
|
79
|
+
modalityUnit = _super$getCachedStats.modalityUnit,
|
|
80
|
+
areaUnit = _super$getCachedStats.areaUnit;
|
|
81
81
|
const convertedPoints = points.map(point => toScoord(scoordProps, point));
|
|
82
82
|
return {
|
|
83
83
|
area,
|
|
@@ -51,8 +51,8 @@ class Length extends BaseAdapter3D {
|
|
|
51
51
|
};
|
|
52
52
|
const point1 = toScoord(scoordProps, handles.points[0]);
|
|
53
53
|
const point2 = toScoord(scoordProps, handles.points[1]);
|
|
54
|
-
const
|
|
55
|
-
distance =
|
|
54
|
+
const _super$getCachedStats = super.getCachedStats(cachedStats, metadata),
|
|
55
|
+
distance = _super$getCachedStats.length;
|
|
56
56
|
return {
|
|
57
57
|
point1,
|
|
58
58
|
point2,
|
|
@@ -88,15 +88,15 @@ class PlanarFreehandROI extends BaseAdapter3D {
|
|
|
88
88
|
points.push(firstPoint);
|
|
89
89
|
}
|
|
90
90
|
const controlPoints = (handles === null || handles === void 0 || (_handles$points = handles.points) === null || _handles$points === void 0 ? void 0 : _handles$points.length) && toScoords(scoordProps, handles.points);
|
|
91
|
-
const
|
|
92
|
-
area =
|
|
93
|
-
areaUnit =
|
|
94
|
-
modalityUnit =
|
|
95
|
-
perimeter =
|
|
96
|
-
mean =
|
|
97
|
-
max =
|
|
98
|
-
stdDev =
|
|
99
|
-
length =
|
|
91
|
+
const _super$getCachedStats = super.getCachedStats(data.cachedStats, metadata),
|
|
92
|
+
area = _super$getCachedStats.area,
|
|
93
|
+
areaUnit = _super$getCachedStats.areaUnit,
|
|
94
|
+
modalityUnit = _super$getCachedStats.modalityUnit,
|
|
95
|
+
perimeter = _super$getCachedStats.perimeter,
|
|
96
|
+
mean = _super$getCachedStats.mean,
|
|
97
|
+
max = _super$getCachedStats.max,
|
|
98
|
+
stdDev = _super$getCachedStats.stdDev,
|
|
99
|
+
length = _super$getCachedStats.length;
|
|
100
100
|
return {
|
|
101
101
|
points,
|
|
102
102
|
controlPoints,
|
|
@@ -62,14 +62,14 @@ class RectangleROI extends BaseAdapter3D {
|
|
|
62
62
|
referencedImageId
|
|
63
63
|
};
|
|
64
64
|
const corners = toScoords(scoordProps, data.handles.points);
|
|
65
|
-
const
|
|
66
|
-
area =
|
|
67
|
-
perimeter =
|
|
68
|
-
max =
|
|
69
|
-
mean =
|
|
70
|
-
stdDev =
|
|
71
|
-
areaUnit =
|
|
72
|
-
modalityUnit =
|
|
65
|
+
const _super$getCachedStats = super.getCachedStats(data.cachedStats, metadata),
|
|
66
|
+
area = _super$getCachedStats.area,
|
|
67
|
+
perimeter = _super$getCachedStats.perimeter,
|
|
68
|
+
max = _super$getCachedStats.max,
|
|
69
|
+
mean = _super$getCachedStats.mean,
|
|
70
|
+
stdDev = _super$getCachedStats.stdDev,
|
|
71
|
+
areaUnit = _super$getCachedStats.areaUnit,
|
|
72
|
+
modalityUnit = _super$getCachedStats.modalityUnit;
|
|
73
73
|
return {
|
|
74
74
|
points: [corners[0], corners[1], corners[3], corners[2], corners[0]],
|
|
75
75
|
area,
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.0.
|
|
1
|
+
export declare const version = "5.0.11";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/adapters",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.11",
|
|
4
4
|
"description": "Adapters for Cornerstone3D to/from formats including DICOM SR and others",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
"ndarray": "1.0.19"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@cornerstonejs/core": "5.0.
|
|
93
|
-
"@cornerstonejs/tools": "5.0.
|
|
92
|
+
"@cornerstonejs/core": "5.0.11",
|
|
93
|
+
"@cornerstonejs/tools": "5.0.11"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
|
-
"@cornerstonejs/core": "5.0.
|
|
97
|
-
"@cornerstonejs/tools": "5.0.
|
|
96
|
+
"@cornerstonejs/core": "5.0.11",
|
|
97
|
+
"@cornerstonejs/tools": "5.0.11"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "40e7a86b4bc2cdee68df76f9abed9cd762c70dc6"
|
|
100
100
|
}
|