dwv 0.34.0-beta.11 → 0.34.0-beta.13

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
@@ -75,9 +75,9 @@ export declare class Annotation {
75
75
  /**
76
76
  * Get the image origin for a image UID.
77
77
  *
78
- * @returns {Index|undefined} The origin index.
78
+ * @returns {Point3D|undefined} The origin.
79
79
  */
80
- getOriginIndex(): Index | undefined;
80
+ getOrigin(): Point3D | undefined;
81
81
  /**
82
82
  * Set the annotation text expression.
83
83
  *
@@ -803,18 +803,18 @@ export declare class App {
803
803
  * Create new annotation data based on the data of
804
804
  * the active view layer.
805
805
  *
806
- * @param {LayerGroup} layerGroup The layerGroup with the data to associate
807
- * to the annotation.
806
+ * @param {string} refDataId The reference data id.
808
807
  * @returns {DicomData} The new data.
809
808
  */
810
- createAnnotationData(layerGroup: LayerGroup): DicomData;
809
+ createAnnotationData(refDataId: string): DicomData;
811
810
  /**
812
811
  * Add new data and render it with a simple new data view config.
813
812
  *
814
813
  * @param {DicomData} data The data to add.
815
814
  * @param {string} divId The div where to draw.
815
+ * @param {string} refDataId The reference data id.
816
816
  */
817
- addAndRenderAnnotationData(data: DicomData, divId: string): void;
817
+ addAndRenderAnnotationData(data: DicomData, divId: string, refDataId: string): void;
818
818
  /**
819
819
  * Add a draw layer.
820
820
  *
@@ -1690,6 +1690,12 @@ export declare class DrawLayer {
1690
1690
  * @param {object} exeCallback The undo stack callback.
1691
1691
  */
1692
1692
  setAnnotationGroup(annotationGroup: AnnotationGroup, dataId: string, exeCallback: object): void;
1693
+ /**
1694
+ * Activate shapes at current position.
1695
+ *
1696
+ * @param {boolean} flag The flag to activate or not.
1697
+ */
1698
+ activateCurrentPositionShapes(flag: boolean): void;
1693
1699
  /**
1694
1700
  * Fit the layer to its parent container.
1695
1701
  *
@@ -1721,6 +1727,13 @@ export declare class DrawLayer {
1721
1727
  * will toggle visibility if not defined.
1722
1728
  */
1723
1729
  setLabelsVisibility(visible?: boolean): void;
1730
+ /**
1731
+ * Set a shape group label visibility according to
1732
+ * this layer setting.
1733
+ *
1734
+ * @param {Konva.Group} shapeGroup The shape group.
1735
+ */
1736
+ setLabelVisibility(shapeGroup: Konva.Group): void;
1724
1737
  /**
1725
1738
  * Delete a Draw from the stage.
1726
1739
  *
@@ -1757,29 +1770,23 @@ export declare class DrawLayer {
1757
1770
  * Set the current position.
1758
1771
  *
1759
1772
  * @param {Point} position The new position.
1760
- * @param {Index} index The new index.
1773
+ * @param {Index} _index The new index.
1761
1774
  * @returns {boolean} True if the position was updated.
1762
1775
  */
1763
- setCurrentPosition(position: Point, index: Index): boolean;
1776
+ setCurrentPosition(position: Point, _index: Index): boolean;
1764
1777
  /**
1765
1778
  * Activate the current draw layer.
1766
1779
  *
1767
- * @param {Index} index The current position.
1780
+ * @param {Point} position The current position.
1768
1781
  * @param {number} scrollIndex The scroll index.
1769
1782
  */
1770
- activateDrawLayer(index: Index, scrollIndex: number): void;
1783
+ activateDrawLayer(position: Point, scrollIndex: number): void;
1771
1784
  /**
1772
1785
  * Get the current position group.
1773
1786
  *
1774
1787
  * @returns {Konva.Group|undefined} The Konva.Group.
1775
1788
  */
1776
1789
  getCurrentPosGroup(): Konva.Group | undefined;
1777
- /**
1778
- * Get the non current position groups. Used to stop listeners.
1779
- *
1780
- * @returns {object[]} The groups that do not have the current position id.
1781
- */
1782
- getNonCurrentPosGroup(): object[];
1783
1790
  /**
1784
1791
  * Get a Konva group using its id.
1785
1792
  *
@@ -2703,13 +2710,6 @@ export declare class Index {
2703
2710
  * @returns {Index} The new index.
2704
2711
  */
2705
2712
  getWithNew2D(i: number, j: number): Index;
2706
- /**
2707
- * Get a string id from the index values in the form of: '#0-1_#1-2'.
2708
- *
2709
- * @param {number[]} [dims] Optional list of dimensions to use.
2710
- * @returns {string} The string id.
2711
- */
2712
- toStringId(dims?: number[]): string;
2713
2713
  #private;
2714
2714
  }
2715
2715
 
@@ -3222,6 +3222,12 @@ export declare class MaskSegmentHelper {
3222
3222
  * @returns {boolean} True if the segment is included.
3223
3223
  */
3224
3224
  hasSegment(segmentNumber: number): boolean;
3225
+ /**
3226
+ * Get the number of segments of the segmentation.
3227
+ *
3228
+ * @returns {number} The number of segments.
3229
+ */
3230
+ getNumberOfSegments(): number;
3225
3231
  /**
3226
3232
  * Check if a segment is present in a mask image.
3227
3233
  *
@@ -4526,9 +4532,9 @@ export declare class View {
4526
4532
  * Get the image origin for a image UID.
4527
4533
  *
4528
4534
  * @param {string} uid The UID.
4529
- * @returns {Index|undefined} The origin index.
4535
+ * @returns {Point3D|undefined} The origin.
4530
4536
  */
4531
- getOriginIndexForImageUid(uid: string): Index | undefined;
4537
+ getOriginForImageUid(uid: string): Point3D | undefined;
4532
4538
  /**
4533
4539
  * Check if the current position (default) or
4534
4540
  * the provided position is in bounds.
@@ -4773,12 +4779,12 @@ export declare class ViewController {
4773
4779
  */
4774
4780
  getCurrentImageUid(): string;
4775
4781
  /**
4776
- * Get the image origin index for a image UID.
4782
+ * Get the image origin for a image UID.
4777
4783
  *
4778
4784
  * @param {string} uid The UID.
4779
- * @returns {Index|undefined} The origin index.
4785
+ * @returns {Point3D|undefined} The origin.
4780
4786
  */
4781
- getOriginIndexForImageUid(uid: string): Index | undefined;
4787
+ getOriginForImageUid(uid: string): Point3D | undefined;
4782
4788
  /**
4783
4789
  * Get the current oriented index.
4784
4790
  *