@cornerstonejs/adapters 3.14.3 → 3.15.0
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.d.ts +66 -14
- package/dist/esm/adapters/Cornerstone3D/Angle.js +102 -2
- package/dist/esm/adapters/Cornerstone3D/ArrowAnnotate.d.ts +27 -15
- package/dist/esm/adapters/Cornerstone3D/ArrowAnnotate.js +110 -1
- package/dist/esm/adapters/Cornerstone3D/BaseAdapter3D.d.ts +18 -9
- package/dist/esm/adapters/Cornerstone3D/BaseAdapter3D.js +25 -1
- package/dist/esm/adapters/Cornerstone3D/Bidirectional.d.ts +84 -14
- package/dist/esm/adapters/Cornerstone3D/Bidirectional.js +133 -9
- package/dist/esm/adapters/Cornerstone3D/CircleROI.d.ts +33 -15
- package/dist/esm/adapters/Cornerstone3D/CircleROI.js +97 -2
- package/dist/esm/adapters/Cornerstone3D/CobbAngle.d.ts +66 -14
- package/dist/esm/adapters/Cornerstone3D/CobbAngle.js +107 -2
- package/dist/esm/adapters/Cornerstone3D/EllipticalROI.d.ts +30 -15
- package/dist/esm/adapters/Cornerstone3D/EllipticalROI.js +151 -2
- package/dist/esm/adapters/Cornerstone3D/KeyImage.d.ts +17 -15
- package/dist/esm/adapters/Cornerstone3D/Length.d.ts +46 -14
- package/dist/esm/adapters/Cornerstone3D/Length.js +93 -6
- package/dist/esm/adapters/Cornerstone3D/MeasurementReport.d.ts +82 -12
- package/dist/esm/adapters/Cornerstone3D/MeasurementReport.js +181 -44
- package/dist/esm/adapters/Cornerstone3D/PlanarFreehandROI.d.ts +41 -15
- package/dist/esm/adapters/Cornerstone3D/PlanarFreehandROI.js +112 -2
- package/dist/esm/adapters/Cornerstone3D/Probe.d.ts +39 -14
- package/dist/esm/adapters/Cornerstone3D/Probe.js +112 -1
- package/dist/esm/adapters/Cornerstone3D/RectangleROI.d.ts +31 -15
- package/dist/esm/adapters/Cornerstone3D/RectangleROI.js +82 -2
- package/dist/esm/adapters/Cornerstone3D/UltrasoundDirectional.d.ts +8 -9
- package/dist/esm/version.d.ts +1 -1
- package/package.json +5 -5
|
@@ -14,8 +14,36 @@ class EllipticalROI extends BaseAdapter3D {
|
|
|
14
14
|
defaultState,
|
|
15
15
|
NUMGroup,
|
|
16
16
|
SCOORDGroup,
|
|
17
|
+
SCOORD3DGroup,
|
|
17
18
|
ReferencedFrameNumber
|
|
18
19
|
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, EllipticalROI.toolType);
|
|
20
|
+
if (SCOORDGroup) {
|
|
21
|
+
return this.getMeasurementDataFromScoord({
|
|
22
|
+
defaultState,
|
|
23
|
+
SCOORDGroup,
|
|
24
|
+
imageToWorldCoords,
|
|
25
|
+
metadata,
|
|
26
|
+
NUMGroup,
|
|
27
|
+
ReferencedFrameNumber
|
|
28
|
+
});
|
|
29
|
+
} else if (SCOORD3DGroup) {
|
|
30
|
+
return this.getMeasurementDataFromScoord3D({
|
|
31
|
+
defaultState,
|
|
32
|
+
SCOORD3DGroup
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
throw new Error("Can't get measurement data with missing SCOORD and SCOORD3D groups.");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
static getMeasurementDataFromScoord(_ref) {
|
|
39
|
+
let {
|
|
40
|
+
defaultState,
|
|
41
|
+
SCOORDGroup,
|
|
42
|
+
imageToWorldCoords,
|
|
43
|
+
metadata,
|
|
44
|
+
NUMGroup,
|
|
45
|
+
ReferencedFrameNumber
|
|
46
|
+
} = _ref;
|
|
19
47
|
const referencedImageId = defaultState.annotation.metadata.referencedImageId;
|
|
20
48
|
const {
|
|
21
49
|
GraphicData
|
|
@@ -73,6 +101,42 @@ class EllipticalROI extends BaseAdapter3D {
|
|
|
73
101
|
};
|
|
74
102
|
return state;
|
|
75
103
|
}
|
|
104
|
+
static getMeasurementDataFromScoord3D(_ref2) {
|
|
105
|
+
let {
|
|
106
|
+
defaultState,
|
|
107
|
+
SCOORD3DGroup
|
|
108
|
+
} = _ref2;
|
|
109
|
+
const {
|
|
110
|
+
GraphicData
|
|
111
|
+
} = SCOORD3DGroup;
|
|
112
|
+
const pointsWorld = [];
|
|
113
|
+
for (let i = 0; i < GraphicData.length; i += 3) {
|
|
114
|
+
const worldPos = [GraphicData[i], GraphicData[i + 1], GraphicData[i + 2]];
|
|
115
|
+
pointsWorld.push(worldPos);
|
|
116
|
+
}
|
|
117
|
+
const majorAxisStart = vec3.fromValues(...pointsWorld[0]);
|
|
118
|
+
const majorAxisEnd = vec3.fromValues(...pointsWorld[1]);
|
|
119
|
+
const minorAxisStart = vec3.fromValues(...pointsWorld[2]);
|
|
120
|
+
const minorAxisEnd = vec3.fromValues(...pointsWorld[3]);
|
|
121
|
+
const majorAxisVec = vec3.create();
|
|
122
|
+
vec3.sub(majorAxisVec, majorAxisEnd, majorAxisStart);
|
|
123
|
+
vec3.normalize(majorAxisVec, majorAxisVec);
|
|
124
|
+
const minorAxisVec = vec3.create();
|
|
125
|
+
vec3.sub(minorAxisVec, minorAxisEnd, minorAxisStart);
|
|
126
|
+
vec3.normalize(minorAxisVec, minorAxisVec);
|
|
127
|
+
const state = defaultState;
|
|
128
|
+
state.annotation.data = {
|
|
129
|
+
handles: {
|
|
130
|
+
points: [majorAxisStart, majorAxisEnd, minorAxisStart, minorAxisEnd],
|
|
131
|
+
activeHandleIndex: 0,
|
|
132
|
+
textBox: {
|
|
133
|
+
hasMoved: false
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
cachedStats: {}
|
|
137
|
+
};
|
|
138
|
+
return state;
|
|
139
|
+
}
|
|
76
140
|
static getTID300RepresentationArguments(tool, worldToImageCoords) {
|
|
77
141
|
const {
|
|
78
142
|
data,
|
|
@@ -89,7 +153,7 @@ class EllipticalROI extends BaseAdapter3D {
|
|
|
89
153
|
referencedImageId
|
|
90
154
|
} = metadata;
|
|
91
155
|
if (!referencedImageId) {
|
|
92
|
-
|
|
156
|
+
return this.getTID300RepresentationArgumentsSCOORD3D(tool);
|
|
93
157
|
}
|
|
94
158
|
let top, bottom, left, right;
|
|
95
159
|
if (rotation == 90 || rotation == 270) {
|
|
@@ -149,7 +213,92 @@ class EllipticalROI extends BaseAdapter3D {
|
|
|
149
213
|
points,
|
|
150
214
|
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
151
215
|
finding,
|
|
152
|
-
findingSites: findingSites || []
|
|
216
|
+
findingSites: findingSites || [],
|
|
217
|
+
use3DSpatialCoordinates: false
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
static getTID300RepresentationArgumentsSCOORD3D(tool) {
|
|
221
|
+
const {
|
|
222
|
+
data,
|
|
223
|
+
finding,
|
|
224
|
+
findingSites,
|
|
225
|
+
metadata
|
|
226
|
+
} = tool;
|
|
227
|
+
const {
|
|
228
|
+
cachedStats,
|
|
229
|
+
handles
|
|
230
|
+
} = data;
|
|
231
|
+
const rotation = data.initialRotation || 0;
|
|
232
|
+
let top, bottom, left, right;
|
|
233
|
+
if (rotation == 90 || rotation == 270) {
|
|
234
|
+
bottom = handles.points[2];
|
|
235
|
+
top = handles.points[3];
|
|
236
|
+
left = handles.points[0];
|
|
237
|
+
right = handles.points[1];
|
|
238
|
+
} else {
|
|
239
|
+
top = handles.points[0];
|
|
240
|
+
bottom = handles.points[1];
|
|
241
|
+
left = handles.points[2];
|
|
242
|
+
right = handles.points[3];
|
|
243
|
+
}
|
|
244
|
+
const topBottomLength = Math.sqrt((top[0] - bottom[0]) ** 2 + (top[1] - bottom[1]) ** 2 + (top[2] - bottom[2]) ** 2);
|
|
245
|
+
const leftRightLength = Math.sqrt((left[0] - right[0]) ** 2 + (left[1] - right[1]) ** 2 + (left[2] - right[2]) ** 2);
|
|
246
|
+
const points = [];
|
|
247
|
+
if (topBottomLength > leftRightLength) {
|
|
248
|
+
points.push({
|
|
249
|
+
x: top[0],
|
|
250
|
+
y: top[1],
|
|
251
|
+
z: top[2]
|
|
252
|
+
});
|
|
253
|
+
points.push({
|
|
254
|
+
x: bottom[0],
|
|
255
|
+
y: bottom[1],
|
|
256
|
+
z: bottom[2]
|
|
257
|
+
});
|
|
258
|
+
points.push({
|
|
259
|
+
x: left[0],
|
|
260
|
+
y: left[1],
|
|
261
|
+
z: left[2]
|
|
262
|
+
});
|
|
263
|
+
points.push({
|
|
264
|
+
x: right[0],
|
|
265
|
+
y: right[1],
|
|
266
|
+
z: right[2]
|
|
267
|
+
});
|
|
268
|
+
} else {
|
|
269
|
+
points.push({
|
|
270
|
+
x: left[0],
|
|
271
|
+
y: left[1],
|
|
272
|
+
z: left[2]
|
|
273
|
+
});
|
|
274
|
+
points.push({
|
|
275
|
+
x: right[0],
|
|
276
|
+
y: right[1],
|
|
277
|
+
z: right[2]
|
|
278
|
+
});
|
|
279
|
+
points.push({
|
|
280
|
+
x: top[0],
|
|
281
|
+
y: top[1],
|
|
282
|
+
z: top[2]
|
|
283
|
+
});
|
|
284
|
+
points.push({
|
|
285
|
+
x: bottom[0],
|
|
286
|
+
y: bottom[1],
|
|
287
|
+
z: bottom[2]
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
const cachedStatsKeys = Object.keys(cachedStats)[0];
|
|
291
|
+
const {
|
|
292
|
+
area
|
|
293
|
+
} = cachedStatsKeys ? cachedStats[cachedStatsKeys] : {};
|
|
294
|
+
return {
|
|
295
|
+
area,
|
|
296
|
+
points,
|
|
297
|
+
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
298
|
+
finding,
|
|
299
|
+
findingSites: findingSites || [],
|
|
300
|
+
ReferencedFrameOfReferenceUID: metadata.FrameOfReferenceUID,
|
|
301
|
+
use3DSpatialCoordinates: true
|
|
153
302
|
};
|
|
154
303
|
}
|
|
155
304
|
}
|
|
@@ -3,22 +3,24 @@ export default class KeyImage extends Probe {
|
|
|
3
3
|
static trackingSeriesIdentifier: string;
|
|
4
4
|
static trackingPointIdentifier: string;
|
|
5
5
|
static trackingSeriesPointIdentifier: string;
|
|
6
|
-
static getMeasurementData(measurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any, trackingIdentifier: any):
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
data: any;
|
|
18
|
-
};
|
|
6
|
+
static getMeasurementData(measurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any, trackingIdentifier: any): any;
|
|
7
|
+
static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
|
|
8
|
+
points: {
|
|
9
|
+
x: any;
|
|
10
|
+
y: any;
|
|
11
|
+
z: any;
|
|
12
|
+
}[];
|
|
13
|
+
trackingIdentifierTextValue: string;
|
|
14
|
+
ReferencedFrameOfReferenceUID: any;
|
|
15
|
+
findingSites: any;
|
|
19
16
|
finding: any;
|
|
20
|
-
|
|
17
|
+
use3DSpatialCoordinates: boolean;
|
|
18
|
+
} | {
|
|
19
|
+
points: any;
|
|
20
|
+
trackingIdentifierTextValue: string;
|
|
21
|
+
findingSites: any;
|
|
22
|
+
finding: any;
|
|
23
|
+
use3DSpatialCoordinates: boolean;
|
|
21
24
|
};
|
|
22
|
-
static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): import("./BaseAdapter3D").TID300Arguments;
|
|
23
25
|
}
|
|
24
26
|
export { KeyImage };
|
|
@@ -1,33 +1,65 @@
|
|
|
1
1
|
import BaseAdapter3D from "./BaseAdapter3D";
|
|
2
2
|
export default class Length extends BaseAdapter3D {
|
|
3
|
-
static
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
static getMeasurementDataFromScoord({ defaultState, NUMGroup, SCOORDGroup, ReferencedFrameNumber, imageToWorldCoords }: {
|
|
4
|
+
defaultState: any;
|
|
5
|
+
NUMGroup: any;
|
|
6
|
+
SCOORDGroup: any;
|
|
7
|
+
ReferencedFrameNumber: any;
|
|
8
|
+
imageToWorldCoords: any;
|
|
9
|
+
}): any;
|
|
10
|
+
static getMeasurementDataFromScoord3d({ defaultState, SCOORD3DGroup }: {
|
|
11
|
+
defaultState: any;
|
|
12
|
+
SCOORD3DGroup: any;
|
|
13
|
+
}): any;
|
|
14
|
+
static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any): any;
|
|
15
|
+
static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
|
|
16
|
+
point1: {
|
|
17
|
+
x: any;
|
|
18
|
+
y: any;
|
|
19
|
+
z: any;
|
|
20
|
+
};
|
|
21
|
+
point2: {
|
|
22
|
+
x: any;
|
|
23
|
+
y: any;
|
|
24
|
+
z: any;
|
|
25
|
+
};
|
|
26
|
+
distance: any;
|
|
27
|
+
trackingIdentifierTextValue: string;
|
|
28
|
+
finding: any;
|
|
29
|
+
findingSites: any;
|
|
30
|
+
ReferencedFrameOfReferenceUID: any;
|
|
31
|
+
use3DSpatialCoordinates: boolean;
|
|
32
|
+
} | {
|
|
33
|
+
point1: {
|
|
34
|
+
x: any;
|
|
35
|
+
y: any;
|
|
36
|
+
};
|
|
37
|
+
point2: {
|
|
38
|
+
x: any;
|
|
39
|
+
y: any;
|
|
15
40
|
};
|
|
41
|
+
distance: any;
|
|
42
|
+
trackingIdentifierTextValue: string;
|
|
16
43
|
finding: any;
|
|
17
|
-
findingSites: any
|
|
44
|
+
findingSites: any;
|
|
45
|
+
use3DSpatialCoordinates: boolean;
|
|
18
46
|
};
|
|
19
|
-
static
|
|
47
|
+
static getTID300RepresentationArgumentsSCOORD3D(tool: any): {
|
|
20
48
|
point1: {
|
|
21
49
|
x: any;
|
|
22
50
|
y: any;
|
|
51
|
+
z: any;
|
|
23
52
|
};
|
|
24
53
|
point2: {
|
|
25
54
|
x: any;
|
|
26
55
|
y: any;
|
|
56
|
+
z: any;
|
|
27
57
|
};
|
|
28
58
|
distance: any;
|
|
29
59
|
trackingIdentifierTextValue: string;
|
|
30
60
|
finding: any;
|
|
31
61
|
findingSites: any;
|
|
62
|
+
ReferencedFrameOfReferenceUID: any;
|
|
63
|
+
use3DSpatialCoordinates: boolean;
|
|
32
64
|
};
|
|
33
65
|
}
|
|
@@ -8,13 +8,14 @@ const {
|
|
|
8
8
|
} = utilities.TID300;
|
|
9
9
|
const LENGTH = "Length";
|
|
10
10
|
class Length extends BaseAdapter3D {
|
|
11
|
-
static
|
|
12
|
-
|
|
11
|
+
static getMeasurementDataFromScoord(_ref) {
|
|
12
|
+
let {
|
|
13
13
|
defaultState,
|
|
14
14
|
NUMGroup,
|
|
15
15
|
SCOORDGroup,
|
|
16
|
-
ReferencedFrameNumber
|
|
17
|
-
|
|
16
|
+
ReferencedFrameNumber,
|
|
17
|
+
imageToWorldCoords
|
|
18
|
+
} = _ref;
|
|
18
19
|
const referencedImageId = defaultState.annotation.metadata.referencedImageId;
|
|
19
20
|
const {
|
|
20
21
|
GraphicData
|
|
@@ -42,6 +43,53 @@ class Length extends BaseAdapter3D {
|
|
|
42
43
|
};
|
|
43
44
|
return state;
|
|
44
45
|
}
|
|
46
|
+
static getMeasurementDataFromScoord3d(_ref2) {
|
|
47
|
+
let {
|
|
48
|
+
defaultState,
|
|
49
|
+
SCOORD3DGroup
|
|
50
|
+
} = _ref2;
|
|
51
|
+
const {
|
|
52
|
+
GraphicData
|
|
53
|
+
} = SCOORD3DGroup;
|
|
54
|
+
const worldCoords = GraphicData;
|
|
55
|
+
const state = defaultState;
|
|
56
|
+
state.annotation.data = {
|
|
57
|
+
handles: {
|
|
58
|
+
points: [worldCoords.slice(0, 3), worldCoords.slice(3, 6)],
|
|
59
|
+
activeHandleIndex: 0,
|
|
60
|
+
textBox: {
|
|
61
|
+
hasMoved: false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
cachedStats: {}
|
|
65
|
+
};
|
|
66
|
+
return state;
|
|
67
|
+
}
|
|
68
|
+
static getMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, imageToWorldCoords, metadata) {
|
|
69
|
+
const {
|
|
70
|
+
defaultState,
|
|
71
|
+
NUMGroup,
|
|
72
|
+
SCOORDGroup,
|
|
73
|
+
SCOORD3DGroup,
|
|
74
|
+
ReferencedFrameNumber
|
|
75
|
+
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, this.toolType);
|
|
76
|
+
if (SCOORDGroup) {
|
|
77
|
+
return this.getMeasurementDataFromScoord({
|
|
78
|
+
defaultState,
|
|
79
|
+
NUMGroup,
|
|
80
|
+
SCOORDGroup,
|
|
81
|
+
ReferencedFrameNumber,
|
|
82
|
+
imageToWorldCoords
|
|
83
|
+
});
|
|
84
|
+
} else if (SCOORD3DGroup) {
|
|
85
|
+
return this.getMeasurementDataFromScoord3d({
|
|
86
|
+
defaultState,
|
|
87
|
+
SCOORD3DGroup
|
|
88
|
+
});
|
|
89
|
+
} else {
|
|
90
|
+
throw new Error("Can't get measurement data with missing SCOORD and SCOORD3D groups.");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
45
93
|
static getTID300RepresentationArguments(tool, worldToImageCoords) {
|
|
46
94
|
const {
|
|
47
95
|
data,
|
|
@@ -57,7 +105,7 @@ class Length extends BaseAdapter3D {
|
|
|
57
105
|
referencedImageId
|
|
58
106
|
} = metadata;
|
|
59
107
|
if (!referencedImageId) {
|
|
60
|
-
|
|
108
|
+
return this.getTID300RepresentationArgumentsSCOORD3D(tool);
|
|
61
109
|
}
|
|
62
110
|
const start = worldToImageCoords(referencedImageId, handles.points[0]);
|
|
63
111
|
const end = worldToImageCoords(referencedImageId, handles.points[1]);
|
|
@@ -78,7 +126,46 @@ class Length extends BaseAdapter3D {
|
|
|
78
126
|
distance,
|
|
79
127
|
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
80
128
|
finding,
|
|
81
|
-
findingSites: findingSites || []
|
|
129
|
+
findingSites: findingSites || [],
|
|
130
|
+
use3DSpatialCoordinates: false
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
static getTID300RepresentationArgumentsSCOORD3D(tool) {
|
|
134
|
+
const {
|
|
135
|
+
data,
|
|
136
|
+
finding,
|
|
137
|
+
findingSites,
|
|
138
|
+
metadata
|
|
139
|
+
} = tool;
|
|
140
|
+
const {
|
|
141
|
+
cachedStats = {},
|
|
142
|
+
handles
|
|
143
|
+
} = data;
|
|
144
|
+
const start = handles.points[0];
|
|
145
|
+
const end = handles.points[1];
|
|
146
|
+
const point1 = {
|
|
147
|
+
x: start[0],
|
|
148
|
+
y: start[1],
|
|
149
|
+
z: start[2]
|
|
150
|
+
};
|
|
151
|
+
const point2 = {
|
|
152
|
+
x: end[0],
|
|
153
|
+
y: end[1],
|
|
154
|
+
z: end[2]
|
|
155
|
+
};
|
|
156
|
+
const cachedStatsKeys = Object.keys(cachedStats)[0];
|
|
157
|
+
const {
|
|
158
|
+
length: distance
|
|
159
|
+
} = cachedStatsKeys ? cachedStats[cachedStatsKeys] : {};
|
|
160
|
+
return {
|
|
161
|
+
point1,
|
|
162
|
+
point2,
|
|
163
|
+
distance,
|
|
164
|
+
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
165
|
+
finding,
|
|
166
|
+
findingSites: findingSites || [],
|
|
167
|
+
ReferencedFrameOfReferenceUID: metadata.FrameOfReferenceUID,
|
|
168
|
+
use3DSpatialCoordinates: true
|
|
82
169
|
};
|
|
83
170
|
}
|
|
84
171
|
}
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
type SpatialCoordinatesState = {
|
|
2
|
+
description?: string;
|
|
3
|
+
sopInstanceUid?: string;
|
|
4
|
+
annotation: {
|
|
5
|
+
annotationUID: string;
|
|
6
|
+
metadata: {
|
|
7
|
+
toolName: string;
|
|
8
|
+
referencedImageId?: string;
|
|
9
|
+
FrameOfReferenceUID: string;
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
finding?: unknown;
|
|
14
|
+
findingSites?: unknown;
|
|
15
|
+
};
|
|
16
|
+
type SetupMeasurementData = {
|
|
17
|
+
defaultState: SpatialCoordinatesState;
|
|
18
|
+
NUMGroup: Record<string, unknown>;
|
|
19
|
+
SCOORDGroup?: Record<string, unknown>;
|
|
20
|
+
ReferencedSOPSequence?: Record<string, unknown>;
|
|
21
|
+
ReferencedSOPInstanceUID?: string;
|
|
22
|
+
ReferencedFrameNumber?: string;
|
|
23
|
+
SCOORD3DGroup?: Record<string, unknown>;
|
|
24
|
+
FrameOfReferenceUID?: string;
|
|
25
|
+
};
|
|
26
|
+
type SpatialCoordinatesData = Omit<SetupMeasurementData, "defaultState" | "NUMGroup"> & {
|
|
27
|
+
state: SpatialCoordinatesState;
|
|
28
|
+
};
|
|
1
29
|
export type AdapterOptions = {
|
|
2
30
|
parentType?: string;
|
|
3
31
|
replace?: boolean | ((original: MeasurementAdapter) => void);
|
|
@@ -43,32 +71,74 @@ export default class MeasurementReport {
|
|
|
43
71
|
_meta: any;
|
|
44
72
|
_vrMap: any;
|
|
45
73
|
};
|
|
46
|
-
static
|
|
74
|
+
static processSCOORDGroup({ SCOORDGroup, toolType, sopInstanceUIDToImageIdMap, metadata }: {
|
|
75
|
+
SCOORDGroup: any;
|
|
76
|
+
toolType: any;
|
|
77
|
+
sopInstanceUIDToImageIdMap: any;
|
|
78
|
+
metadata: any;
|
|
79
|
+
}): SpatialCoordinatesData;
|
|
80
|
+
static processSCOORD3DGroup({ SCOORD3DGroup, toolType }: {
|
|
81
|
+
SCOORD3DGroup: any;
|
|
82
|
+
toolType: any;
|
|
83
|
+
}): SpatialCoordinatesData;
|
|
84
|
+
static getSpatialCoordinatesState({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, toolType }: {
|
|
85
|
+
NUMGroup: any;
|
|
86
|
+
sopInstanceUIDToImageIdMap: any;
|
|
87
|
+
metadata: any;
|
|
88
|
+
toolType: any;
|
|
89
|
+
}): SpatialCoordinatesData;
|
|
90
|
+
static processSpatialCoordinatesGroup({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, findingGroup, findingSiteGroups, toolType }: {
|
|
91
|
+
NUMGroup: any;
|
|
92
|
+
sopInstanceUIDToImageIdMap: any;
|
|
93
|
+
metadata: any;
|
|
94
|
+
findingGroup: any;
|
|
95
|
+
findingSiteGroups: any;
|
|
96
|
+
toolType: any;
|
|
97
|
+
}): {
|
|
47
98
|
defaultState: {
|
|
48
|
-
|
|
49
|
-
|
|
99
|
+
finding: any;
|
|
100
|
+
findingSites: any;
|
|
101
|
+
description?: string;
|
|
102
|
+
sopInstanceUid?: string;
|
|
50
103
|
annotation: {
|
|
51
|
-
annotationUID:
|
|
104
|
+
annotationUID: string;
|
|
52
105
|
metadata: {
|
|
53
|
-
toolName:
|
|
54
|
-
referencedImageId
|
|
55
|
-
FrameOfReferenceUID:
|
|
106
|
+
toolName: string;
|
|
107
|
+
referencedImageId?: string;
|
|
108
|
+
FrameOfReferenceUID: string;
|
|
56
109
|
label: string;
|
|
57
110
|
};
|
|
58
|
-
data: any;
|
|
59
111
|
};
|
|
60
|
-
finding: any;
|
|
61
|
-
findingSites: any[];
|
|
62
112
|
};
|
|
63
113
|
NUMGroup: any;
|
|
64
|
-
SCOORDGroup:
|
|
65
|
-
ReferencedSOPSequence:
|
|
114
|
+
SCOORDGroup: Record<string, unknown>;
|
|
115
|
+
ReferencedSOPSequence: Record<string, unknown>;
|
|
116
|
+
ReferencedSOPInstanceUID: string;
|
|
117
|
+
ReferencedFrameNumber: string;
|
|
118
|
+
SCOORD3DGroup: Record<string, unknown>;
|
|
119
|
+
FrameOfReferenceUID: string;
|
|
120
|
+
};
|
|
121
|
+
static getSetupMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, metadata: any, toolType: any): SetupMeasurementData;
|
|
122
|
+
static generateReferencedSOPSequence({ toolData, toolTypes, metadataProvider, imageId, sopInstanceUIDsToSeriesInstanceUIDMap, derivationSourceDatasets }: {
|
|
123
|
+
toolData: any;
|
|
124
|
+
toolTypes: any;
|
|
125
|
+
metadataProvider: any;
|
|
126
|
+
imageId: any;
|
|
127
|
+
sopInstanceUIDsToSeriesInstanceUIDMap: any;
|
|
128
|
+
derivationSourceDatasets: any;
|
|
129
|
+
}): {
|
|
130
|
+
ReferencedSOPClassUID: any;
|
|
66
131
|
ReferencedSOPInstanceUID: any;
|
|
67
132
|
ReferencedFrameNumber: any;
|
|
68
133
|
};
|
|
134
|
+
static getImageIdFromVolume({ toolData, toolTypes }: {
|
|
135
|
+
toolData: any;
|
|
136
|
+
toolTypes: any;
|
|
137
|
+
}): string;
|
|
69
138
|
static generateReport(toolState: any, metadataProvider: any, worldToImageCoords: any, options: any): any;
|
|
70
139
|
static generateToolState(dataset: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any, hooks: any): {};
|
|
71
140
|
static registerTool(toolAdapter: MeasurementAdapter, replace?: boolean | ((original: any) => void)): void;
|
|
72
141
|
static registerTrackingIdentifier(toolClass: any, ...trackingIdentifiers: string[]): void;
|
|
73
142
|
static getAdapterForTrackingIdentifier(trackingIdentifier: string): MeasurementAdapter;
|
|
74
143
|
}
|
|
144
|
+
export {};
|