dwv 0.33.0-beta.42 → 0.33.0-beta.43

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
@@ -41,12 +41,6 @@ export declare class App {
41
41
  * @returns {Image|undefined} The associated image.
42
42
  */
43
43
  getImage(dataId: string): Image_2 | undefined;
44
- /**
45
- * Get the last loaded image.
46
- *
47
- * @returns {Image|undefined} The image.
48
- */
49
- getLastImage(): Image_2 | undefined;
50
44
  /**
51
45
  * Set the image at the given id.
52
46
  *
@@ -54,12 +48,6 @@ export declare class App {
54
48
  * @param {Image} img The associated image.
55
49
  */
56
50
  setImage(dataId: string, img: Image_2): void;
57
- /**
58
- * Set the last image.
59
- *
60
- * @param {Image} img The associated image.
61
- */
62
- setLastImage(img: Image_2): void;
63
51
  /**
64
52
  * Add a new image.
65
53
  *
@@ -600,6 +588,12 @@ export declare class AppOptions {
600
588
  * @type {object|undefined}
601
589
  */
602
590
  overlayConfig: object | undefined;
591
+ /**
592
+ * DOM root document.
593
+ *
594
+ * @type {DocumentFragment}
595
+ */
596
+ rootDocument: DocumentFragment;
603
597
  }
604
598
 
605
599
  export declare namespace BLACK {
@@ -1246,6 +1240,10 @@ export declare class DrawLayer {
1246
1240
  * @returns {string} The string id.
1247
1241
  */
1248
1242
  getId(): string;
1243
+ /**
1244
+ * Remove the HTML element from the DOM.
1245
+ */
1246
+ removeFromDOM(): void;
1249
1247
  /**
1250
1248
  * Get the layer base size (without scale).
1251
1249
  *
@@ -1678,9 +1676,10 @@ export declare function getMousePoint(event: object): Point2D;
1678
1676
  * Get the name of an image orientation patient.
1679
1677
  *
1680
1678
  * @param {number[]} orientation The image orientation patient.
1681
- * @returns {string} The orientation name: axial, coronal or sagittal.
1679
+ * @returns {string|undefined} The orientation
1680
+ * name: axial, coronal or sagittal.
1682
1681
  */
1683
- export declare function getOrientationName(orientation: number[]): string;
1682
+ export declare function getOrientationName(orientation: number[]): string | undefined;
1684
1683
 
1685
1684
  /**
1686
1685
  * Get the PixelData Tag.
@@ -2333,6 +2332,14 @@ export declare class LayerGroup {
2333
2332
  * @returns {number} The number of layers.
2334
2333
  */
2335
2334
  getNumberOfLayers(): number;
2335
+ /**
2336
+ * Check if this layerGroup contains a layer with the input id.
2337
+ *
2338
+ * @param {string} id The layer id to look for.
2339
+ * @returns {boolean} True if this group contains
2340
+ * a layer with the input id.
2341
+ */
2342
+ includes(id: string): boolean;
2336
2343
  /**
2337
2344
  * Get the number of view layers handled by this class.
2338
2345
  *
@@ -2439,6 +2446,17 @@ export declare class LayerGroup {
2439
2446
  * @param {ViewLayer | DrawLayer} layer The layer to remove.
2440
2447
  */
2441
2448
  removeLayer(layer: ViewLayer | DrawLayer): void;
2449
+ /**
2450
+ * Displays a tooltip in a temporary `span`.
2451
+ * Works with css to hide/show the span only on mouse hover.
2452
+ *
2453
+ * @param {Point2D} point The update point.
2454
+ */
2455
+ showTooltip(point: Point2D): void;
2456
+ /**
2457
+ * Remove the tooltip html div.
2458
+ */
2459
+ removeTooltipDiv(): void;
2442
2460
  /**
2443
2461
  * Test if one of the view layers satisfies an input callbackFn.
2444
2462
  *
@@ -4545,6 +4563,18 @@ export declare class ViewController {
4545
4563
  * @param {alphaFn} func The function.
4546
4564
  */
4547
4565
  setViewAlphaFunction(func: (value: number[] | number, index: number) => number): void;
4566
+ /**
4567
+ * Bind the view image to the provided layer.
4568
+ *
4569
+ * @param {ViewLayer} viewLayer The layer to bind.
4570
+ */
4571
+ bindImageAndLayer(viewLayer: ViewLayer): void;
4572
+ /**
4573
+ * Unbind the view image to the provided layer.
4574
+ *
4575
+ * @param {ViewLayer} viewLayer The layer to bind.
4576
+ */
4577
+ unbindImageAndLayer(viewLayer: ViewLayer): void;
4548
4578
  /**
4549
4579
  * Add an event listener to this class.
4550
4580
  *
@@ -4623,6 +4653,14 @@ export declare class ViewLayer {
4623
4653
  * @function
4624
4654
  */
4625
4655
  onimageset: (event: object) => void;
4656
+ /**
4657
+ * Bind this layer to the view image.
4658
+ */
4659
+ bindImage(): void;
4660
+ /**
4661
+ * Unbind this layer to the view image.
4662
+ */
4663
+ unbindImage(): void;
4626
4664
  /**
4627
4665
  * Handle an image content change event.
4628
4666
  *
@@ -4643,6 +4681,10 @@ export declare class ViewLayer {
4643
4681
  * @returns {string} The string id.
4644
4682
  */
4645
4683
  getId(): string;
4684
+ /**
4685
+ * Remove the HTML element from the DOM.
4686
+ */
4687
+ removeFromDOM(): void;
4646
4688
  /**
4647
4689
  * Get the layer base size (without scale).
4648
4690
  *