dwv 0.33.0-beta.41 → 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.
@@ -1992,15 +1991,15 @@ declare class Image_2 {
1992
1991
  /**
1993
1992
  * Get the data range.
1994
1993
  *
1995
- * @returns {object} The data range.
1994
+ * @returns {NumberRange} The data range.
1996
1995
  */
1997
- getDataRange(): object;
1996
+ getDataRange(): NumberRange;
1998
1997
  /**
1999
1998
  * Get the rescaled data range.
2000
1999
  *
2001
- * @returns {object} The rescaled data range.
2000
+ * @returns {NumberRange} The rescaled data range.
2002
2001
  */
2003
- getRescaledDataRange(): object;
2002
+ getRescaledDataRange(): NumberRange;
2004
2003
  /**
2005
2004
  * Get the histogram.
2006
2005
  *
@@ -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
  *
@@ -2907,6 +2925,25 @@ export declare class Matrix33 {
2907
2925
  #private;
2908
2926
  }
2909
2927
 
2928
+ /**
2929
+ * Number range.
2930
+ */
2931
+ export declare class NumberRange {
2932
+ /**
2933
+ * @param {number} min The minimum.
2934
+ * @param {number} max The maximum.
2935
+ */
2936
+ constructor(min: number, max: number);
2937
+ /**
2938
+ * @type {number}
2939
+ */
2940
+ min: number;
2941
+ /**
2942
+ * @type {number}
2943
+ */
2944
+ max: number;
2945
+ }
2946
+
2910
2947
  export declare namespace Orientation {
2911
2948
  let Axial: string;
2912
2949
  let Coronal: string;
@@ -3904,7 +3941,7 @@ export declare class View {
3904
3941
  */
3905
3942
  init(): void;
3906
3943
  /**
3907
- * Set the initial index to 0.
3944
+ * Set the initial index to the middle position.
3908
3945
  */
3909
3946
  setInitialIndex(): void;
3910
3947
  /**
@@ -4303,10 +4340,10 @@ export declare class ViewController {
4303
4340
  /**
4304
4341
  * Get some values from the associated image in variable regions.
4305
4342
  *
4306
- * @param {Array} regions A list of regions.
4343
+ * @param {number[][][]} regions A list of [x, y] pairs (min, max).
4307
4344
  * @returns {Array} A list of values.
4308
4345
  */
4309
- getImageVariableRegionValues(regions: any[]): any[];
4346
+ getImageVariableRegionValues(regions: number[][][]): any[];
4310
4347
  /**
4311
4348
  * Can the image values be quantified?
4312
4349
  *
@@ -4526,6 +4563,18 @@ export declare class ViewController {
4526
4563
  * @param {alphaFn} func The function.
4527
4564
  */
4528
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;
4529
4578
  /**
4530
4579
  * Add an event listener to this class.
4531
4580
  *
@@ -4604,6 +4653,14 @@ export declare class ViewLayer {
4604
4653
  * @function
4605
4654
  */
4606
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;
4607
4664
  /**
4608
4665
  * Handle an image content change event.
4609
4666
  *
@@ -4624,6 +4681,10 @@ export declare class ViewLayer {
4624
4681
  * @returns {string} The string id.
4625
4682
  */
4626
4683
  getId(): string;
4684
+ /**
4685
+ * Remove the HTML element from the DOM.
4686
+ */
4687
+ removeFromDOM(): void;
4627
4688
  /**
4628
4689
  * Get the layer base size (without scale).
4629
4690
  *