dwv 0.34.0-beta.3 → 0.34.0-beta.4

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
@@ -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
  *
@@ -213,16 +219,16 @@ export declare class AnnotationGroup {
213
219
  * Get a meta data value.
214
220
  *
215
221
  * @param {string} key The meta data key.
216
- * @returns {string} The meta data value.
222
+ * @returns {object} The meta data value.
217
223
  */
218
- getMeta(key: string): string;
224
+ getMeta(key: string): object;
219
225
  /**
220
226
  * Set a meta data.
221
227
  *
222
228
  * @param {string} key The meta data key.
223
- * @param {string} value The value of the meta data.
229
+ * @param {object} value The value of the meta data.
224
230
  */
225
- setMeta(key: string, value: string): void;
231
+ setMeta(key: string, value: object): void;
226
232
  /**
227
233
  * Add an event listener to this class.
228
234
  *
@@ -1425,6 +1431,19 @@ export declare class DrawController {
1425
1431
  * @param {string} id The id of the annotation to remove.
1426
1432
  */
1427
1433
  removeAnnotation(id: string): void;
1434
+ /**
1435
+ * Remove an annotation via a remove command (triggers draw actions).
1436
+ *
1437
+ * @param {string} id The annotation id.
1438
+ * @param {Function} exeCallback The undo stack callback.
1439
+ */
1440
+ removeAnnotationWithCommand(id: string, exeCallback: Function): void;
1441
+ /**
1442
+ * Remove all annotations via remove commands (triggers draw actions).
1443
+ *
1444
+ * @param {Function} exeCallback The undo stack callback.
1445
+ */
1446
+ removeAllAnnotationsWithCommand(exeCallback: Function): void;
1428
1447
  /**
1429
1448
  * Check if the annotation group contains a meta data value.
1430
1449
  *
@@ -1464,6 +1483,12 @@ export declare class DrawLayer {
1464
1483
  * as this layer id.
1465
1484
  */
1466
1485
  constructor(containerDiv: HTMLDivElement);
1486
+ /**
1487
+ * Set the draw shape handler.
1488
+ *
1489
+ * @param {DrawShapeHandler|undefined} handler The shape handler.
1490
+ */
1491
+ setShapeHandler(handler: DrawShapeHandler | undefined): void;
1467
1492
  /**
1468
1493
  * Get the associated data id.
1469
1494
  *
@@ -1590,12 +1615,11 @@ export declare class DrawLayer {
1590
1615
  /**
1591
1616
  * Set the annotation group.
1592
1617
  *
1593
- * @param {AnnotationGroup} group The annotation group.
1618
+ * @param {AnnotationGroup} annotationGroup The annotation group.
1594
1619
  * @param {string} dataId The associated data id.
1595
- * @param {object} cmdCallback The command callback.
1596
- * @param {object} exeCallback The exe callback.
1620
+ * @param {object} exeCallback The undo stack callback.
1597
1621
  */
1598
- setAnnotationGroup(group: AnnotationGroup, dataId: string, cmdCallback: object, exeCallback: object): void;
1622
+ setAnnotationGroup(annotationGroup: AnnotationGroup, dataId: string, exeCallback: object): void;
1599
1623
  /**
1600
1624
  * Fit the layer to its parent container.
1601
1625
  *
@@ -1621,18 +1645,20 @@ export declare class DrawLayer {
1621
1645
  /**
1622
1646
  * Delete a Draw from the stage.
1623
1647
  *
1624
- * @param {string} id The id of the group to delete.
1625
- * @param {Function} exeCallback The callback to call once the
1648
+ * @deprecated
1649
+ * @param {string} _id The id of the group to delete.
1650
+ * @param {Function} _exeCallback The callback to call once the
1626
1651
  * DeleteCommand has been executed.
1627
1652
  */
1628
- deleteDraw(id: string, exeCallback: Function): void;
1653
+ deleteDraw(_id: string, _exeCallback: Function): void;
1629
1654
  /**
1630
1655
  * Delete all Draws from the stage.
1631
1656
  *
1632
- * @param {Function} exeCallback The callback to call once the
1657
+ * @deprecated
1658
+ * @param {Function} _exeCallback The callback to call once the
1633
1659
  * DeleteCommand has been executed.
1634
1660
  */
1635
- deleteDraws(exeCallback: Function): void;
1661
+ deleteDraws(_exeCallback: Function): void;
1636
1662
  /**
1637
1663
  * Get the total number of draws of this layer
1638
1664
  * (at all positions).
@@ -1701,6 +1727,68 @@ export declare class DrawLayer {
1701
1727
  #private;
1702
1728
  }
1703
1729
 
1730
+ /**
1731
+ * Draw shape handler: handle action on existing shapes.
1732
+ */
1733
+ export declare class DrawShapeHandler {
1734
+ /**
1735
+ * @callback eventFn@callback eventFn
1736
+ * @param {object} event The event.
1737
+ */
1738
+ /**
1739
+ * @param {App} app The associated application.
1740
+ */
1741
+ constructor(app: App);
1742
+ /**
1743
+ * Set the draw editor shape.
1744
+ *
1745
+ * @param {Konva.Shape} shape The shape to edit.
1746
+ * @param {DrawLayer} drawLayer The layer the shape belongs to.
1747
+ */
1748
+ setEditorShape(shape: Konva.Shape, drawLayer: DrawLayer): void;
1749
+ /**
1750
+ * Get the currently edited shape group.
1751
+ *
1752
+ * @returns {Konva.Group|undefined} The edited group.
1753
+ */
1754
+ getEditorShapeGroup(): Konva.Group | undefined;
1755
+ /**
1756
+ * Get the currently edited annotation.
1757
+ *
1758
+ * @returns {Annotation|undefined} The edited annotation.
1759
+ */
1760
+ getEditorAnnotation(): Annotation | undefined;
1761
+ /**
1762
+ * Disable and reset the shape editor.
1763
+ */
1764
+ disableAndResetEditor(): void;
1765
+ /**
1766
+ * Store specific mouse over cursor.
1767
+ *
1768
+ * @param {string} cursor The cursor name.
1769
+ */
1770
+ storeMouseOverCursor(cursor: string): void;
1771
+ /**
1772
+ * Handle shape group mouseout.
1773
+ */
1774
+ onMouseOutShapeGroup(): void;
1775
+ /**
1776
+ * Add shape group listeners.
1777
+ *
1778
+ * @param {DrawLayer} drawLayer The origin draw layer.
1779
+ * @param {Konva.Group} shapeGroup The shape group to set on.
1780
+ * @param {Annotation} annotation The associated annnotation.
1781
+ */
1782
+ addShapeListeners(drawLayer: DrawLayer, shapeGroup: Konva.Group, annotation: Annotation): void;
1783
+ /**
1784
+ * Remove shape group listeners.
1785
+ *
1786
+ * @param {Konva.Group} shapeGroup The shape group to set off.
1787
+ */
1788
+ removeShapeListeners(shapeGroup: Konva.Group): void;
1789
+ #private;
1790
+ }
1791
+
1704
1792
  /**
1705
1793
  * 2D/3D Geometry class.
1706
1794
  */
@@ -4682,6 +4770,12 @@ export declare class ViewController {
4682
4770
  * @returns {string} The UID.
4683
4771
  */
4684
4772
  getStudyInstanceUID(): string;
4773
+ /**
4774
+ * Get the image series instance UID.
4775
+ *
4776
+ * @returns {string} The UID.
4777
+ */
4778
+ getSeriesInstanceUID(): string;
4685
4779
  /**
4686
4780
  * Get some values from the associated image in a region.
4687
4781
  *