dwv 0.34.0-beta.1 → 0.34.0-beta.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.
package/dist/dwv.d.ts CHANGED
@@ -16,10 +16,6 @@ export declare function addTagsToDictionary(group: string, tags: {
16
16
  * Image annotation.
17
17
  */
18
18
  export declare class Annotation {
19
- /**
20
- * @param {ViewController} viewController The associated view controller.
21
- */
22
- constructor(viewController: ViewController);
23
19
  /**
24
20
  * The ID.
25
21
  *
@@ -69,6 +65,12 @@ export declare class Annotation {
69
65
  * @type {string}
70
66
  */
71
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;
72
74
  /**
73
75
  * Get the image origin for a image UID.
74
76
  *
@@ -96,7 +98,7 @@ export declare class Annotation {
96
98
  */
97
99
  updateQuantification(): void;
98
100
  /**
99
- * Get the math shape associated factory.
101
+ * Get the math shape associated draw factory.
100
102
  *
101
103
  * @returns {object} The factory.
102
104
  */
@@ -128,20 +130,19 @@ export declare class AnnotationFactory {
128
130
  * Get an {@link Annotation} object from the read DICOM file.
129
131
  *
130
132
  * @param {Object<string, DataElement>} dataElements The DICOM tags.
131
- * @param {ViewController} viewController The associated view controller.
132
- * @returns {AnnotationList} A new annotation list.
133
+ * @returns {AnnotationGroup} A new annotation group.
133
134
  */
134
135
  create(dataElements: {
135
136
  [x: string]: DataElement;
136
- }, viewController: ViewController): AnnotationList;
137
+ }): AnnotationGroup;
137
138
  /**
138
- * Convert an annotation list into a DICOM SR object.
139
+ * Convert an annotation group into a DICOM SR object.
139
140
  *
140
- * @param {AnnotationList} annotationList The annotation list.
141
+ * @param {AnnotationGroup} annotationGroup The annotation group.
141
142
  * @param {Object<string, any>} [extraTags] Optional list of extra tags.
142
143
  * @returns {Object<string, DataElement>} A list of dicom elements.
143
144
  */
144
- toDicom(annotationList: AnnotationList, extraTags?: {
145
+ toDicom(annotationGroup: AnnotationGroup, extraTags?: {
145
146
  [x: string]: any;
146
147
  }): {
147
148
  [x: string]: DataElement;
@@ -150,16 +151,16 @@ export declare class AnnotationFactory {
150
151
  }
151
152
 
152
153
  /**
153
- * Annotation list.
154
+ * Annotation group.
154
155
  */
155
- export declare class AnnotationList {
156
+ export declare class AnnotationGroup {
156
157
  /**
157
158
  * @param {Annotation[]} [list] Optional list, will
158
159
  * create new if not provided.
159
160
  */
160
161
  constructor(list?: Annotation[]);
161
162
  /**
162
- * Get the annotation list as an array.
163
+ * Get the annotation group as an array.
163
164
  *
164
165
  * @returns {Annotation[]} The array.
165
166
  */
@@ -183,11 +184,17 @@ export declare class AnnotationList {
183
184
  */
184
185
  update(annotation: Annotation): void;
185
186
  /**
186
- * Remoave an annotation.
187
+ * Remove an annotation.
187
188
  *
188
189
  * @param {string} id The id of the annotation to remove.
189
190
  */
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;
191
198
  /**
192
199
  * Find an annotation.
193
200
  *
@@ -258,12 +265,12 @@ export declare class AnnotationList {
258
265
  */
259
266
  export declare class App {
260
267
  /**
261
- * Get the image.
268
+ * Get a DicomData.
262
269
  *
263
270
  * @param {string} dataId The data id.
264
- * @returns {Image|undefined} The associated image.
271
+ * @returns {DicomData|undefined} The data.
265
272
  */
266
- getImage(dataId: string): Image_2 | undefined;
273
+ getData(dataId: string): DicomData | undefined;
267
274
  /**
268
275
  * Set the image at the given id.
269
276
  *
@@ -272,15 +279,12 @@ export declare class App {
272
279
  */
273
280
  setImage(dataId: string, img: Image_2): void;
274
281
  /**
275
- * Add a new image.
282
+ * Add a new DicomData.
276
283
  *
277
- * @param {Image} image The new image.
278
- * @param {object} meta The image meta.
279
- * @param {string} source The source of the new image,
280
- * will be passed with load events.
281
- * @returns {string} The new image data id.
284
+ * @param {DicomData} data The new data.
285
+ * @returns {string} The data id.
282
286
  */
283
- addNewImage(image: Image_2, meta: object, source: string): string;
287
+ addData(data: DicomData): string;
284
288
  /**
285
289
  * Get the meta data.
286
290
  *
@@ -1158,6 +1162,34 @@ export declare class DicomCode {
1158
1162
  toString(): string;
1159
1163
  }
1160
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;
1191
+ }
1192
+
1161
1193
  /**
1162
1194
  * DicomParser class.
1163
1195
  *
@@ -1359,9 +1391,9 @@ export declare class DicomWriter {
1359
1391
  */
1360
1392
  export declare class DrawController {
1361
1393
  /**
1362
- * @param {AnnotationList} [list] Optional annotation list.
1394
+ * @param {AnnotationGroup} [group] Optional annotation group.
1363
1395
  */
1364
- constructor(list?: AnnotationList);
1396
+ constructor(group?: AnnotationGroup);
1365
1397
  /**
1366
1398
  * Get an annotation.
1367
1399
  *
@@ -1370,11 +1402,11 @@ export declare class DrawController {
1370
1402
  */
1371
1403
  getAnnotation(id: string): Annotation | undefined;
1372
1404
  /**
1373
- * Get the annotation list.
1405
+ * Get the annotation group.
1374
1406
  *
1375
- * @returns {AnnotationList} The list.
1407
+ * @returns {AnnotationGroup} The list.
1376
1408
  */
1377
- getAnnotationList(): AnnotationList;
1409
+ getAnnotationGroup(): AnnotationGroup;
1378
1410
  /**
1379
1411
  * Add an annotation.
1380
1412
  *
@@ -1394,7 +1426,7 @@ export declare class DrawController {
1394
1426
  */
1395
1427
  removeAnnotation(id: string): void;
1396
1428
  /**
1397
- * Check if the annotation list contains a meta data value.
1429
+ * Check if the annotation group contains a meta data value.
1398
1430
  *
1399
1431
  * @param {string} key The key to check.
1400
1432
  * @returns {boolean} True if the meta data is present.
@@ -1453,9 +1485,9 @@ export declare class DrawLayer {
1453
1485
  /**
1454
1486
  * Get the draw controller.
1455
1487
  *
1456
- * @returns {object} The controller.
1488
+ * @returns {DrawController} The controller.
1457
1489
  */
1458
- getDrawController(): object;
1490
+ getDrawController(): DrawController;
1459
1491
  /**
1460
1492
  * Set the plane helper.
1461
1493
  *
@@ -1556,14 +1588,14 @@ export declare class DrawLayer {
1556
1588
  */
1557
1589
  initialise(size: Scalar2D, spacing: Scalar2D): void;
1558
1590
  /**
1559
- * Set the annotation list.
1591
+ * Set the annotation group.
1560
1592
  *
1561
- * @param {AnnotationList} list The annotation list.
1593
+ * @param {AnnotationGroup} group The annotation group.
1562
1594
  * @param {string} dataId The associated data id.
1563
1595
  * @param {object} cmdCallback The command callback.
1564
1596
  * @param {object} exeCallback The exe callback.
1565
1597
  */
1566
- setAnnotationList(list: AnnotationList, dataId: string, cmdCallback: object, exeCallback: object): void;
1598
+ setAnnotationGroup(group: AnnotationGroup, dataId: string, cmdCallback: object, exeCallback: object): void;
1567
1599
  /**
1568
1600
  * Fit the layer to its parent container.
1569
1601
  *