dwv 0.33.0-beta.16 → 0.33.0-beta.18

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
@@ -70,9 +70,11 @@ export declare class App {
70
70
  * Get the meta data.
71
71
  *
72
72
  * @param {string} dataId The data id.
73
- * @returns {object|undefined} The list of meta data.
73
+ * @returns {Object<string, DataElement>|undefined} The list of meta data.
74
74
  */
75
- getMetaData(dataId: string): object | undefined;
75
+ getMetaData(dataId: string): {
76
+ [x: string]: DataElement;
77
+ } | undefined;
76
78
  /**
77
79
  * Get the list of ids in the data storage.
78
80
  *
@@ -87,31 +89,34 @@ export declare class App {
87
89
  */
88
90
  getDataIdsFromSopUids(uids: string[]): string[];
89
91
  /**
90
- * Can the data be scrolled?
92
+ * Can the data (of the active view of the active layer) be scrolled?
91
93
  *
92
94
  * @returns {boolean} True if the data has a third dimension greater than one.
95
+ * @deprecated Please use the ViewController equivalent directly instead.
93
96
  */
94
97
  canScroll(): boolean;
95
98
  /**
96
- * Can window and level be applied to the data?
99
+ * Can window and level be applied to the data
100
+ * (of the active view of the active layer)?
97
101
  *
98
102
  * @returns {boolean} True if the data is monochrome.
103
+ * @deprecated Please use the ViewController equivalent directly instead.
99
104
  */
100
105
  canWindowLevel(): boolean;
101
106
  /**
102
- * Get the layer scale on top of the base scale.
107
+ * Get the active layer group scale on top of the base scale.
103
108
  *
104
109
  * @returns {object} The scale as {x,y}.
105
110
  */
106
111
  getAddedScale(): object;
107
112
  /**
108
- * Get the base scale.
113
+ * Get the base scale of the active layer group.
109
114
  *
110
115
  * @returns {object} The scale as {x,y}.
111
116
  */
112
117
  getBaseScale(): object;
113
118
  /**
114
- * Get the layer offset.
119
+ * Get the layer offset of the active layer group.
115
120
  *
116
121
  * @returns {object} The offset.
117
122
  */
@@ -299,6 +304,9 @@ export declare class App {
299
304
  fitToContainer(): void;
300
305
  /**
301
306
  * Init the Window/Level display
307
+ * (of the active layer of the active layer group).
308
+ *
309
+ * @deprecated Please set the opacity of the desired view layer directly.
302
310
  */
303
311
  initWLDisplay(): void;
304
312
  /**
@@ -382,7 +390,7 @@ export declare class App {
382
390
  */
383
391
  render(dataId: string, viewConfigs?: ViewConfig[]): void;
384
392
  /**
385
- * Zoom to the layers.
393
+ * Zoom the layers of the active layer group.
386
394
  *
387
395
  * @param {number} step The step to add to the current zoom.
388
396
  * @param {number} cx The zoom center X coordinate.
@@ -390,20 +398,21 @@ export declare class App {
390
398
  */
391
399
  zoom(step: number, cx: number, cy: number): void;
392
400
  /**
393
- * Apply a translation to the layers.
401
+ * Apply a translation to the layers of the active layer group.
394
402
  *
395
403
  * @param {number} tx The translation along X.
396
404
  * @param {number} ty The translation along Y.
397
405
  */
398
406
  translate(tx: number, ty: number): void;
399
407
  /**
400
- * Set the image layer opacity.
408
+ * Set the active view layer (of the active layer group) opacity.
401
409
  *
402
410
  * @param {number} alpha The opacity ([0:1] range).
411
+ * @deprecated Please set the opacity of the desired view layer directly.
403
412
  */
404
413
  setOpacity(alpha: number): void;
405
414
  /**
406
- * Set the drawings on the current stage.
415
+ * Set the drawings of the active layer group.
407
416
  *
408
417
  * @param {Array} drawings An array of drawings.
409
418
  * @param {Array} drawingsDetails An array of drawings details.
@@ -445,6 +454,7 @@ export declare class App {
445
454
  * - CRTL-ARROW_UP: next element on third dim
446
455
  * - CRTL-ARROW_RIGHT: previous element on fourth dim
447
456
  * - CRTL-ARROW_DOWN: previous element on third dim
457
+ * (applies to the active view of the active layer group)
448
458
  *
449
459
  * @param {KeyboardEvent} event The key down event.
450
460
  * @fires UndoStack#undo
@@ -461,17 +471,19 @@ export declare class App {
461
471
  */
462
472
  resetZoom(): void;
463
473
  /**
464
- * Set the colour map.
474
+ * Set the colour map of the active view of the active layer group.
465
475
  *
466
476
  * @param {string} name The colour map name.
477
+ * @deprecated Please use the ViewController equivalent directly instead.
467
478
  */
468
479
  setColourMap(name: string): void;
469
480
  /**
470
- * Set the window/level preset.
481
+ * Set the window/level preset of the active view of the active layer group.
471
482
  *
472
- * @param {object} preset The window/level preset.
483
+ * @param {string} preset The window/level preset.
484
+ * @deprecated Please use the ViewController equivalent directly instead.
473
485
  */
474
- setWindowLevelPreset(preset: object): void;
486
+ setWindowLevelPreset(preset: string): void;
475
487
  /**
476
488
  * Set the tool
477
489
  *
@@ -626,27 +638,33 @@ export declare class ColourMap {
626
638
  /**
627
639
  * Create an Image from DICOM elements.
628
640
  *
629
- * @param {object} elements The DICOM elements.
641
+ * @param {Object<string, DataElement>} elements The DICOM elements.
630
642
  * @returns {Image} The Image object.
631
643
  */
632
- export declare function createImage(elements: object): Image_2;
644
+ export declare function createImage(elements: {
645
+ [x: string]: DataElement;
646
+ }): Image_2;
633
647
 
634
648
  /**
635
649
  * Create a mask Image from DICOM elements.
636
650
  *
637
- * @param {object} elements The DICOM elements.
651
+ * @param {Object<string, DataElement>} elements The DICOM elements.
638
652
  * @returns {Image} The mask Image object.
639
653
  */
640
- export declare function createMaskImage(elements: object): Image_2;
654
+ export declare function createMaskImage(elements: {
655
+ [x: string]: DataElement;
656
+ }): Image_2;
641
657
 
642
658
  /**
643
659
  * Create a View from DICOM elements and image.
644
660
  *
645
- * @param {object} elements The DICOM elements.
661
+ * @param {Object<string, DataElement>} elements The DICOM elements.
646
662
  * @param {Image} image The associated image.
647
663
  * @returns {View} The View object.
648
664
  */
649
- export declare function createView(elements: object, image: Image_2): View;
665
+ export declare function createView(elements: {
666
+ [x: string]: DataElement;
667
+ }, image: Image_2): View;
650
668
 
651
669
  export declare namespace customUI {
652
670
  /**
@@ -716,10 +734,6 @@ export declare class DataElement {
716
734
  items: any[];
717
735
  }
718
736
 
719
- declare type DataElements = {
720
- [x: string]: DataElement;
721
- };
722
-
723
737
  /**
724
738
  * Decoder scripts to be passed to web workers for image decoding.
725
739
  */
@@ -749,6 +763,46 @@ export declare namespace defaults {
749
763
  };
750
764
  }
751
765
 
766
+ /**
767
+ * DICOM code.
768
+ */
769
+ export declare class DicomCode {
770
+ /**
771
+ * @param {string} meaning The code meaning.
772
+ */
773
+ constructor(meaning: string);
774
+ /**
775
+ * Code meaning (0008,0104).
776
+ *
777
+ * @type {string}
778
+ */
779
+ meaning: string;
780
+ /**
781
+ * Code value (0008,0100).
782
+ *
783
+ * @type {string|undefined}
784
+ */
785
+ value: string | undefined;
786
+ /**
787
+ * Long code value (0008,0119).
788
+ *
789
+ * @type {string|undefined}
790
+ */
791
+ longValue: string | undefined;
792
+ /**
793
+ * URN code value (0008,0120).
794
+ *
795
+ * @type {string|undefined}
796
+ */
797
+ urnValue: string | undefined;
798
+ /**
799
+ * Coding scheme designator (0008,0102).
800
+ *
801
+ * @type {string|undefined}
802
+ */
803
+ schemeDesignator: string | undefined;
804
+ }
805
+
752
806
  /**
753
807
  * DicomParser class.
754
808
  *
@@ -1454,16 +1508,16 @@ export declare function getDefaultDicomSegJson(): object;
1454
1508
  export declare function getDwvVersion(): string;
1455
1509
 
1456
1510
  /**
1457
- * Get the DICOM elements from a 'simple' DICOM json tags object.
1458
- * The json is a simplified version of the oficial DICOM json with
1511
+ * Get the DICOM elements from a 'simple' DICOM tags object.
1512
+ * The input object is a simplified version of the oficial DICOM json with
1459
1513
  * tag names instead of keys and direct values (no value property) for
1460
1514
  * simple tags. See synthetic test data (in tests/dicom) for examples.
1461
1515
  *
1462
- * @param {Object<string, any>} jsonTags The DICOM
1463
- * json tags object.
1516
+ * @param {Object<string, any>} simpleTags The 'simple' DICOM
1517
+ * tags object.
1464
1518
  * @returns {Object<string, DataElement>} The DICOM elements.
1465
1519
  */
1466
- export declare function getElementsFromJSONTags(jsonTags: {
1520
+ export declare function getElementsFromJSONTags(simpleTags: {
1467
1521
  [x: string]: any;
1468
1522
  }): {
1469
1523
  [x: string]: DataElement;
@@ -1647,8 +1701,15 @@ declare class Image_2 {
1647
1701
  * Can window and level be applied to the data?
1648
1702
  *
1649
1703
  * @returns {boolean} True if the data is monochrome.
1704
+ * @deprecated Please use isMonochrome instead.
1650
1705
  */
1651
1706
  canWindowLevel(): boolean;
1707
+ /**
1708
+ * Is the data monochrome.
1709
+ *
1710
+ * @returns {boolean} True if the data is monochrome.
1711
+ */
1712
+ isMonochrome(): boolean;
1652
1713
  /**
1653
1714
  * Can the data be scrolled?
1654
1715
  *
@@ -1725,15 +1786,19 @@ declare class Image_2 {
1725
1786
  /**
1726
1787
  * Get the meta information of the image.
1727
1788
  *
1728
- * @returns {object} The meta information of the image.
1789
+ * @returns {Object<string, any>} The meta information of the image.
1729
1790
  */
1730
- getMeta(): object;
1791
+ getMeta(): {
1792
+ [x: string]: any;
1793
+ };
1731
1794
  /**
1732
1795
  * Set the meta information of the image.
1733
1796
  *
1734
- * @param {object} rhs The meta information of the image.
1797
+ * @param {Object<string, any>} rhs The meta information of the image.
1735
1798
  */
1736
- setMeta(rhs: object): void;
1799
+ setMeta(rhs: {
1800
+ [x: string]: any;
1801
+ }): void;
1737
1802
  /**
1738
1803
  * Get value at offset. Warning: No size check...
1739
1804
  *
@@ -2334,13 +2399,184 @@ export declare class MaskFactory {
2334
2399
  /**
2335
2400
  * Get an {@link Image} object from the read DICOM file.
2336
2401
  *
2337
- * @param {DataElements} dataElements The DICOM tags.
2402
+ * @param {Object<string, DataElement>} dataElements The DICOM tags.
2338
2403
  * @param {Uint8Array | Int8Array |
2339
2404
  * Uint16Array | Int16Array |
2340
2405
  * Uint32Array | Int32Array} pixelBuffer The pixel buffer.
2341
2406
  * @returns {Image} A new Image.
2342
2407
  */
2343
- create(dataElements: DataElements, pixelBuffer: Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array): Image_2;
2408
+ create(dataElements: {
2409
+ [x: string]: DataElement;
2410
+ }, pixelBuffer: Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array): Image_2;
2411
+ }
2412
+
2413
+ /**
2414
+ * DICOM (mask) segment.
2415
+ */
2416
+ export declare class MaskSegment {
2417
+ /**
2418
+ * @param {number} number The segment number.
2419
+ * @param {string} label The segment label.
2420
+ * @param {string} algorithmType The segment number.
2421
+ */
2422
+ constructor(number: number, label: string, algorithmType: string);
2423
+ /**
2424
+ * Segment number (0062,0004).
2425
+ *
2426
+ * @type {number}
2427
+ */
2428
+ number: number;
2429
+ /**
2430
+ * Segment label (0062,0005).
2431
+ *
2432
+ * @type {string}
2433
+ */
2434
+ label: string;
2435
+ /**
2436
+ * Segment algorithm type (0062,0008).
2437
+ *
2438
+ * @type {string}
2439
+ */
2440
+ algorithmType: string;
2441
+ /**
2442
+ * Segment algorithm name (0062,0009).
2443
+ *
2444
+ * @type {string|undefined}
2445
+ */
2446
+ algorithmName: string | undefined;
2447
+ /**
2448
+ * Segment display value as simple value.
2449
+ *
2450
+ * @type {number|undefined}
2451
+ */
2452
+ displayValue: number | undefined;
2453
+ /**
2454
+ * Segment display value as RGB colour ({r,g,b}).
2455
+ *
2456
+ * @type {RGB|undefined}
2457
+ */
2458
+ displayRGBValue: RGB | undefined;
2459
+ /**
2460
+ * Segment property code: specific property
2461
+ * the segment represents (0062,000F).
2462
+ *
2463
+ * @type {DicomCode|undefined}
2464
+ */
2465
+ propertyTypeCode: DicomCode | undefined;
2466
+ /**
2467
+ * Segment property category code: general category
2468
+ * of the property the segment represents (0062,0003).
2469
+ *
2470
+ * @type {DicomCode|undefined}
2471
+ */
2472
+ propertyCategoryCode: DicomCode | undefined;
2473
+ /**
2474
+ * Segment tracking UID (0062,0021).
2475
+ *
2476
+ * @type {string|undefined}
2477
+ */
2478
+ trackingUid: string | undefined;
2479
+ /**
2480
+ * Segment tracking id: text label for the UID (0062,0020).
2481
+ *
2482
+ * @type {string|undefined}
2483
+ */
2484
+ trackingId: string | undefined;
2485
+ }
2486
+
2487
+ /**
2488
+ * Mask segment helper.
2489
+ */
2490
+ export declare class MaskSegmentHelper {
2491
+ /**
2492
+ * @param {Image} mask The associated mask image.
2493
+ */
2494
+ constructor(mask: Image_2);
2495
+ /**
2496
+ * Check if a segment is part of the inner segment list.
2497
+ *
2498
+ * @param {number} segmentNumber The segment number.
2499
+ * @returns {boolean} True if the segment is included.
2500
+ */
2501
+ hasSegment(segmentNumber: number): boolean;
2502
+ /**
2503
+ * Check if a segment is present in a mask image.
2504
+ *
2505
+ * @param {number[]} numbers Array of segment numbers.
2506
+ * @returns {boolean[]} Array of boolean set to true
2507
+ * if the segment is present in the mask.
2508
+ */
2509
+ maskHasSegments(numbers: number[]): boolean[];
2510
+ /**
2511
+ * Get a segment from the inner segment list.
2512
+ *
2513
+ * @param {number} segmentNumber The segment number.
2514
+ * @returns {MaskSegment|undefined} The segment.
2515
+ */
2516
+ getSegment(segmentNumber: number): MaskSegment | undefined;
2517
+ /**
2518
+ * Get the inner segment list.
2519
+ *
2520
+ * @returns {MaskSegment[]} The list of segments.
2521
+ */
2522
+ getSegments(): MaskSegment[];
2523
+ /**
2524
+ * Set the inner segment list.
2525
+ *
2526
+ * @param {MaskSegment[]} list The segment list.
2527
+ */
2528
+ setSegments(list: MaskSegment[]): void;
2529
+ /**
2530
+ * Set the hidden segment list.
2531
+ * TODO: not sure if needed...
2532
+ *
2533
+ * @param {number[]} list The list of hidden segment numbers.
2534
+ */
2535
+ setHiddenSegments(list: number[]): void;
2536
+ /**
2537
+ * Check if a segment is in the hidden list.
2538
+ *
2539
+ * @param {number} segmentNumber The segment number.
2540
+ * @returns {boolean} True if the segment is in the list.
2541
+ */
2542
+ isHidden(segmentNumber: number): boolean;
2543
+ /**
2544
+ * Add a segment to the hidden list.
2545
+ *
2546
+ * @param {number} segmentNumber The segment number.
2547
+ */
2548
+ addToHidden(segmentNumber: number): void;
2549
+ /**
2550
+ * Remove a segment from the hidden list.
2551
+ *
2552
+ * @param {number} segmentNumber The segment number.
2553
+ */
2554
+ removeFromHidden(segmentNumber: number): void;
2555
+ /**
2556
+ * @callback alphaFn@callback alphaFn
2557
+ * @param {number[]|number} value The pixel value.
2558
+ * @param {number} index The values' index.
2559
+ * @returns {number} The opacity of the input value.
2560
+ */
2561
+ /**
2562
+ * Get the alpha function to apply hidden colors.
2563
+ *
2564
+ * @returns {alphaFn} The corresponding alpha function.
2565
+ */
2566
+ getAlphaFunc(): (value: number[] | number, index: number) => number;
2567
+ /**
2568
+ * @callback eventFn@callback eventFn
2569
+ * @param {object} event The event.
2570
+ */
2571
+ /**
2572
+ * Delete a segment.
2573
+ *
2574
+ * @param {number} segmentNumber The segment number.
2575
+ * @param {eventFn} cmdCallback The command event callback.
2576
+ * @param {Function} exeCallback The post execution callback.
2577
+ */
2578
+ deleteSegment(segmentNumber: number, cmdCallback: (event: object) => any, exeCallback: Function): void;
2579
+ #private;
2344
2580
  }
2345
2581
 
2346
2582
  /**
@@ -2504,6 +2740,101 @@ export declare class OverlayData {
2504
2740
  #private;
2505
2741
  }
2506
2742
 
2743
+ /**
2744
+ * Plane geometry helper.
2745
+ */
2746
+ export declare class PlaneHelper {
2747
+ /**
2748
+ * @param {Spacing} spacing The spacing.
2749
+ * @param {Matrix33} imageOrientation The image oientation.
2750
+ * @param {Matrix33} viewOrientation The view orientation.
2751
+ */
2752
+ constructor(spacing: Spacing, imageOrientation: Matrix33, viewOrientation: Matrix33);
2753
+ /**
2754
+ * Get a 3D offset from a plane one.
2755
+ *
2756
+ * @param {object} offset2D The plane offset as {x,y}.
2757
+ * @returns {Vector3D} The 3D world offset.
2758
+ */
2759
+ getOffset3DFromPlaneOffset(offset2D: object): Vector3D;
2760
+ /**
2761
+ * Get a plane offset from a 3D one.
2762
+ *
2763
+ * @param {object} offset3D The 3D offset as {x,y,z}.
2764
+ * @returns {object} The plane offset as {x,y}.
2765
+ */
2766
+ getPlaneOffsetFromOffset3D(offset3D: object): object;
2767
+ /**
2768
+ * Orient an input vector from real to target space.
2769
+ *
2770
+ * @param {Vector3D} vector The input vector.
2771
+ * @returns {Vector3D} The oriented vector.
2772
+ */
2773
+ getTargetOrientedVector3D(vector: Vector3D): Vector3D;
2774
+ /**
2775
+ * De-orient an input vector from target to real space.
2776
+ *
2777
+ * @param {Vector3D} planeVector The input vector.
2778
+ * @returns {Vector3D} The de-orienteded vector.
2779
+ */
2780
+ getTargetDeOrientedVector3D(planeVector: Vector3D): Vector3D;
2781
+ /**
2782
+ * De-orient an input point from target to real space.
2783
+ *
2784
+ * @param {Point3D} planePoint The input point.
2785
+ * @returns {Point3D} The de-orienteded point.
2786
+ */
2787
+ getTargetDeOrientedPoint3D(planePoint: Point3D): Point3D;
2788
+ /**
2789
+ * Orient an input vector from target to image space.
2790
+ *
2791
+ * @param {Vector3D} planeVector The input vector.
2792
+ * @returns {Vector3D} The orienteded vector.
2793
+ */
2794
+ getImageOrientedVector3D(planeVector: Vector3D): Vector3D;
2795
+ /**
2796
+ * Orient an input point from target to image space.
2797
+ *
2798
+ * @param {Point3D} planePoint The input vector.
2799
+ * @returns {Point3D} The orienteded vector.
2800
+ */
2801
+ getImageOrientedPoint3D(planePoint: Point3D): Point3D;
2802
+ /**
2803
+ * De-orient an input vector from image to target space.
2804
+ *
2805
+ * @param {Vector3D} vector The input vector.
2806
+ * @returns {Vector3D} The de-orienteded vector.
2807
+ */
2808
+ getImageDeOrientedVector3D(vector: Vector3D): Vector3D;
2809
+ /**
2810
+ * De-orient an input point from image to target space.
2811
+ *
2812
+ * @param {Point3D} point The input point.
2813
+ * @returns {Point3D} The de-orienteded point.
2814
+ */
2815
+ getImageDeOrientedPoint3D(point: Point3D): Point3D;
2816
+ /**
2817
+ * Reorder values to follow target orientation.
2818
+ *
2819
+ * @param {object} values Values as {x,y,z}.
2820
+ * @returns {object} Reoriented values as {x,y,z}.
2821
+ */
2822
+ getTargetOrientedPositiveXYZ(values: object): object;
2823
+ /**
2824
+ * Get the (view) scroll dimension index.
2825
+ *
2826
+ * @returns {number} The index.
2827
+ */
2828
+ getScrollIndex(): number;
2829
+ /**
2830
+ * Get the native (image) scroll dimension index.
2831
+ *
2832
+ * @returns {number} The index.
2833
+ */
2834
+ getNativeScrollIndex(): number;
2835
+ #private;
2836
+ }
2837
+
2507
2838
  /**
2508
2839
  * Immutable point.
2509
2840
  * Warning: the input array is NOT cloned, modifying it will
@@ -2757,6 +3088,36 @@ export declare class RescaleSlopeAndIntercept {
2757
3088
  #private;
2758
3089
  }
2759
3090
 
3091
+ /**
3092
+ * RGB colour class.
3093
+ */
3094
+ export declare class RGB {
3095
+ /**
3096
+ * @param {number} r Red component.
3097
+ * @param {number} g Green component.
3098
+ * @param {number} b Blue component.
3099
+ */
3100
+ constructor(r: number, g: number, b: number);
3101
+ /**
3102
+ * Red component.
3103
+ *
3104
+ * @type {number}
3105
+ */
3106
+ r: number;
3107
+ /**
3108
+ * Green component.
3109
+ *
3110
+ * @type {number}
3111
+ */
3112
+ g: number;
3113
+ /**
3114
+ * Blue component.
3115
+ *
3116
+ * @type {number}
3117
+ */
3118
+ b: number;
3119
+ }
3120
+
2760
3121
  /**
2761
3122
  * Immutable Size class.
2762
3123
  * Warning: the input array is NOT cloned, modifying it will
@@ -2922,10 +3283,10 @@ export declare class Spacing {
2922
3283
  /**
2923
3284
  * Convert sRGB to CIE LAB (standard illuminant D65).
2924
3285
  *
2925
- * @param {object} triplet sRGB triplet as {r,g,b}.
3286
+ * @param {RGB} triplet sRGB triplet as {r,g,b}.
2926
3287
  * @returns {object} CIE LAB triplet as {l,a,b}.
2927
3288
  */
2928
- export declare function srgbToCielab(triplet: object): object;
3289
+ export declare function srgbToCielab(triplet: RGB): object;
2929
3290
 
2930
3291
  /**
2931
3292
  * Immutable tag.
@@ -3267,23 +3628,23 @@ export declare class View {
3267
3628
  getPlaybackMilliseconds(recommendedDisplayFrameRate: number): number;
3268
3629
  /**
3269
3630
  * @callback alphaFn@callback alphaFn
3270
- * @param {object} value The pixel value.
3271
- * @param {object} index The values' index.
3272
- * @returns {number} The value to display.
3631
+ * @param {number[]|number} value The pixel value.
3632
+ * @param {number} index The values' index.
3633
+ * @returns {number} The opacity of the input value.
3273
3634
  */
3274
3635
  /**
3275
3636
  * Get the alpha function.
3276
3637
  *
3277
3638
  * @returns {alphaFn} The function.
3278
3639
  */
3279
- getAlphaFunction(): (value: object, index: object) => number;
3640
+ getAlphaFunction(): (value: number[] | number, index: number) => number;
3280
3641
  /**
3281
3642
  * Set alpha function.
3282
3643
  *
3283
3644
  * @param {alphaFn} func The function.
3284
3645
  * @fires View#alphafuncchange
3285
3646
  */
3286
- setAlphaFunction(func: (value: object, index: object) => number): void;
3647
+ setAlphaFunction(func: (value: number[] | number, index: number) => number): void;
3287
3648
  /**
3288
3649
  * Get the window presets.
3289
3650
  *
@@ -3293,9 +3654,9 @@ export declare class View {
3293
3654
  /**
3294
3655
  * Get the window presets names.
3295
3656
  *
3296
- * @returns {object} The list of window presets names.
3657
+ * @returns {string[]} The list of window presets names.
3297
3658
  */
3298
- getWindowPresetsNames(): object;
3659
+ getWindowPresetsNames(): string[];
3299
3660
  /**
3300
3661
  * Set the window presets.
3301
3662
  *
@@ -3536,9 +3897,9 @@ export declare class ViewController {
3536
3897
  /**
3537
3898
  * Get the plane helper.
3538
3899
  *
3539
- * @returns {object} The helper.
3900
+ * @returns {PlaneHelper} The helper.
3540
3901
  */
3541
- getPlaneHelper(): object;
3902
+ getPlaneHelper(): PlaneHelper;
3542
3903
  /**
3543
3904
  * Check is the associated image is a mask.
3544
3905
  *
@@ -3548,9 +3909,9 @@ export declare class ViewController {
3548
3909
  /**
3549
3910
  * Get the mask segment helper.
3550
3911
  *
3551
- * @returns {object} The helper.
3912
+ * @returns {MaskSegmentHelper} The helper.
3552
3913
  */
3553
- getMaskSegmentHelper(): object;
3914
+ getMaskSegmentHelper(): MaskSegmentHelper;
3554
3915
  /**
3555
3916
  * Apply the hidden segments list by setting
3556
3917
  * the corresponding alpha function.
@@ -3576,9 +3937,9 @@ export declare class ViewController {
3576
3937
  /**
3577
3938
  * Get the window/level presets names.
3578
3939
  *
3579
- * @returns {Array} The presets names.
3940
+ * @returns {string[]} The presets names.
3580
3941
  */
3581
- getWindowLevelPresetsNames(): any[];
3942
+ getWindowLevelPresetsNames(): string[];
3582
3943
  /**
3583
3944
  * Add window/level presets to the view.
3584
3945
  *
@@ -3707,8 +4068,15 @@ export declare class ViewController {
3707
4068
  * Can window and level be applied to the data?
3708
4069
  *
3709
4070
  * @returns {boolean} True if possible.
4071
+ * @deprecated Please use isMonochrome instead.
3710
4072
  */
3711
4073
  canWindowLevel(): boolean;
4074
+ /**
4075
+ * Is the data monochrome.
4076
+ *
4077
+ * @returns {boolean} True if the data is monochrome.
4078
+ */
4079
+ isMonochrome(): boolean;
3712
4080
  /**
3713
4081
  * Can the data be scrolled?
3714
4082
  *
@@ -3865,16 +4233,16 @@ export declare class ViewController {
3865
4233
  setColourMap(name: string): void;
3866
4234
  /**
3867
4235
  * @callback alphaFn@callback alphaFn
3868
- * @param {object} value The pixel value.
3869
- * @param {object} index The values' index.
3870
- * @returns {number} The value to display.
4236
+ * @param {number[]|number} value The pixel value.
4237
+ * @param {number} index The values' index.
4238
+ * @returns {number} The opacity of the input value.
3871
4239
  */
3872
4240
  /**
3873
4241
  * Set the view per value alpha function.
3874
4242
  *
3875
4243
  * @param {alphaFn} func The function.
3876
4244
  */
3877
- setViewAlphaFunction(func: (value: object, index: object) => number): void;
4245
+ setViewAlphaFunction(func: (value: number[] | number, index: number) => number): void;
3878
4246
  /**
3879
4247
  * Add an event listener to this class.
3880
4248
  *