dwv 0.33.1 → 0.34.0-beta.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/dist/dwv.d.ts +484 -165
- package/dist/dwv.min.js +1 -1
- package/dist/dwv.min.js.map +1 -1
- package/package.json +18 -15
package/dist/dwv.d.ts
CHANGED
|
@@ -12,6 +12,236 @@ export declare function addTagsToDictionary(group: string, tags: {
|
|
|
12
12
|
[x: string]: string[];
|
|
13
13
|
}): void;
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Image annotation.
|
|
17
|
+
*/
|
|
18
|
+
export declare class Annotation {
|
|
19
|
+
/**
|
|
20
|
+
* The ID.
|
|
21
|
+
*
|
|
22
|
+
* 'Tracking Unique Identifier', 112040, DCM.
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* The reference image SOP UID.
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
*/
|
|
32
|
+
referenceSopUID: string;
|
|
33
|
+
/**
|
|
34
|
+
* The position: an Index converted to string.
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
*/
|
|
38
|
+
position: string;
|
|
39
|
+
/**
|
|
40
|
+
* The mathematical shape.
|
|
41
|
+
*
|
|
42
|
+
* @type {object}
|
|
43
|
+
*/
|
|
44
|
+
mathShape: object;
|
|
45
|
+
/**
|
|
46
|
+
* The color: for example 'green', '#00ff00' or 'rgb(0,255,0)'.
|
|
47
|
+
*
|
|
48
|
+
* 'RGB R Component', 110834, DCM...
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
*/
|
|
52
|
+
colour: string;
|
|
53
|
+
/**
|
|
54
|
+
* Annotation quantification.
|
|
55
|
+
*
|
|
56
|
+
* @type {object}
|
|
57
|
+
*/
|
|
58
|
+
quantification: object;
|
|
59
|
+
/**
|
|
60
|
+
* Text expression. Can contain variables surrounded with '{}' that will
|
|
61
|
+
* be extracted from the quantification object.
|
|
62
|
+
*
|
|
63
|
+
* 'Short label', 125309, DCM.
|
|
64
|
+
*
|
|
65
|
+
* @type {string}
|
|
66
|
+
*/
|
|
67
|
+
textExpr: string;
|
|
68
|
+
/**
|
|
69
|
+
* Set the associated view controller.
|
|
70
|
+
*
|
|
71
|
+
* @param {ViewController} viewController The associated view controller.
|
|
72
|
+
*/
|
|
73
|
+
setViewController(viewController: ViewController): void;
|
|
74
|
+
/**
|
|
75
|
+
* Get the image origin for a image UID.
|
|
76
|
+
*
|
|
77
|
+
* @returns {Index|undefined} The origin index.
|
|
78
|
+
*/
|
|
79
|
+
getOriginIndex(): Index | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Set the annotation text expression.
|
|
82
|
+
*
|
|
83
|
+
* @param {Object.<string, string>} labelText The list of label
|
|
84
|
+
* texts indexed by modality.
|
|
85
|
+
*/
|
|
86
|
+
setTextExpr(labelText: {
|
|
87
|
+
[x: string]: string;
|
|
88
|
+
}): void;
|
|
89
|
+
/**
|
|
90
|
+
* Get the annotation label text by applying the
|
|
91
|
+
* text expression on the current quantification.
|
|
92
|
+
*
|
|
93
|
+
* @returns {string} The resulting text.
|
|
94
|
+
*/
|
|
95
|
+
getText(): string;
|
|
96
|
+
/**
|
|
97
|
+
* Update the annotation quantification.
|
|
98
|
+
*/
|
|
99
|
+
updateQuantification(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Get the math shape associated factory.
|
|
102
|
+
*
|
|
103
|
+
* @returns {object} The factory.
|
|
104
|
+
*/
|
|
105
|
+
getFactory(): object;
|
|
106
|
+
#private;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* {@link Annotation} factory.
|
|
111
|
+
*/
|
|
112
|
+
export declare class AnnotationFactory {
|
|
113
|
+
/**
|
|
114
|
+
* Get a warning string if elements are not as expected.
|
|
115
|
+
* Created by checkElements.
|
|
116
|
+
*
|
|
117
|
+
* @returns {string|undefined} The warning.
|
|
118
|
+
*/
|
|
119
|
+
getWarning(): string | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Check dicom elements. Throws an error if not suitable.
|
|
122
|
+
*
|
|
123
|
+
* @param {Object<string, DataElement>} dataElements The DICOM data elements.
|
|
124
|
+
* @returns {string|undefined} A possible warning.
|
|
125
|
+
*/
|
|
126
|
+
checkElements(dataElements: {
|
|
127
|
+
[x: string]: DataElement;
|
|
128
|
+
}): string | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Get an {@link Annotation} object from the read DICOM file.
|
|
131
|
+
*
|
|
132
|
+
* @param {Object<string, DataElement>} dataElements The DICOM tags.
|
|
133
|
+
* @returns {AnnotationGroup} A new annotation group.
|
|
134
|
+
*/
|
|
135
|
+
create(dataElements: {
|
|
136
|
+
[x: string]: DataElement;
|
|
137
|
+
}): AnnotationGroup;
|
|
138
|
+
/**
|
|
139
|
+
* Convert an annotation group into a DICOM SR object.
|
|
140
|
+
*
|
|
141
|
+
* @param {AnnotationGroup} annotationGroup The annotation group.
|
|
142
|
+
* @param {Object<string, any>} [extraTags] Optional list of extra tags.
|
|
143
|
+
* @returns {Object<string, DataElement>} A list of dicom elements.
|
|
144
|
+
*/
|
|
145
|
+
toDicom(annotationGroup: AnnotationGroup, extraTags?: {
|
|
146
|
+
[x: string]: any;
|
|
147
|
+
}): {
|
|
148
|
+
[x: string]: DataElement;
|
|
149
|
+
};
|
|
150
|
+
#private;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Annotation group.
|
|
155
|
+
*/
|
|
156
|
+
export declare class AnnotationGroup {
|
|
157
|
+
/**
|
|
158
|
+
* @param {Annotation[]} [list] Optional list, will
|
|
159
|
+
* create new if not provided.
|
|
160
|
+
*/
|
|
161
|
+
constructor(list?: Annotation[]);
|
|
162
|
+
/**
|
|
163
|
+
* Get the annotation group as an array.
|
|
164
|
+
*
|
|
165
|
+
* @returns {Annotation[]} The array.
|
|
166
|
+
*/
|
|
167
|
+
getList(): Annotation[];
|
|
168
|
+
/**
|
|
169
|
+
* Get the number of annotations of this list.
|
|
170
|
+
*
|
|
171
|
+
* @returns {number} The number of annotations.
|
|
172
|
+
*/
|
|
173
|
+
getLength(): number;
|
|
174
|
+
/**
|
|
175
|
+
* Add a new annotation.
|
|
176
|
+
*
|
|
177
|
+
* @param {Annotation} annotation The annotation to add.
|
|
178
|
+
*/
|
|
179
|
+
add(annotation: Annotation): void;
|
|
180
|
+
/**
|
|
181
|
+
* Update an existing annotation.
|
|
182
|
+
*
|
|
183
|
+
* @param {Annotation} annotation The annotation to update.
|
|
184
|
+
*/
|
|
185
|
+
update(annotation: Annotation): void;
|
|
186
|
+
/**
|
|
187
|
+
* Remove an annotation.
|
|
188
|
+
*
|
|
189
|
+
* @param {string} id The id of the annotation to remove.
|
|
190
|
+
*/
|
|
191
|
+
remove(id: string): void;
|
|
192
|
+
/**
|
|
193
|
+
* Set the associated view controller.
|
|
194
|
+
*
|
|
195
|
+
* @param {ViewController} viewController The associated view controller.
|
|
196
|
+
*/
|
|
197
|
+
setViewController(viewController: ViewController): void;
|
|
198
|
+
/**
|
|
199
|
+
* Find an annotation.
|
|
200
|
+
*
|
|
201
|
+
* @param {string} id The id of the annotation to find.
|
|
202
|
+
* @returns {Annotation|undefined} The found annotation.
|
|
203
|
+
*/
|
|
204
|
+
find(id: string): Annotation | undefined;
|
|
205
|
+
/**
|
|
206
|
+
* Check if this list contains a meta data value.
|
|
207
|
+
*
|
|
208
|
+
* @param {string} key The key to check.
|
|
209
|
+
* @returns {boolean} True if the meta data is present.
|
|
210
|
+
*/
|
|
211
|
+
hasMeta(key: string): boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Get a meta data value.
|
|
214
|
+
*
|
|
215
|
+
* @param {string} key The meta data key.
|
|
216
|
+
* @returns {string} The meta data value.
|
|
217
|
+
*/
|
|
218
|
+
getMeta(key: string): string;
|
|
219
|
+
/**
|
|
220
|
+
* Set a meta data.
|
|
221
|
+
*
|
|
222
|
+
* @param {string} key The meta data key.
|
|
223
|
+
* @param {string} value The value of the meta data.
|
|
224
|
+
*/
|
|
225
|
+
setMeta(key: string, value: string): void;
|
|
226
|
+
/**
|
|
227
|
+
* Add an event listener to this class.
|
|
228
|
+
*
|
|
229
|
+
* @param {string} type The event type.
|
|
230
|
+
* @param {Function} callback The function associated with the provided
|
|
231
|
+
* event type, will be called with the fired event.
|
|
232
|
+
*/
|
|
233
|
+
addEventListener(type: string, callback: Function): void;
|
|
234
|
+
/**
|
|
235
|
+
* Remove an event listener from this class.
|
|
236
|
+
*
|
|
237
|
+
* @param {string} type The event type.
|
|
238
|
+
* @param {Function} callback The function associated with the provided
|
|
239
|
+
* event type.
|
|
240
|
+
*/
|
|
241
|
+
removeEventListener(type: string, callback: Function): void;
|
|
242
|
+
#private;
|
|
243
|
+
}
|
|
244
|
+
|
|
15
245
|
/**
|
|
16
246
|
* List of ViewConfigs indexed by dataIds.
|
|
17
247
|
*
|
|
@@ -35,12 +265,12 @@ export declare function addTagsToDictionary(group: string, tags: {
|
|
|
35
265
|
*/
|
|
36
266
|
export declare class App {
|
|
37
267
|
/**
|
|
38
|
-
* Get
|
|
268
|
+
* Get a DicomData.
|
|
39
269
|
*
|
|
40
270
|
* @param {string} dataId The data id.
|
|
41
|
-
* @returns {
|
|
271
|
+
* @returns {DicomData|undefined} The data.
|
|
42
272
|
*/
|
|
43
|
-
|
|
273
|
+
getData(dataId: string): DicomData | undefined;
|
|
44
274
|
/**
|
|
45
275
|
* Set the image at the given id.
|
|
46
276
|
*
|
|
@@ -49,15 +279,12 @@ export declare class App {
|
|
|
49
279
|
*/
|
|
50
280
|
setImage(dataId: string, img: Image_2): void;
|
|
51
281
|
/**
|
|
52
|
-
* Add a new
|
|
282
|
+
* Add a new DicomData.
|
|
53
283
|
*
|
|
54
|
-
* @param {
|
|
55
|
-
* @
|
|
56
|
-
* @param {string} source The source of the new image,
|
|
57
|
-
* will be passed with load events.
|
|
58
|
-
* @returns {string} The new image data id.
|
|
284
|
+
* @param {DicomData} data The new data.
|
|
285
|
+
* @returns {string} The data id.
|
|
59
286
|
*/
|
|
60
|
-
|
|
287
|
+
addData(data: DicomData): string;
|
|
61
288
|
/**
|
|
62
289
|
* Get the meta data.
|
|
63
290
|
*
|
|
@@ -412,19 +639,22 @@ export declare class App {
|
|
|
412
639
|
/**
|
|
413
640
|
* Set the drawings of the active layer group.
|
|
414
641
|
*
|
|
415
|
-
* @
|
|
416
|
-
* @param {Array}
|
|
642
|
+
* @deprecated
|
|
643
|
+
* @param {Array} _drawings An array of drawings.
|
|
644
|
+
* @param {Array} _drawingsDetails An array of drawings details.
|
|
417
645
|
*/
|
|
418
|
-
setDrawings(
|
|
646
|
+
setDrawings(_drawings: any[], _drawingsDetails: any[]): void;
|
|
419
647
|
/**
|
|
420
648
|
* Get the JSON state of the app.
|
|
421
649
|
*
|
|
650
|
+
* @deprecated
|
|
422
651
|
* @returns {string} The state of the app as a JSON string.
|
|
423
652
|
*/
|
|
424
653
|
getJsonState(): string;
|
|
425
654
|
/**
|
|
426
655
|
* Apply a JSON state to this app.
|
|
427
656
|
*
|
|
657
|
+
* @deprecated
|
|
428
658
|
* @param {string} jsonState The state of the app as a JSON string.
|
|
429
659
|
*/
|
|
430
660
|
applyJsonState(jsonState: string): void;
|
|
@@ -532,6 +762,13 @@ export declare class App {
|
|
|
532
762
|
* @param {string} dataId The data id.
|
|
533
763
|
*/
|
|
534
764
|
toggleOverlayListeners(dataId: string): void;
|
|
765
|
+
/**
|
|
766
|
+
* Add a draw layer.
|
|
767
|
+
*
|
|
768
|
+
* @param {string} dataId The data id.
|
|
769
|
+
* @param {ViewConfig} viewConfig The data view config.
|
|
770
|
+
*/
|
|
771
|
+
addDrawLayer(dataId: string, viewConfig: ViewConfig): void;
|
|
535
772
|
#private;
|
|
536
773
|
}
|
|
537
774
|
|
|
@@ -734,10 +971,10 @@ export declare namespace customUI {
|
|
|
734
971
|
/**
|
|
735
972
|
* Open a dialogue to edit roi data. Defaults to window.prompt.
|
|
736
973
|
*
|
|
737
|
-
* @param {
|
|
974
|
+
* @param {Annotation} annotation The roi data.
|
|
738
975
|
* @param {Function} callback The callback to launch on dialogue exit.
|
|
739
976
|
*/
|
|
740
|
-
export function openRoiDialog(
|
|
977
|
+
export function openRoiDialog(annotation: Annotation, callback: Function): void;
|
|
741
978
|
}
|
|
742
979
|
|
|
743
980
|
/**
|
|
@@ -880,6 +1117,7 @@ export declare class DeleteSegmentCommand {
|
|
|
880
1117
|
* DICOM code: item of a basic code sequence.
|
|
881
1118
|
*
|
|
882
1119
|
* Ref: {@link https://dicom.nema.org/medical/dicom/2022a/output/chtml/part03/sect_8.8.html}.
|
|
1120
|
+
* List: {@link https://dicom.nema.org/medical/dicom/2022a/output/chtml/part16/chapter_d.html}.
|
|
883
1121
|
*/
|
|
884
1122
|
export declare class DicomCode {
|
|
885
1123
|
/**
|
|
@@ -887,35 +1125,69 @@ export declare class DicomCode {
|
|
|
887
1125
|
*/
|
|
888
1126
|
constructor(meaning: string);
|
|
889
1127
|
/**
|
|
890
|
-
* Code meaning
|
|
1128
|
+
* Code meaning.
|
|
891
1129
|
*
|
|
892
1130
|
* @type {string}
|
|
893
1131
|
*/
|
|
894
1132
|
meaning: string;
|
|
895
1133
|
/**
|
|
896
|
-
* Code value
|
|
1134
|
+
* Code value.
|
|
897
1135
|
*
|
|
898
1136
|
* @type {string|undefined}
|
|
899
1137
|
*/
|
|
900
1138
|
value: string | undefined;
|
|
901
1139
|
/**
|
|
902
|
-
* Long code value
|
|
1140
|
+
* Long code value.
|
|
903
1141
|
*
|
|
904
1142
|
* @type {string|undefined}
|
|
905
1143
|
*/
|
|
906
1144
|
longValue: string | undefined;
|
|
907
1145
|
/**
|
|
908
|
-
* URN code value
|
|
1146
|
+
* URN code value.
|
|
909
1147
|
*
|
|
910
1148
|
* @type {string|undefined}
|
|
911
1149
|
*/
|
|
912
1150
|
urnValue: string | undefined;
|
|
913
1151
|
/**
|
|
914
|
-
* Coding scheme designator
|
|
1152
|
+
* Coding scheme designator.
|
|
915
1153
|
*
|
|
916
1154
|
* @type {string|undefined}
|
|
917
1155
|
*/
|
|
918
1156
|
schemeDesignator: string | undefined;
|
|
1157
|
+
/**
|
|
1158
|
+
* Get a string representation of this object.
|
|
1159
|
+
*
|
|
1160
|
+
* @returns {string} The code as string.
|
|
1161
|
+
*/
|
|
1162
|
+
toString(): string;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* DICOM data: meta and possible image.
|
|
1167
|
+
*/
|
|
1168
|
+
export declare class DicomData {
|
|
1169
|
+
/**
|
|
1170
|
+
* @param {object} meta The DICOM meta data.
|
|
1171
|
+
*/
|
|
1172
|
+
constructor(meta: object);
|
|
1173
|
+
/**
|
|
1174
|
+
* DICOM meta data.
|
|
1175
|
+
*
|
|
1176
|
+
* @type {object}
|
|
1177
|
+
*/
|
|
1178
|
+
meta: object;
|
|
1179
|
+
/**
|
|
1180
|
+
* Image extracted from meta data.
|
|
1181
|
+
*
|
|
1182
|
+
* @type {Image|undefined}
|
|
1183
|
+
*/
|
|
1184
|
+
image: Image_2 | undefined;
|
|
1185
|
+
/**
|
|
1186
|
+
* Annotattion group extracted from meta data.
|
|
1187
|
+
*
|
|
1188
|
+
* @type {AnnotationGroup|undefined}
|
|
1189
|
+
*/
|
|
1190
|
+
annotationGroup: AnnotationGroup | undefined;
|
|
919
1191
|
}
|
|
920
1192
|
|
|
921
1193
|
/**
|
|
@@ -981,6 +1253,55 @@ export declare class DicomParser {
|
|
|
981
1253
|
#private;
|
|
982
1254
|
}
|
|
983
1255
|
|
|
1256
|
+
/**
|
|
1257
|
+
* DICOM SR content: item of a SR content sequence.
|
|
1258
|
+
*
|
|
1259
|
+
* Ref: {@link https://dicom.nema.org/medical/dicom/2022a/output/chtml/part03/sect_C.17.3.html}.
|
|
1260
|
+
*/
|
|
1261
|
+
export declare class DicomSRContent {
|
|
1262
|
+
/**
|
|
1263
|
+
* @param {string} valueType The content item value type.
|
|
1264
|
+
*/
|
|
1265
|
+
constructor(valueType: string);
|
|
1266
|
+
/**
|
|
1267
|
+
* Value type.
|
|
1268
|
+
*
|
|
1269
|
+
* @type {string}
|
|
1270
|
+
*/
|
|
1271
|
+
valueType: string;
|
|
1272
|
+
/**
|
|
1273
|
+
* Concept name code.
|
|
1274
|
+
*
|
|
1275
|
+
* @type {DicomCode|undefined}
|
|
1276
|
+
*/
|
|
1277
|
+
conceptNameCode: DicomCode | undefined;
|
|
1278
|
+
/**
|
|
1279
|
+
* Relationship Type.
|
|
1280
|
+
*
|
|
1281
|
+
* @type {string}
|
|
1282
|
+
*/
|
|
1283
|
+
relationshipType: string;
|
|
1284
|
+
/**
|
|
1285
|
+
* Content sequence (0040,A730).
|
|
1286
|
+
*
|
|
1287
|
+
* @type {DicomSRContent[]|undefined}
|
|
1288
|
+
*/
|
|
1289
|
+
contentSequence: DicomSRContent[] | undefined;
|
|
1290
|
+
/**
|
|
1291
|
+
* Value.
|
|
1292
|
+
*
|
|
1293
|
+
* @type {object}
|
|
1294
|
+
*/
|
|
1295
|
+
value: object;
|
|
1296
|
+
/**
|
|
1297
|
+
* Get a string representation of this object.
|
|
1298
|
+
*
|
|
1299
|
+
* @param {string} [prefix] An optional prefix for recursive content.
|
|
1300
|
+
* @returns {string} The object as string.
|
|
1301
|
+
*/
|
|
1302
|
+
toString(prefix?: string): string;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
984
1305
|
/**
|
|
985
1306
|
* DICOM writer.
|
|
986
1307
|
*
|
|
@@ -1070,135 +1391,70 @@ export declare class DicomWriter {
|
|
|
1070
1391
|
*/
|
|
1071
1392
|
export declare class DrawController {
|
|
1072
1393
|
/**
|
|
1073
|
-
* @param {
|
|
1394
|
+
* @param {AnnotationGroup} [group] Optional annotation group.
|
|
1074
1395
|
*/
|
|
1075
|
-
constructor(
|
|
1396
|
+
constructor(group?: AnnotationGroup);
|
|
1076
1397
|
/**
|
|
1077
|
-
* Get
|
|
1398
|
+
* Get an annotation.
|
|
1078
1399
|
*
|
|
1079
|
-
* @
|
|
1080
|
-
|
|
1081
|
-
getCurrentPosGroup(): Konva.Group | undefined;
|
|
1082
|
-
/**
|
|
1083
|
-
* Reset: clear the layers array.
|
|
1400
|
+
* @param {string} id The annotation id.
|
|
1401
|
+
* @returns {Annotation|undefined} The annotation.
|
|
1084
1402
|
*/
|
|
1085
|
-
|
|
1403
|
+
getAnnotation(id: string): Annotation | undefined;
|
|
1086
1404
|
/**
|
|
1087
|
-
* Get
|
|
1405
|
+
* Get the annotation group.
|
|
1088
1406
|
*
|
|
1089
|
-
* @
|
|
1090
|
-
* @returns {object|undefined} The Konva group.
|
|
1407
|
+
* @returns {AnnotationGroup} The list.
|
|
1091
1408
|
*/
|
|
1092
|
-
|
|
1409
|
+
getAnnotationGroup(): AnnotationGroup;
|
|
1093
1410
|
/**
|
|
1094
|
-
*
|
|
1411
|
+
* Add an annotation.
|
|
1095
1412
|
*
|
|
1096
|
-
* @param {
|
|
1097
|
-
* @param {number} scrollIndex The scroll index.
|
|
1413
|
+
* @param {Annotation} annotation The annotation to add.
|
|
1098
1414
|
*/
|
|
1099
|
-
|
|
1415
|
+
addAnnotation(annotation: Annotation): void;
|
|
1100
1416
|
/**
|
|
1101
|
-
*
|
|
1417
|
+
* Update an anotation from the list.
|
|
1102
1418
|
*
|
|
1103
|
-
* @
|
|
1419
|
+
* @param {Annotation} annotation The annotation to update.
|
|
1104
1420
|
*/
|
|
1105
|
-
|
|
1421
|
+
updateAnnotation(annotation: Annotation): void;
|
|
1106
1422
|
/**
|
|
1107
|
-
*
|
|
1423
|
+
* Remove an anotation for the list.
|
|
1108
1424
|
*
|
|
1109
|
-
* @
|
|
1110
|
-
* TODO Unify with getDrawDisplayDetails?
|
|
1425
|
+
* @param {string} id The id of the annotation to remove.
|
|
1111
1426
|
*/
|
|
1112
|
-
|
|
1427
|
+
removeAnnotation(id: string): void;
|
|
1113
1428
|
/**
|
|
1114
|
-
*
|
|
1429
|
+
* Check if the annotation group contains a meta data value.
|
|
1115
1430
|
*
|
|
1116
|
-
* @param {
|
|
1117
|
-
* @
|
|
1118
|
-
* @param {object} cmdCallback The DrawCommand callback.
|
|
1119
|
-
* @param {object} exeCallback The callback to call once the
|
|
1120
|
-
* DrawCommand has been executed.
|
|
1431
|
+
* @param {string} key The key to check.
|
|
1432
|
+
* @returns {boolean} True if the meta data is present.
|
|
1121
1433
|
*/
|
|
1122
|
-
|
|
1434
|
+
hasAnnotationMeta(key: string): boolean;
|
|
1123
1435
|
/**
|
|
1124
|
-
*
|
|
1436
|
+
* Set an annotation meta data.
|
|
1125
1437
|
*
|
|
1126
|
-
* @param {
|
|
1438
|
+
* @param {string} key The meta data to set.
|
|
1439
|
+
* @param {string} value The value of the meta data.
|
|
1127
1440
|
*/
|
|
1128
|
-
|
|
1441
|
+
setAnnotationMeta(key: string, value: string): void;
|
|
1129
1442
|
/**
|
|
1130
|
-
*
|
|
1443
|
+
* Get draw store details.
|
|
1131
1444
|
*
|
|
1132
|
-
* @
|
|
1133
|
-
* @param {object} cmdCallback The DeleteCommand callback.
|
|
1134
|
-
* @param {object} exeCallback The callback to call once the
|
|
1135
|
-
* DeleteCommand has been executed.
|
|
1445
|
+
* @deprecated
|
|
1136
1446
|
*/
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* Delete a Draw from the stage.
|
|
1140
|
-
*
|
|
1141
|
-
* @param {string} id The id of the group to delete.
|
|
1142
|
-
* @param {Function} cmdCallback The DeleteCommand callback.
|
|
1143
|
-
* @param {Function} exeCallback The callback to call once the
|
|
1144
|
-
* DeleteCommand has been executed.
|
|
1145
|
-
* @returns {boolean} False if the group cannot be found.
|
|
1146
|
-
*/
|
|
1147
|
-
deleteDraw(id: string, cmdCallback: Function, exeCallback: Function): boolean;
|
|
1148
|
-
/**
|
|
1149
|
-
* Delete all Draws from the stage.
|
|
1150
|
-
*
|
|
1151
|
-
* @param {Function} cmdCallback The DeleteCommand callback.
|
|
1152
|
-
* @param {Function} exeCallback The callback to call once the
|
|
1153
|
-
* DeleteCommand has been executed.
|
|
1154
|
-
*/
|
|
1155
|
-
deleteDraws(cmdCallback: Function, exeCallback: Function): void;
|
|
1156
|
-
/**
|
|
1157
|
-
* Get the total number of draws
|
|
1158
|
-
* (at all positions).
|
|
1159
|
-
*
|
|
1160
|
-
* @returns {number} The total number of draws.
|
|
1161
|
-
*/
|
|
1162
|
-
getNumberOfDraws(): number;
|
|
1447
|
+
getDrawStoreDetails(): void;
|
|
1163
1448
|
#private;
|
|
1164
1449
|
}
|
|
1165
1450
|
|
|
1166
1451
|
/**
|
|
1167
|
-
*
|
|
1452
|
+
* Debug function to output the layer hierarchy as text.
|
|
1453
|
+
*
|
|
1454
|
+
* @param {object} layer The Konva layer.
|
|
1455
|
+
* @param {string} prefix A display prefix (used in recursion).
|
|
1456
|
+
* @returns {string} A text representation of the hierarchy.
|
|
1168
1457
|
*/
|
|
1169
|
-
export declare class DrawDetails {
|
|
1170
|
-
/**
|
|
1171
|
-
* The draw ID.
|
|
1172
|
-
*
|
|
1173
|
-
* @type {number}
|
|
1174
|
-
*/
|
|
1175
|
-
id: number;
|
|
1176
|
-
/**
|
|
1177
|
-
* The draw position: an Index converted to string.
|
|
1178
|
-
*
|
|
1179
|
-
* @type {string}
|
|
1180
|
-
*/
|
|
1181
|
-
position: string;
|
|
1182
|
-
/**
|
|
1183
|
-
* The draw type.
|
|
1184
|
-
*
|
|
1185
|
-
* @type {string}
|
|
1186
|
-
*/
|
|
1187
|
-
type: string;
|
|
1188
|
-
/**
|
|
1189
|
-
* The draw color: for example 'green', '#00ff00' or 'rgb(0,255,0)'.
|
|
1190
|
-
*
|
|
1191
|
-
* @type {string}
|
|
1192
|
-
*/
|
|
1193
|
-
color: string;
|
|
1194
|
-
/**
|
|
1195
|
-
* The draw meta.
|
|
1196
|
-
*
|
|
1197
|
-
* @type {DrawMeta}
|
|
1198
|
-
*/
|
|
1199
|
-
meta: DrawMeta;
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
1458
|
/**
|
|
1203
1459
|
* Draw layer.
|
|
1204
1460
|
*/
|
|
@@ -1229,9 +1485,9 @@ export declare class DrawLayer {
|
|
|
1229
1485
|
/**
|
|
1230
1486
|
* Get the draw controller.
|
|
1231
1487
|
*
|
|
1232
|
-
* @returns {
|
|
1488
|
+
* @returns {DrawController} The controller.
|
|
1233
1489
|
*/
|
|
1234
|
-
getDrawController():
|
|
1490
|
+
getDrawController(): DrawController;
|
|
1235
1491
|
/**
|
|
1236
1492
|
* Set the plane helper.
|
|
1237
1493
|
*
|
|
@@ -1329,9 +1585,17 @@ export declare class DrawLayer {
|
|
|
1329
1585
|
*
|
|
1330
1586
|
* @param {Scalar2D} size The image size as {x,y}.
|
|
1331
1587
|
* @param {Scalar2D} spacing The image spacing as {x,y}.
|
|
1588
|
+
*/
|
|
1589
|
+
initialise(size: Scalar2D, spacing: Scalar2D): void;
|
|
1590
|
+
/**
|
|
1591
|
+
* Set the annotation group.
|
|
1592
|
+
*
|
|
1593
|
+
* @param {AnnotationGroup} group The annotation group.
|
|
1332
1594
|
* @param {string} dataId The associated data id.
|
|
1595
|
+
* @param {object} cmdCallback The command callback.
|
|
1596
|
+
* @param {object} exeCallback The exe callback.
|
|
1333
1597
|
*/
|
|
1334
|
-
|
|
1598
|
+
setAnnotationGroup(group: AnnotationGroup, dataId: string, cmdCallback: object, exeCallback: object): void;
|
|
1335
1599
|
/**
|
|
1336
1600
|
* Fit the layer to its parent container.
|
|
1337
1601
|
*
|
|
@@ -1358,17 +1622,17 @@ export declare class DrawLayer {
|
|
|
1358
1622
|
* Delete a Draw from the stage.
|
|
1359
1623
|
*
|
|
1360
1624
|
* @param {string} id The id of the group to delete.
|
|
1361
|
-
* @param {
|
|
1625
|
+
* @param {Function} exeCallback The callback to call once the
|
|
1362
1626
|
* DeleteCommand has been executed.
|
|
1363
1627
|
*/
|
|
1364
|
-
deleteDraw(id: string, exeCallback:
|
|
1628
|
+
deleteDraw(id: string, exeCallback: Function): void;
|
|
1365
1629
|
/**
|
|
1366
1630
|
* Delete all Draws from the stage.
|
|
1367
1631
|
*
|
|
1368
|
-
* @param {
|
|
1632
|
+
* @param {Function} exeCallback The callback to call once the
|
|
1369
1633
|
* DeleteCommand has been executed.
|
|
1370
1634
|
*/
|
|
1371
|
-
deleteDraws(exeCallback:
|
|
1635
|
+
deleteDraws(exeCallback: Function): void;
|
|
1372
1636
|
/**
|
|
1373
1637
|
* Get the total number of draws of this layer
|
|
1374
1638
|
* (at all positions).
|
|
@@ -1392,6 +1656,32 @@ export declare class DrawLayer {
|
|
|
1392
1656
|
* @returns {boolean} True if the position was updated.
|
|
1393
1657
|
*/
|
|
1394
1658
|
setCurrentPosition(position: Point, index: Index): boolean;
|
|
1659
|
+
/**
|
|
1660
|
+
* Activate the current draw layer.
|
|
1661
|
+
*
|
|
1662
|
+
* @param {Index} index The current position.
|
|
1663
|
+
* @param {number} scrollIndex The scroll index.
|
|
1664
|
+
*/
|
|
1665
|
+
activateDrawLayer(index: Index, scrollIndex: number): void;
|
|
1666
|
+
/**
|
|
1667
|
+
* Get the current position group.
|
|
1668
|
+
*
|
|
1669
|
+
* @returns {Konva.Group|undefined} The Konva.Group.
|
|
1670
|
+
*/
|
|
1671
|
+
getCurrentPosGroup(): Konva.Group | undefined;
|
|
1672
|
+
/**
|
|
1673
|
+
* Get the non current position groups. Used to stop listeners.
|
|
1674
|
+
*
|
|
1675
|
+
* @returns {object[]} The groups that do not have the current position id.
|
|
1676
|
+
*/
|
|
1677
|
+
getNonCurrentPosGroup(): object[];
|
|
1678
|
+
/**
|
|
1679
|
+
* Get a Konva group using its id.
|
|
1680
|
+
*
|
|
1681
|
+
* @param {string} id The group id.
|
|
1682
|
+
* @returns {object|undefined} The Konva group.
|
|
1683
|
+
*/
|
|
1684
|
+
getGroup(id: string): object | undefined;
|
|
1395
1685
|
/**
|
|
1396
1686
|
* Add an event listener to this class.
|
|
1397
1687
|
*
|
|
@@ -1411,25 +1701,6 @@ export declare class DrawLayer {
|
|
|
1411
1701
|
#private;
|
|
1412
1702
|
}
|
|
1413
1703
|
|
|
1414
|
-
/**
|
|
1415
|
-
* Draw meta data.
|
|
1416
|
-
*/
|
|
1417
|
-
export declare class DrawMeta {
|
|
1418
|
-
/**
|
|
1419
|
-
* Draw quantification.
|
|
1420
|
-
*
|
|
1421
|
-
* @type {object}
|
|
1422
|
-
*/
|
|
1423
|
-
quantification: object;
|
|
1424
|
-
/**
|
|
1425
|
-
* Draw text expression. Can contain variables surrounded with '{}' that will
|
|
1426
|
-
* be extracted from the quantification object.
|
|
1427
|
-
*
|
|
1428
|
-
* @type {string}
|
|
1429
|
-
*/
|
|
1430
|
-
textExpr: string;
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
1704
|
/**
|
|
1434
1705
|
* 2D/3D Geometry class.
|
|
1435
1706
|
*/
|
|
@@ -1619,6 +1890,16 @@ export declare class Geometry {
|
|
|
1619
1890
|
*/
|
|
1620
1891
|
export declare function getDefaultDicomSegJson(): object;
|
|
1621
1892
|
|
|
1893
|
+
/**
|
|
1894
|
+
* Get a simple dicom element item from a content item object.
|
|
1895
|
+
*
|
|
1896
|
+
* @param {DicomSRContent} content The content item object.
|
|
1897
|
+
* @returns {Object<string, any>} The item as a list of (key, value) pairs.
|
|
1898
|
+
*/
|
|
1899
|
+
export declare function getDicomSRContentItem(content: DicomSRContent): {
|
|
1900
|
+
[x: string]: any;
|
|
1901
|
+
};
|
|
1902
|
+
|
|
1622
1903
|
/**
|
|
1623
1904
|
* List of DICOM data elements indexed via a 8 character string formed from
|
|
1624
1905
|
* the group and element numbers.
|
|
@@ -1700,6 +1981,16 @@ export declare function getPixelDataTag(): Tag;
|
|
|
1700
1981
|
*/
|
|
1701
1982
|
export declare function getReverseOrientation(ori: string): string;
|
|
1702
1983
|
|
|
1984
|
+
/**
|
|
1985
|
+
* Get a content item object from a dicom element.
|
|
1986
|
+
*
|
|
1987
|
+
* @param {Object<string, DataElement>} dataElements The dicom element.
|
|
1988
|
+
* @returns {DicomSRContent} A content item object.
|
|
1989
|
+
*/
|
|
1990
|
+
export declare function getSRContent(dataElements: {
|
|
1991
|
+
[x: string]: DataElement;
|
|
1992
|
+
}): DicomSRContent;
|
|
1993
|
+
|
|
1703
1994
|
/**
|
|
1704
1995
|
* Split a group-element key used to store DICOM elements.
|
|
1705
1996
|
*
|
|
@@ -1817,6 +2108,13 @@ declare class Image_2 {
|
|
|
1817
2108
|
* @returns {string} The UID.
|
|
1818
2109
|
*/
|
|
1819
2110
|
getImageUid(index?: Index): string;
|
|
2111
|
+
/**
|
|
2112
|
+
* Get the image origin for a image UID.
|
|
2113
|
+
*
|
|
2114
|
+
* @param {string} uid The UID.
|
|
2115
|
+
* @returns {Point3D|undefined} The origin.
|
|
2116
|
+
*/
|
|
2117
|
+
getOriginForImageUid(uid: string): Point3D | undefined;
|
|
1820
2118
|
/**
|
|
1821
2119
|
* Check if this image includes the input uids.
|
|
1822
2120
|
*
|
|
@@ -3224,6 +3522,13 @@ export declare class Point2D {
|
|
|
3224
3522
|
* @returns {string} The point as a string.
|
|
3225
3523
|
*/
|
|
3226
3524
|
toString(): string;
|
|
3525
|
+
/**
|
|
3526
|
+
* Get the distance to another Point2D.
|
|
3527
|
+
*
|
|
3528
|
+
* @param {Point2D} point2D The input point.
|
|
3529
|
+
* @returns {number} Ths distance to the input point.
|
|
3530
|
+
*/
|
|
3531
|
+
getDistance(point2D: Point2D): number;
|
|
3227
3532
|
#private;
|
|
3228
3533
|
}
|
|
3229
3534
|
|
|
@@ -4043,6 +4348,19 @@ export declare class View {
|
|
|
4043
4348
|
* @returns {Index} The current index.
|
|
4044
4349
|
*/
|
|
4045
4350
|
getCurrentIndex(): Index;
|
|
4351
|
+
/**
|
|
4352
|
+
* Get the SOP image UID of the current image.
|
|
4353
|
+
*
|
|
4354
|
+
* @returns {string} The UID.
|
|
4355
|
+
*/
|
|
4356
|
+
getCurrentImageUid(): string;
|
|
4357
|
+
/**
|
|
4358
|
+
* Get the image origin for a image UID.
|
|
4359
|
+
*
|
|
4360
|
+
* @param {string} uid The UID.
|
|
4361
|
+
* @returns {Index|undefined} The origin index.
|
|
4362
|
+
*/
|
|
4363
|
+
getOriginIndexForImageUid(uid: string): Index | undefined;
|
|
4046
4364
|
/**
|
|
4047
4365
|
* Check if the current position (default) or
|
|
4048
4366
|
* the provided position is in bounds.
|
|
@@ -4213,9 +4531,8 @@ export declare class ViewConfig {
|
|
|
4213
4531
|
export declare class ViewController {
|
|
4214
4532
|
/**
|
|
4215
4533
|
* @param {View} view The associated view.
|
|
4216
|
-
* @param {string} dataId The associated data id.
|
|
4217
4534
|
*/
|
|
4218
|
-
constructor(view: View
|
|
4535
|
+
constructor(view: View);
|
|
4219
4536
|
/**
|
|
4220
4537
|
* Get the plane helper.
|
|
4221
4538
|
*
|
|
@@ -4281,6 +4598,19 @@ export declare class ViewController {
|
|
|
4281
4598
|
* @returns {Index} The current index.
|
|
4282
4599
|
*/
|
|
4283
4600
|
getCurrentIndex(): Index;
|
|
4601
|
+
/**
|
|
4602
|
+
* Get the SOP image UID of the current image.
|
|
4603
|
+
*
|
|
4604
|
+
* @returns {string} The UID.
|
|
4605
|
+
*/
|
|
4606
|
+
getCurrentImageUid(): string;
|
|
4607
|
+
/**
|
|
4608
|
+
* Get the image origin index for a image UID.
|
|
4609
|
+
*
|
|
4610
|
+
* @param {string} uid The UID.
|
|
4611
|
+
* @returns {Index|undefined} The origin index.
|
|
4612
|
+
*/
|
|
4613
|
+
getOriginIndexForImageUid(uid: string): Index | undefined;
|
|
4284
4614
|
/**
|
|
4285
4615
|
* Get the current oriented index.
|
|
4286
4616
|
*
|
|
@@ -4324,9 +4654,8 @@ export declare class ViewController {
|
|
|
4324
4654
|
* Set the associated image.
|
|
4325
4655
|
*
|
|
4326
4656
|
* @param {Image} img The associated image.
|
|
4327
|
-
* @param {string} dataId The data id of the image.
|
|
4328
4657
|
*/
|
|
4329
|
-
setImage(img: Image_2
|
|
4658
|
+
setImage(img: Image_2): void;
|
|
4330
4659
|
/**
|
|
4331
4660
|
* Get the current view (2D) spacing.
|
|
4332
4661
|
*
|
|
@@ -4347,6 +4676,12 @@ export declare class ViewController {
|
|
|
4347
4676
|
* @returns {string} The unit.
|
|
4348
4677
|
*/
|
|
4349
4678
|
getPixelUnit(): string;
|
|
4679
|
+
/**
|
|
4680
|
+
* Get the image study instance UID.
|
|
4681
|
+
*
|
|
4682
|
+
* @returns {string} The UID.
|
|
4683
|
+
*/
|
|
4684
|
+
getStudyInstanceUID(): string;
|
|
4350
4685
|
/**
|
|
4351
4686
|
* Get some values from the associated image in a region.
|
|
4352
4687
|
*
|
|
@@ -4593,22 +4928,6 @@ export declare class ViewController {
|
|
|
4593
4928
|
* @param {ViewLayer} viewLayer The layer to bind.
|
|
4594
4929
|
*/
|
|
4595
4930
|
unbindImageAndLayer(viewLayer: ViewLayer): void;
|
|
4596
|
-
/**
|
|
4597
|
-
* Add an event listener to this class.
|
|
4598
|
-
*
|
|
4599
|
-
* @param {string} type The event type.
|
|
4600
|
-
* @param {Function} callback The function associated with the provided
|
|
4601
|
-
* event type, will be called with the fired event.
|
|
4602
|
-
*/
|
|
4603
|
-
addEventListener(type: string, callback: Function): void;
|
|
4604
|
-
/**
|
|
4605
|
-
* Remove an event listener from this class.
|
|
4606
|
-
*
|
|
4607
|
-
* @param {string} type The event type.
|
|
4608
|
-
* @param {Function} callback The function associated with the provided
|
|
4609
|
-
* event type.
|
|
4610
|
-
*/
|
|
4611
|
-
removeEventListener(type: string, callback: Function): void;
|
|
4612
4931
|
#private;
|
|
4613
4932
|
}
|
|
4614
4933
|
|