@cornerstonejs/adapters 3.14.4 → 3.15.1
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
|
@@ -1,42 +1,94 @@
|
|
|
1
1
|
import BaseAdapter3D from "./BaseAdapter3D";
|
|
2
2
|
declare class Angle extends BaseAdapter3D {
|
|
3
|
-
static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any):
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any): any;
|
|
4
|
+
static getMeasurementDataFromScoord({ defaultState, SCOORDGroup, imageToWorldCoords, NUMGroup, ReferencedFrameNumber }: {
|
|
5
|
+
defaultState: any;
|
|
6
|
+
SCOORDGroup: any;
|
|
7
|
+
imageToWorldCoords: any;
|
|
8
|
+
NUMGroup: any;
|
|
9
|
+
ReferencedFrameNumber: any;
|
|
10
|
+
}): any;
|
|
11
|
+
static getMeasurementDataFromScoord3D({ defaultState, SCOORD3DGroup }: {
|
|
12
|
+
defaultState: any;
|
|
13
|
+
SCOORD3DGroup: any;
|
|
14
|
+
}): 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
|
+
point3: {
|
|
27
|
+
x: any;
|
|
28
|
+
y: any;
|
|
29
|
+
z: any;
|
|
30
|
+
};
|
|
31
|
+
point4: {
|
|
32
|
+
x: any;
|
|
33
|
+
y: any;
|
|
34
|
+
z: any;
|
|
35
|
+
};
|
|
36
|
+
rAngle: any;
|
|
37
|
+
trackingIdentifierTextValue: string;
|
|
38
|
+
finding: any;
|
|
39
|
+
findingSites: any;
|
|
40
|
+
ReferencedFrameOfReferenceUID: any;
|
|
41
|
+
use3DSpatialCoordinates: boolean;
|
|
42
|
+
} | {
|
|
43
|
+
point1: {
|
|
44
|
+
x: any;
|
|
45
|
+
y: any;
|
|
46
|
+
};
|
|
47
|
+
point2: {
|
|
48
|
+
x: any;
|
|
49
|
+
y: any;
|
|
50
|
+
};
|
|
51
|
+
point3: {
|
|
52
|
+
x: any;
|
|
53
|
+
y: any;
|
|
54
|
+
};
|
|
55
|
+
point4: {
|
|
56
|
+
x: any;
|
|
57
|
+
y: any;
|
|
15
58
|
};
|
|
59
|
+
rAngle: any;
|
|
60
|
+
trackingIdentifierTextValue: string;
|
|
16
61
|
finding: any;
|
|
17
|
-
findingSites: any
|
|
62
|
+
findingSites: any;
|
|
63
|
+
use3DSpatialCoordinates: boolean;
|
|
18
64
|
};
|
|
19
|
-
static
|
|
65
|
+
static getTID300RepresentationArgumentsSCOORD3D(tool: any): {
|
|
20
66
|
point1: {
|
|
21
67
|
x: any;
|
|
22
68
|
y: any;
|
|
69
|
+
z: any;
|
|
23
70
|
};
|
|
24
71
|
point2: {
|
|
25
72
|
x: any;
|
|
26
73
|
y: any;
|
|
74
|
+
z: any;
|
|
27
75
|
};
|
|
28
76
|
point3: {
|
|
29
77
|
x: any;
|
|
30
78
|
y: any;
|
|
79
|
+
z: any;
|
|
31
80
|
};
|
|
32
81
|
point4: {
|
|
33
82
|
x: any;
|
|
34
83
|
y: any;
|
|
84
|
+
z: any;
|
|
35
85
|
};
|
|
36
86
|
rAngle: any;
|
|
37
87
|
trackingIdentifierTextValue: string;
|
|
38
88
|
finding: any;
|
|
39
89
|
findingSites: any;
|
|
90
|
+
ReferencedFrameOfReferenceUID: any;
|
|
91
|
+
use3DSpatialCoordinates: boolean;
|
|
40
92
|
};
|
|
41
93
|
}
|
|
42
94
|
export default Angle;
|
|
@@ -12,8 +12,34 @@ class Angle extends BaseAdapter3D {
|
|
|
12
12
|
defaultState,
|
|
13
13
|
NUMGroup,
|
|
14
14
|
SCOORDGroup,
|
|
15
|
+
SCOORD3DGroup,
|
|
15
16
|
ReferencedFrameNumber
|
|
16
17
|
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, Angle.toolType);
|
|
18
|
+
if (SCOORDGroup) {
|
|
19
|
+
return this.getMeasurementDataFromScoord({
|
|
20
|
+
defaultState,
|
|
21
|
+
SCOORDGroup,
|
|
22
|
+
imageToWorldCoords,
|
|
23
|
+
NUMGroup,
|
|
24
|
+
ReferencedFrameNumber
|
|
25
|
+
});
|
|
26
|
+
} else if (SCOORD3DGroup) {
|
|
27
|
+
return this.getMeasurementDataFromScoord3D({
|
|
28
|
+
defaultState,
|
|
29
|
+
SCOORD3DGroup
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
throw new Error("Can't get measurement data with missing SCOORD and SCOORD3D groups.");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
static getMeasurementDataFromScoord(_ref) {
|
|
36
|
+
let {
|
|
37
|
+
defaultState,
|
|
38
|
+
SCOORDGroup,
|
|
39
|
+
imageToWorldCoords,
|
|
40
|
+
NUMGroup,
|
|
41
|
+
ReferencedFrameNumber
|
|
42
|
+
} = _ref;
|
|
17
43
|
const referencedImageId = defaultState.annotation.metadata.referencedImageId;
|
|
18
44
|
const {
|
|
19
45
|
GraphicData
|
|
@@ -41,6 +67,32 @@ class Angle extends BaseAdapter3D {
|
|
|
41
67
|
};
|
|
42
68
|
return state;
|
|
43
69
|
}
|
|
70
|
+
static getMeasurementDataFromScoord3D(_ref2) {
|
|
71
|
+
let {
|
|
72
|
+
defaultState,
|
|
73
|
+
SCOORD3DGroup
|
|
74
|
+
} = _ref2;
|
|
75
|
+
const {
|
|
76
|
+
GraphicData
|
|
77
|
+
} = SCOORD3DGroup;
|
|
78
|
+
const worldCoords = [];
|
|
79
|
+
for (let i = 0; i < GraphicData.length; i += 3) {
|
|
80
|
+
const point = [GraphicData[i], GraphicData[i + 1], GraphicData[i + 2]];
|
|
81
|
+
worldCoords.push(point);
|
|
82
|
+
}
|
|
83
|
+
const state = defaultState;
|
|
84
|
+
state.annotation.data = {
|
|
85
|
+
handles: {
|
|
86
|
+
points: [worldCoords[0], worldCoords[1], worldCoords[3]],
|
|
87
|
+
activeHandleIndex: 0,
|
|
88
|
+
textBox: {
|
|
89
|
+
hasMoved: false
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
cachedStats: {}
|
|
93
|
+
};
|
|
94
|
+
return state;
|
|
95
|
+
}
|
|
44
96
|
static getTID300RepresentationArguments(tool, worldToImageCoords) {
|
|
45
97
|
const {
|
|
46
98
|
data,
|
|
@@ -56,7 +108,7 @@ class Angle extends BaseAdapter3D {
|
|
|
56
108
|
referencedImageId
|
|
57
109
|
} = metadata;
|
|
58
110
|
if (!referencedImageId) {
|
|
59
|
-
|
|
111
|
+
return this.getTID300RepresentationArgumentsSCOORD3D(tool);
|
|
60
112
|
}
|
|
61
113
|
const start1 = worldToImageCoords(referencedImageId, handles.points[0]);
|
|
62
114
|
const middle = worldToImageCoords(referencedImageId, handles.points[1]);
|
|
@@ -85,7 +137,55 @@ class Angle extends BaseAdapter3D {
|
|
|
85
137
|
rAngle: angle,
|
|
86
138
|
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
87
139
|
finding,
|
|
88
|
-
findingSites: findingSites || []
|
|
140
|
+
findingSites: findingSites || [],
|
|
141
|
+
use3DSpatialCoordinates: false
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
static getTID300RepresentationArgumentsSCOORD3D(tool) {
|
|
145
|
+
const {
|
|
146
|
+
data,
|
|
147
|
+
finding,
|
|
148
|
+
findingSites,
|
|
149
|
+
metadata
|
|
150
|
+
} = tool;
|
|
151
|
+
const {
|
|
152
|
+
cachedStats = {},
|
|
153
|
+
handles
|
|
154
|
+
} = data;
|
|
155
|
+
const start = handles.points[0];
|
|
156
|
+
const middle = handles.points[1];
|
|
157
|
+
const end = handles.points[2];
|
|
158
|
+
const point1 = {
|
|
159
|
+
x: start[0],
|
|
160
|
+
y: start[1],
|
|
161
|
+
z: start[2]
|
|
162
|
+
};
|
|
163
|
+
const point2 = {
|
|
164
|
+
x: middle[0],
|
|
165
|
+
y: middle[1],
|
|
166
|
+
z: middle[2]
|
|
167
|
+
};
|
|
168
|
+
const point3 = point2;
|
|
169
|
+
const point4 = {
|
|
170
|
+
x: end[0],
|
|
171
|
+
y: end[1],
|
|
172
|
+
z: end[2]
|
|
173
|
+
};
|
|
174
|
+
const cachedStatsKeys = Object.keys(cachedStats)[0];
|
|
175
|
+
const {
|
|
176
|
+
angle
|
|
177
|
+
} = cachedStatsKeys ? cachedStats[cachedStatsKeys] : {};
|
|
178
|
+
return {
|
|
179
|
+
point1,
|
|
180
|
+
point2,
|
|
181
|
+
point3,
|
|
182
|
+
point4,
|
|
183
|
+
rAngle: angle,
|
|
184
|
+
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
185
|
+
finding,
|
|
186
|
+
findingSites: findingSites || [],
|
|
187
|
+
ReferencedFrameOfReferenceUID: metadata.FrameOfReferenceUID,
|
|
188
|
+
use3DSpatialCoordinates: true
|
|
89
189
|
};
|
|
90
190
|
}
|
|
91
191
|
}
|
|
@@ -1,29 +1,41 @@
|
|
|
1
1
|
import BaseAdapter3D from "./BaseAdapter3D";
|
|
2
2
|
declare class ArrowAnnotate extends BaseAdapter3D {
|
|
3
|
-
static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any, _trackingIdentifier: any):
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any, _trackingIdentifier: any): any;
|
|
4
|
+
static getMeasurementDataFromScoord3D({ SCOORD3DGroup, defaultState, text }: {
|
|
5
|
+
SCOORD3DGroup: any;
|
|
6
|
+
defaultState: any;
|
|
7
|
+
text: any;
|
|
8
|
+
}): any;
|
|
9
|
+
static getMeasurementDataFromScoord({ SCOORDGroup, referencedImageId, metadata, imageToWorldCoords, defaultState, text, ReferencedFrameNumber }: {
|
|
10
|
+
SCOORDGroup: any;
|
|
11
|
+
referencedImageId: any;
|
|
12
|
+
metadata: any;
|
|
13
|
+
imageToWorldCoords: any;
|
|
14
|
+
defaultState: any;
|
|
15
|
+
text: any;
|
|
16
|
+
ReferencedFrameNumber: any;
|
|
17
|
+
}): any;
|
|
18
|
+
static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
|
|
19
|
+
points: {
|
|
20
|
+
x: any;
|
|
21
|
+
y: any;
|
|
22
|
+
}[];
|
|
23
|
+
trackingIdentifierTextValue: string;
|
|
24
|
+
findingSites: any;
|
|
16
25
|
finding: any;
|
|
17
|
-
|
|
26
|
+
use3DSpatialCoordinates: boolean;
|
|
18
27
|
};
|
|
19
|
-
static
|
|
28
|
+
static getTID300RepresentationArgumentsSCOORD3D(tool: any): {
|
|
20
29
|
points: {
|
|
21
30
|
x: any;
|
|
22
31
|
y: any;
|
|
32
|
+
z: any;
|
|
23
33
|
}[];
|
|
24
34
|
trackingIdentifierTextValue: string;
|
|
25
35
|
findingSites: any;
|
|
26
36
|
finding: any;
|
|
37
|
+
ReferencedFrameOfReferenceUID: any;
|
|
38
|
+
use3DSpatialCoordinates: boolean;
|
|
27
39
|
};
|
|
28
40
|
}
|
|
29
41
|
export default ArrowAnnotate;
|
|
@@ -15,10 +15,69 @@ class ArrowAnnotate extends BaseAdapter3D {
|
|
|
15
15
|
const {
|
|
16
16
|
defaultState,
|
|
17
17
|
SCOORDGroup,
|
|
18
|
+
SCOORD3DGroup,
|
|
18
19
|
ReferencedFrameNumber
|
|
19
20
|
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, ArrowAnnotate.toolType);
|
|
20
21
|
const referencedImageId = defaultState.annotation.metadata.referencedImageId;
|
|
21
22
|
const text = defaultState.annotation.metadata.label;
|
|
23
|
+
if (SCOORDGroup) {
|
|
24
|
+
return this.getMeasurementDataFromScoord({
|
|
25
|
+
SCOORDGroup,
|
|
26
|
+
referencedImageId,
|
|
27
|
+
metadata,
|
|
28
|
+
imageToWorldCoords,
|
|
29
|
+
defaultState,
|
|
30
|
+
text,
|
|
31
|
+
ReferencedFrameNumber
|
|
32
|
+
});
|
|
33
|
+
} else if (SCOORD3DGroup) {
|
|
34
|
+
return this.getMeasurementDataFromScoord3D({
|
|
35
|
+
SCOORD3DGroup,
|
|
36
|
+
defaultState,
|
|
37
|
+
text
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
throw new Error("Can't get measurement data with missing SCOORD and SCOORD3D groups.");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
static getMeasurementDataFromScoord3D(_ref) {
|
|
44
|
+
let {
|
|
45
|
+
SCOORD3DGroup,
|
|
46
|
+
defaultState,
|
|
47
|
+
text
|
|
48
|
+
} = _ref;
|
|
49
|
+
const {
|
|
50
|
+
GraphicData
|
|
51
|
+
} = SCOORD3DGroup;
|
|
52
|
+
const worldCoords = [];
|
|
53
|
+
for (let i = 0; i < GraphicData.length; i += 3) {
|
|
54
|
+
const point = [GraphicData[i], GraphicData[i + 1], GraphicData[i + 2]];
|
|
55
|
+
worldCoords.push(point);
|
|
56
|
+
}
|
|
57
|
+
const state = defaultState;
|
|
58
|
+
state.annotation.data = {
|
|
59
|
+
text,
|
|
60
|
+
handles: {
|
|
61
|
+
arrowFirst: true,
|
|
62
|
+
points: [worldCoords[0], worldCoords[1]],
|
|
63
|
+
activeHandleIndex: 0,
|
|
64
|
+
textBox: {
|
|
65
|
+
hasMoved: false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
return state;
|
|
70
|
+
}
|
|
71
|
+
static getMeasurementDataFromScoord(_ref2) {
|
|
72
|
+
let {
|
|
73
|
+
SCOORDGroup,
|
|
74
|
+
referencedImageId,
|
|
75
|
+
metadata,
|
|
76
|
+
imageToWorldCoords,
|
|
77
|
+
defaultState,
|
|
78
|
+
text,
|
|
79
|
+
ReferencedFrameNumber
|
|
80
|
+
} = _ref2;
|
|
22
81
|
const {
|
|
23
82
|
GraphicData
|
|
24
83
|
} = SCOORDGroup;
|
|
@@ -70,7 +129,7 @@ class ArrowAnnotate extends BaseAdapter3D {
|
|
|
70
129
|
referencedImageId
|
|
71
130
|
} = metadata;
|
|
72
131
|
if (!referencedImageId) {
|
|
73
|
-
|
|
132
|
+
return this.getTID300RepresentationArgumentsSCOORD3D(tool);
|
|
74
133
|
}
|
|
75
134
|
const {
|
|
76
135
|
points,
|
|
@@ -97,7 +156,57 @@ class ArrowAnnotate extends BaseAdapter3D {
|
|
|
97
156
|
}],
|
|
98
157
|
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
99
158
|
findingSites: findingSites || [],
|
|
159
|
+
finding,
|
|
160
|
+
use3DSpatialCoordinates: false
|
|
161
|
+
};
|
|
162
|
+
if (!finding || finding.CodeValue !== codeValues.CORNERSTONEFREETEXT) {
|
|
163
|
+
finding = {
|
|
164
|
+
CodeValue: codeValues.CORNERSTONEFREETEXT,
|
|
165
|
+
CodingSchemeDesignator: CodingScheme.CodingSchemeDesignator,
|
|
166
|
+
CodeMeaning: data.text
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
return TID300RepresentationArguments;
|
|
170
|
+
}
|
|
171
|
+
static getTID300RepresentationArgumentsSCOORD3D(tool) {
|
|
172
|
+
const {
|
|
173
|
+
data,
|
|
174
|
+
findingSites,
|
|
175
|
+
metadata
|
|
176
|
+
} = tool;
|
|
177
|
+
let {
|
|
100
178
|
finding
|
|
179
|
+
} = tool;
|
|
180
|
+
const {
|
|
181
|
+
points,
|
|
182
|
+
arrowFirst
|
|
183
|
+
} = data.handles;
|
|
184
|
+
let point;
|
|
185
|
+
let point2;
|
|
186
|
+
if (arrowFirst) {
|
|
187
|
+
point = points[0];
|
|
188
|
+
point2 = points[1];
|
|
189
|
+
} else {
|
|
190
|
+
point = points[1];
|
|
191
|
+
point2 = points[0];
|
|
192
|
+
}
|
|
193
|
+
const pointImage = point;
|
|
194
|
+
const pointImage2 = point2;
|
|
195
|
+
const TID300RepresentationArguments = {
|
|
196
|
+
points: [{
|
|
197
|
+
x: pointImage[0],
|
|
198
|
+
y: pointImage[1],
|
|
199
|
+
z: pointImage[2]
|
|
200
|
+
}, {
|
|
201
|
+
x: pointImage2[0],
|
|
202
|
+
y: pointImage2[1],
|
|
203
|
+
z: pointImage2[2]
|
|
204
|
+
}],
|
|
205
|
+
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
206
|
+
findingSites: findingSites || [],
|
|
207
|
+
finding,
|
|
208
|
+
ReferencedFrameOfReferenceUID: metadata.FrameOfReferenceUID,
|
|
209
|
+
use3DSpatialCoordinates: true
|
|
101
210
|
};
|
|
102
211
|
if (!finding || finding.CodeValue !== codeValues.CORNERSTONEFREETEXT) {
|
|
103
212
|
finding = {
|
|
@@ -24,20 +24,29 @@ export default class BaseAdapter3D {
|
|
|
24
24
|
static registerSubType(adapter: MeasurementAdapter, toolType: string, replace?: any): any;
|
|
25
25
|
static isValidCornerstoneTrackingIdentifier(trackingIdentifier: string): boolean;
|
|
26
26
|
static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, _imageToWorldCoords: any, metadata: any, trackingIdentifier?: string): {
|
|
27
|
-
description
|
|
28
|
-
sopInstanceUid
|
|
27
|
+
description?: string;
|
|
28
|
+
sopInstanceUid?: string;
|
|
29
29
|
annotation: {
|
|
30
|
-
annotationUID:
|
|
30
|
+
annotationUID: string;
|
|
31
31
|
metadata: {
|
|
32
|
-
toolName:
|
|
33
|
-
referencedImageId
|
|
34
|
-
FrameOfReferenceUID:
|
|
32
|
+
toolName: string;
|
|
33
|
+
referencedImageId?: string;
|
|
34
|
+
FrameOfReferenceUID: string;
|
|
35
35
|
label: string;
|
|
36
36
|
};
|
|
37
|
-
data: any;
|
|
38
37
|
};
|
|
39
|
-
finding
|
|
40
|
-
findingSites
|
|
38
|
+
finding?: unknown;
|
|
39
|
+
findingSites?: unknown;
|
|
41
40
|
};
|
|
42
41
|
static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): TID300Arguments;
|
|
42
|
+
static getTID300RepresentationArgumentsSCOORD3D(tool: any): {
|
|
43
|
+
points: {
|
|
44
|
+
x: any;
|
|
45
|
+
y: any;
|
|
46
|
+
z: any;
|
|
47
|
+
}[];
|
|
48
|
+
trackingIdentifierTextValue: string;
|
|
49
|
+
findingSites: any;
|
|
50
|
+
finding: any;
|
|
51
|
+
};
|
|
43
52
|
}
|
|
@@ -65,7 +65,7 @@ class BaseAdapter3D {
|
|
|
65
65
|
referencedImageId
|
|
66
66
|
} = metadata;
|
|
67
67
|
if (!referencedImageId) {
|
|
68
|
-
|
|
68
|
+
return this.getTID300RepresentationArgumentsSCOORD3D(tool);
|
|
69
69
|
}
|
|
70
70
|
const {
|
|
71
71
|
handles: {
|
|
@@ -87,6 +87,30 @@ class BaseAdapter3D {
|
|
|
87
87
|
};
|
|
88
88
|
return tidArguments;
|
|
89
89
|
}
|
|
90
|
+
static getTID300RepresentationArgumentsSCOORD3D(tool) {
|
|
91
|
+
const {
|
|
92
|
+
data,
|
|
93
|
+
finding,
|
|
94
|
+
findingSites
|
|
95
|
+
} = tool;
|
|
96
|
+
const {
|
|
97
|
+
handles: {
|
|
98
|
+
points = []
|
|
99
|
+
}
|
|
100
|
+
} = data;
|
|
101
|
+
const point = points[0];
|
|
102
|
+
const pointXYZ = {
|
|
103
|
+
x: point[0],
|
|
104
|
+
y: point[1],
|
|
105
|
+
z: point[2]
|
|
106
|
+
};
|
|
107
|
+
return {
|
|
108
|
+
points: [pointXYZ],
|
|
109
|
+
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
110
|
+
findingSites: findingSites || [],
|
|
111
|
+
finding
|
|
112
|
+
};
|
|
113
|
+
}
|
|
90
114
|
}
|
|
91
115
|
|
|
92
116
|
export { BaseAdapter3D as default };
|
|
@@ -1,40 +1,108 @@
|
|
|
1
1
|
import BaseAdapter3D from "./BaseAdapter3D";
|
|
2
2
|
declare class Bidirectional extends BaseAdapter3D {
|
|
3
|
-
static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any):
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any): any;
|
|
4
|
+
static getMeasurementDataFromScoord({ longAxisNUMGroup, shortAxisNUMGroup, longAxisSCOORDGroup, shortAxisSCOORDGroup, referencedImageId, imageToWorldCoords, ReferencedFrameNumber, defaultState }: {
|
|
5
|
+
longAxisNUMGroup: any;
|
|
6
|
+
shortAxisNUMGroup: any;
|
|
7
|
+
longAxisSCOORDGroup: any;
|
|
8
|
+
shortAxisSCOORDGroup: any;
|
|
9
|
+
referencedImageId: any;
|
|
10
|
+
imageToWorldCoords: any;
|
|
11
|
+
ReferencedFrameNumber: any;
|
|
12
|
+
defaultState: any;
|
|
13
|
+
}): any;
|
|
14
|
+
static getMeasurementDataFromScoord3d({ longAxisNUMGroup, shortAxisNUMGroup, defaultState }: {
|
|
15
|
+
longAxisNUMGroup: any;
|
|
16
|
+
shortAxisNUMGroup: any;
|
|
17
|
+
defaultState: any;
|
|
18
|
+
}): any;
|
|
19
|
+
static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
|
|
20
|
+
longAxis: {
|
|
21
|
+
point1: {
|
|
22
|
+
x: any;
|
|
23
|
+
y: any;
|
|
24
|
+
z: any;
|
|
25
|
+
};
|
|
26
|
+
point2: {
|
|
27
|
+
x: any;
|
|
28
|
+
y: any;
|
|
29
|
+
z: any;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
shortAxis: {
|
|
33
|
+
point1: {
|
|
34
|
+
x: any;
|
|
35
|
+
y: any;
|
|
36
|
+
z: any;
|
|
37
|
+
};
|
|
38
|
+
point2: {
|
|
39
|
+
x: any;
|
|
40
|
+
y: any;
|
|
41
|
+
z: any;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
longAxisLength: any;
|
|
45
|
+
shortAxisLength: any;
|
|
46
|
+
trackingIdentifierTextValue: string;
|
|
47
|
+
finding: any;
|
|
48
|
+
findingSites: any;
|
|
49
|
+
ReferencedFrameOfReferenceUID: any;
|
|
50
|
+
use3DSpatialCoordinates: boolean;
|
|
51
|
+
} | {
|
|
52
|
+
longAxis: {
|
|
53
|
+
point1: {
|
|
54
|
+
x: any;
|
|
55
|
+
y: any;
|
|
56
|
+
};
|
|
57
|
+
point2: {
|
|
58
|
+
x: any;
|
|
59
|
+
y: any;
|
|
60
|
+
};
|
|
15
61
|
};
|
|
62
|
+
shortAxis: {
|
|
63
|
+
point1: {
|
|
64
|
+
x: any;
|
|
65
|
+
y: any;
|
|
66
|
+
};
|
|
67
|
+
point2: {
|
|
68
|
+
x: any;
|
|
69
|
+
y: any;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
longAxisLength: any;
|
|
73
|
+
shortAxisLength: any;
|
|
74
|
+
trackingIdentifierTextValue: string;
|
|
16
75
|
finding: any;
|
|
17
|
-
findingSites: any
|
|
76
|
+
findingSites: any;
|
|
77
|
+
use3DSpatialCoordinates: boolean;
|
|
18
78
|
};
|
|
19
|
-
static
|
|
79
|
+
static getTID300RepresentationArgumentsSCOORD3D({ tool, shortAxisPoints, longAxisPoints }: {
|
|
80
|
+
tool: any;
|
|
81
|
+
shortAxisPoints: any;
|
|
82
|
+
longAxisPoints: any;
|
|
83
|
+
}): {
|
|
20
84
|
longAxis: {
|
|
21
85
|
point1: {
|
|
22
86
|
x: any;
|
|
23
87
|
y: any;
|
|
88
|
+
z: any;
|
|
24
89
|
};
|
|
25
90
|
point2: {
|
|
26
91
|
x: any;
|
|
27
92
|
y: any;
|
|
93
|
+
z: any;
|
|
28
94
|
};
|
|
29
95
|
};
|
|
30
96
|
shortAxis: {
|
|
31
97
|
point1: {
|
|
32
98
|
x: any;
|
|
33
99
|
y: any;
|
|
100
|
+
z: any;
|
|
34
101
|
};
|
|
35
102
|
point2: {
|
|
36
103
|
x: any;
|
|
37
104
|
y: any;
|
|
105
|
+
z: any;
|
|
38
106
|
};
|
|
39
107
|
};
|
|
40
108
|
longAxisLength: any;
|
|
@@ -42,6 +110,8 @@ declare class Bidirectional extends BaseAdapter3D {
|
|
|
42
110
|
trackingIdentifierTextValue: string;
|
|
43
111
|
finding: any;
|
|
44
112
|
findingSites: any;
|
|
113
|
+
ReferencedFrameOfReferenceUID: any;
|
|
114
|
+
use3DSpatialCoordinates: boolean;
|
|
45
115
|
};
|
|
46
116
|
}
|
|
47
117
|
export default Bidirectional;
|