dwv 0.34.0-beta.13 → 0.34.0-beta.15

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
@@ -67,17 +67,23 @@ export declare class Annotation {
67
67
  */
68
68
  labelPosition: Point2D | undefined;
69
69
  /**
70
- * Set the associated view controller.
70
+ * The plane origin, the 3D position of index [0, 0, k].
71
71
  *
72
- * @param {ViewController} viewController The associated view controller.
72
+ * @type {Point3D|undefined}
73
73
  */
74
- setViewController(viewController: ViewController): void;
74
+ planeOrigin: Point3D | undefined;
75
75
  /**
76
- * Get the image origin for a image UID.
76
+ * A couple of points that help define the annotation plane.
77
77
  *
78
- * @returns {Point3D|undefined} The origin.
78
+ * @type {Point3D[]|undefined}
79
+ */
80
+ planePoints: Point3D[] | undefined;
81
+ /**
82
+ * Set the associated view controller.
83
+ *
84
+ * @param {ViewController} viewController The associated view controller.
79
85
  */
80
- getOrigin(): Point3D | undefined;
86
+ setViewController(viewController: ViewController): void;
81
87
  /**
82
88
  * Set the annotation text expression.
83
89
  *
@@ -1565,6 +1571,12 @@ export declare class DrawLayer {
1565
1571
  * @returns {string} The id.
1566
1572
  */
1567
1573
  getDataId(): string;
1574
+ /**
1575
+ * Get the reference data id.
1576
+ *
1577
+ * @returns {string} The id.
1578
+ */
1579
+ getReferenceLayerId(): string;
1568
1580
  /**
1569
1581
  * Get the Konva stage.
1570
1582
  *
@@ -1644,6 +1656,14 @@ export declare class DrawLayer {
1644
1656
  * @param {Point3D} [center] The scale center.
1645
1657
  */
1646
1658
  setScale(newScale: Scalar3D, center?: Point3D): void;
1659
+ /**
1660
+ * Initialise the layer scale.
1661
+ *
1662
+ * @param {Scalar3D} newScale The scale as {x,y,z}.
1663
+ * @param {Scalar2D} absoluteZoomOffset The zoom offset as {x,y}
1664
+ * without the fit scale (as provided by getAbsoluteZoomOffset).
1665
+ */
1666
+ initScale(newScale: Scalar3D, absoluteZoomOffset: Scalar2D): void;
1647
1667
  /**
1648
1668
  * Set the layer offset.
1649
1669
  *
@@ -1680,8 +1700,9 @@ export declare class DrawLayer {
1680
1700
  *
1681
1701
  * @param {Scalar2D} size The image size as {x,y}.
1682
1702
  * @param {Scalar2D} spacing The image spacing as {x,y}.
1703
+ * @param {string} refLayerId The reference image dataId.
1683
1704
  */
1684
- initialise(size: Scalar2D, spacing: Scalar2D): void;
1705
+ initialise(size: Scalar2D, spacing: Scalar2D, refLayerId: string): void;
1685
1706
  /**
1686
1707
  * Set the annotation group.
1687
1708
  *
@@ -1770,17 +1791,10 @@ export declare class DrawLayer {
1770
1791
  * Set the current position.
1771
1792
  *
1772
1793
  * @param {Point} position The new position.
1773
- * @param {Index} _index The new index.
1794
+ * @param {Index} index The new index.
1774
1795
  * @returns {boolean} True if the position was updated.
1775
1796
  */
1776
- setCurrentPosition(position: Point, _index: Index): boolean;
1777
- /**
1778
- * Activate the current draw layer.
1779
- *
1780
- * @param {Point} position The current position.
1781
- * @param {number} scrollIndex The scroll index.
1782
- */
1783
- activateDrawLayer(position: Point, scrollIndex: number): void;
1797
+ setCurrentPosition(position: Point, index: Index): boolean;
1784
1798
  /**
1785
1799
  * Get the current position group.
1786
1800
  *
@@ -2120,7 +2134,7 @@ export declare function getEllipseIndices(center: Index, radius: number[], dir:
2120
2134
  * @param {object} event The event to get the layer div id from. Expecting
2121
2135
  * an event origininating from a canvas inside a layer HTML div
2122
2136
  * with the 'layer' class and id generated with `getLayerDivId`.
2123
- * @returns {object} The layer details as {groupDivId, layerId}.
2137
+ * @returns {object} The layer details as {groupDivId, layerIndex, layerId}.
2124
2138
  */
2125
2139
  export declare function getLayerDetailsFromEvent(event: object): object;
2126
2140
 
@@ -2880,9 +2894,10 @@ export declare class LayerGroup {
2880
2894
  /**
2881
2895
  * Set the active draw layer.
2882
2896
  *
2883
- * @param {number} index The index of the layer to set as active.
2897
+ * @param {number|undefined} index The index of the layer to set as active
2898
+ * or undefined to not set any.
2884
2899
  */
2885
- setActiveDrawLayer(index: number): void;
2900
+ setActiveDrawLayer(index: number | undefined): void;
2886
2901
  /**
2887
2902
  * Set the active draw layer with a data id.
2888
2903
  *
@@ -3493,11 +3508,10 @@ export declare class OverlayData {
3493
3508
  */
3494
3509
  export declare class PlaneHelper {
3495
3510
  /**
3496
- * @param {Spacing} spacing The spacing.
3497
- * @param {Matrix33} imageOrientation The image oientation.
3511
+ * @param {Geometry} imageGeometry The image geometry.
3498
3512
  * @param {Matrix33} viewOrientation The view orientation.
3499
3513
  */
3500
- constructor(spacing: Spacing, imageOrientation: Matrix33, viewOrientation: Matrix33);
3514
+ constructor(imageGeometry: Geometry, viewOrientation: Matrix33);
3501
3515
  /**
3502
3516
  * Get a 3D offset from a plane one.
3503
3517
  *
@@ -3561,6 +3575,34 @@ export declare class PlaneHelper {
3561
3575
  * @returns {Point3D} The de-orienteded point.
3562
3576
  */
3563
3577
  getImageDeOrientedPoint3D(point: Point3D): Point3D;
3578
+ /**
3579
+ * Get a world position from a 2D plane position.
3580
+ *
3581
+ * @param {Point2D} point2D The input point.
3582
+ * @param {number} k The slice index.
3583
+ * @returns {Point3D} The associated position.
3584
+ */
3585
+ getPositionFromPlanePoint(point2D: Point2D, k: number): Point3D;
3586
+ /**
3587
+ * Get a list of points that define the plane at position k.
3588
+ *
3589
+ * @param {number} k The slice index value.
3590
+ * @returns {Point3D[]} A couple of 3D points.
3591
+ */
3592
+ getPlanePoints(k: number): Point3D[];
3593
+ /**
3594
+ * Image world to index.
3595
+ *
3596
+ * @param {Point} point The input point.
3597
+ * @returns {Index} The corresponding index.
3598
+ */
3599
+ worldToIndex(point: Point): Index;
3600
+ /**
3601
+ * Is this view in the same orientation as the image aquisition.
3602
+ *
3603
+ * @returns {boolean} True if in aquisition plane.
3604
+ */
3605
+ isAquisitionOrientation(): boolean;
3564
3606
  /**
3565
3607
  * Reorder values to follow target orientation.
3566
3608
  *
@@ -4640,6 +4682,12 @@ export declare class View {
4640
4682
  * @returns {number} The index.
4641
4683
  */
4642
4684
  getScrollIndex(): number;
4685
+ /**
4686
+ * Is this view in the same orientation as the image aquisition.
4687
+ *
4688
+ * @returns {boolean} True if in aquisition plane.
4689
+ */
4690
+ isAquisitionOrientation(): boolean;
4643
4691
  #private;
4644
4692
  }
4645
4693
 
@@ -4806,10 +4854,23 @@ export declare class ViewController {
4806
4854
  /**
4807
4855
  * Get the first origin or at a given position.
4808
4856
  *
4809
- * @param {Point} [position] Opitonal position.
4857
+ * @param {Point} [position] Optional position.
4810
4858
  * @returns {Point3D} The origin.
4811
4859
  */
4812
4860
  getOrigin(position?: Point): Point3D;
4861
+ /**
4862
+ * Is this view in the same orientation as the image aquisition.
4863
+ *
4864
+ * @returns {boolean} True if in aquisition plane.
4865
+ */
4866
+ isAquisitionOrientation(): boolean;
4867
+ /**
4868
+ * Get a list of points that define the plane at position k.
4869
+ *
4870
+ * @param {number} k The slice index value.
4871
+ * @returns {Point3D[]} A couple of 3D points.
4872
+ */
4873
+ getPlanePoints(k: number): Point3D[];
4813
4874
  /**
4814
4875
  * Get the current scroll position value.
4815
4876
  *