dwv 0.34.0-beta.3 → 0.34.0-beta.5
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 +116 -19
- package/dist/dwv.min.js +1 -1
- package/dist/dwv.min.js.map +1 -1
- package/package.json +1 -1
package/dist/dwv.d.ts
CHANGED
|
@@ -65,6 +65,12 @@ export declare class Annotation {
|
|
|
65
65
|
* @type {string}
|
|
66
66
|
*/
|
|
67
67
|
textExpr: string;
|
|
68
|
+
/**
|
|
69
|
+
* Label position.
|
|
70
|
+
*
|
|
71
|
+
* @type {Point2D}
|
|
72
|
+
*/
|
|
73
|
+
labelPosition: Point2D;
|
|
68
74
|
/**
|
|
69
75
|
* Set the associated view controller.
|
|
70
76
|
*
|
|
@@ -103,6 +109,12 @@ export declare class Annotation {
|
|
|
103
109
|
* @returns {object} The factory.
|
|
104
110
|
*/
|
|
105
111
|
getFactory(): object;
|
|
112
|
+
/**
|
|
113
|
+
* Get the string type of this annotation.
|
|
114
|
+
*
|
|
115
|
+
* @returns {string} The type.
|
|
116
|
+
*/
|
|
117
|
+
getType(): string;
|
|
106
118
|
#private;
|
|
107
119
|
}
|
|
108
120
|
|
|
@@ -202,6 +214,14 @@ export declare class AnnotationGroup {
|
|
|
202
214
|
* @returns {Annotation|undefined} The found annotation.
|
|
203
215
|
*/
|
|
204
216
|
find(id: string): Annotation | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* Get the meta data.
|
|
219
|
+
*
|
|
220
|
+
* @returns {Object<string, any>} The meta data.
|
|
221
|
+
*/
|
|
222
|
+
getMeta(): {
|
|
223
|
+
[x: string]: any;
|
|
224
|
+
};
|
|
205
225
|
/**
|
|
206
226
|
* Check if this list contains a meta data value.
|
|
207
227
|
*
|
|
@@ -213,16 +233,16 @@ export declare class AnnotationGroup {
|
|
|
213
233
|
* Get a meta data value.
|
|
214
234
|
*
|
|
215
235
|
* @param {string} key The meta data key.
|
|
216
|
-
* @returns {
|
|
236
|
+
* @returns {object} The meta data value.
|
|
217
237
|
*/
|
|
218
|
-
|
|
238
|
+
getMetaValue(key: string): object;
|
|
219
239
|
/**
|
|
220
240
|
* Set a meta data.
|
|
221
241
|
*
|
|
222
242
|
* @param {string} key The meta data key.
|
|
223
|
-
* @param {
|
|
243
|
+
* @param {object} value The value of the meta data.
|
|
224
244
|
*/
|
|
225
|
-
|
|
245
|
+
setMetaValue(key: string, value: object): void;
|
|
226
246
|
/**
|
|
227
247
|
* Add an event listener to this class.
|
|
228
248
|
*
|
|
@@ -1425,6 +1445,19 @@ export declare class DrawController {
|
|
|
1425
1445
|
* @param {string} id The id of the annotation to remove.
|
|
1426
1446
|
*/
|
|
1427
1447
|
removeAnnotation(id: string): void;
|
|
1448
|
+
/**
|
|
1449
|
+
* Remove an annotation via a remove command (triggers draw actions).
|
|
1450
|
+
*
|
|
1451
|
+
* @param {string} id The annotation id.
|
|
1452
|
+
* @param {Function} exeCallback The undo stack callback.
|
|
1453
|
+
*/
|
|
1454
|
+
removeAnnotationWithCommand(id: string, exeCallback: Function): void;
|
|
1455
|
+
/**
|
|
1456
|
+
* Remove all annotations via remove commands (triggers draw actions).
|
|
1457
|
+
*
|
|
1458
|
+
* @param {Function} exeCallback The undo stack callback.
|
|
1459
|
+
*/
|
|
1460
|
+
removeAllAnnotationsWithCommand(exeCallback: Function): void;
|
|
1428
1461
|
/**
|
|
1429
1462
|
* Check if the annotation group contains a meta data value.
|
|
1430
1463
|
*
|
|
@@ -1464,6 +1497,12 @@ export declare class DrawLayer {
|
|
|
1464
1497
|
* as this layer id.
|
|
1465
1498
|
*/
|
|
1466
1499
|
constructor(containerDiv: HTMLDivElement);
|
|
1500
|
+
/**
|
|
1501
|
+
* Set the draw shape handler.
|
|
1502
|
+
*
|
|
1503
|
+
* @param {DrawShapeHandler|undefined} handler The shape handler.
|
|
1504
|
+
*/
|
|
1505
|
+
setShapeHandler(handler: DrawShapeHandler | undefined): void;
|
|
1467
1506
|
/**
|
|
1468
1507
|
* Get the associated data id.
|
|
1469
1508
|
*
|
|
@@ -1590,12 +1629,11 @@ export declare class DrawLayer {
|
|
|
1590
1629
|
/**
|
|
1591
1630
|
* Set the annotation group.
|
|
1592
1631
|
*
|
|
1593
|
-
* @param {AnnotationGroup}
|
|
1632
|
+
* @param {AnnotationGroup} annotationGroup The annotation group.
|
|
1594
1633
|
* @param {string} dataId The associated data id.
|
|
1595
|
-
* @param {object}
|
|
1596
|
-
* @param {object} exeCallback The exe callback.
|
|
1634
|
+
* @param {object} exeCallback The undo stack callback.
|
|
1597
1635
|
*/
|
|
1598
|
-
setAnnotationGroup(
|
|
1636
|
+
setAnnotationGroup(annotationGroup: AnnotationGroup, dataId: string, exeCallback: object): void;
|
|
1599
1637
|
/**
|
|
1600
1638
|
* Fit the layer to its parent container.
|
|
1601
1639
|
*
|
|
@@ -1621,18 +1659,20 @@ export declare class DrawLayer {
|
|
|
1621
1659
|
/**
|
|
1622
1660
|
* Delete a Draw from the stage.
|
|
1623
1661
|
*
|
|
1624
|
-
* @
|
|
1625
|
-
* @param {
|
|
1662
|
+
* @deprecated
|
|
1663
|
+
* @param {string} _id The id of the group to delete.
|
|
1664
|
+
* @param {Function} _exeCallback The callback to call once the
|
|
1626
1665
|
* DeleteCommand has been executed.
|
|
1627
1666
|
*/
|
|
1628
|
-
deleteDraw(
|
|
1667
|
+
deleteDraw(_id: string, _exeCallback: Function): void;
|
|
1629
1668
|
/**
|
|
1630
1669
|
* Delete all Draws from the stage.
|
|
1631
1670
|
*
|
|
1632
|
-
* @
|
|
1671
|
+
* @deprecated
|
|
1672
|
+
* @param {Function} _exeCallback The callback to call once the
|
|
1633
1673
|
* DeleteCommand has been executed.
|
|
1634
1674
|
*/
|
|
1635
|
-
deleteDraws(
|
|
1675
|
+
deleteDraws(_exeCallback: Function): void;
|
|
1636
1676
|
/**
|
|
1637
1677
|
* Get the total number of draws of this layer
|
|
1638
1678
|
* (at all positions).
|
|
@@ -1701,6 +1741,69 @@ export declare class DrawLayer {
|
|
|
1701
1741
|
#private;
|
|
1702
1742
|
}
|
|
1703
1743
|
|
|
1744
|
+
/**
|
|
1745
|
+
* Draw shape handler: handle action on existing shapes.
|
|
1746
|
+
*/
|
|
1747
|
+
export declare class DrawShapeHandler {
|
|
1748
|
+
/**
|
|
1749
|
+
* @callback eventFn@callback eventFn
|
|
1750
|
+
* @param {object} event The event.
|
|
1751
|
+
*/
|
|
1752
|
+
/**
|
|
1753
|
+
* @param {App} app The associated application.
|
|
1754
|
+
* @param {Function} eventCallback Event callback.
|
|
1755
|
+
*/
|
|
1756
|
+
constructor(app: App, eventCallback: Function);
|
|
1757
|
+
/**
|
|
1758
|
+
* Set the draw editor shape.
|
|
1759
|
+
*
|
|
1760
|
+
* @param {Konva.Shape} shape The shape to edit.
|
|
1761
|
+
* @param {DrawLayer} drawLayer The layer the shape belongs to.
|
|
1762
|
+
*/
|
|
1763
|
+
setEditorShape(shape: Konva.Shape, drawLayer: DrawLayer): void;
|
|
1764
|
+
/**
|
|
1765
|
+
* Get the currently edited shape group.
|
|
1766
|
+
*
|
|
1767
|
+
* @returns {Konva.Group|undefined} The edited group.
|
|
1768
|
+
*/
|
|
1769
|
+
getEditorShapeGroup(): Konva.Group | undefined;
|
|
1770
|
+
/**
|
|
1771
|
+
* Get the currently edited annotation.
|
|
1772
|
+
*
|
|
1773
|
+
* @returns {Annotation|undefined} The edited annotation.
|
|
1774
|
+
*/
|
|
1775
|
+
getEditorAnnotation(): Annotation | undefined;
|
|
1776
|
+
/**
|
|
1777
|
+
* Disable and reset the shape editor.
|
|
1778
|
+
*/
|
|
1779
|
+
disableAndResetEditor(): void;
|
|
1780
|
+
/**
|
|
1781
|
+
* Store specific mouse over cursor.
|
|
1782
|
+
*
|
|
1783
|
+
* @param {string} cursor The cursor name.
|
|
1784
|
+
*/
|
|
1785
|
+
storeMouseOverCursor(cursor: string): void;
|
|
1786
|
+
/**
|
|
1787
|
+
* Handle shape group mouseout.
|
|
1788
|
+
*/
|
|
1789
|
+
onMouseOutShapeGroup(): void;
|
|
1790
|
+
/**
|
|
1791
|
+
* Add shape group listeners.
|
|
1792
|
+
*
|
|
1793
|
+
* @param {DrawLayer} drawLayer The origin draw layer.
|
|
1794
|
+
* @param {Konva.Group} shapeGroup The shape group to set on.
|
|
1795
|
+
* @param {Annotation} annotation The associated annotation.
|
|
1796
|
+
*/
|
|
1797
|
+
addShapeListeners(drawLayer: DrawLayer, shapeGroup: Konva.Group, annotation: Annotation): void;
|
|
1798
|
+
/**
|
|
1799
|
+
* Remove shape group listeners.
|
|
1800
|
+
*
|
|
1801
|
+
* @param {Konva.Group} shapeGroup The shape group to set off.
|
|
1802
|
+
*/
|
|
1803
|
+
removeShapeListeners(shapeGroup: Konva.Group): void;
|
|
1804
|
+
#private;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1704
1807
|
/**
|
|
1705
1808
|
* 2D/3D Geometry class.
|
|
1706
1809
|
*/
|
|
@@ -4676,12 +4779,6 @@ export declare class ViewController {
|
|
|
4676
4779
|
* @returns {string} The unit.
|
|
4677
4780
|
*/
|
|
4678
4781
|
getPixelUnit(): string;
|
|
4679
|
-
/**
|
|
4680
|
-
* Get the image study instance UID.
|
|
4681
|
-
*
|
|
4682
|
-
* @returns {string} The UID.
|
|
4683
|
-
*/
|
|
4684
|
-
getStudyInstanceUID(): string;
|
|
4685
4782
|
/**
|
|
4686
4783
|
* Get some values from the associated image in a region.
|
|
4687
4784
|
*
|