dwv 0.33.0-beta.17 → 0.33.0-beta.19
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 +109 -110
- package/dist/dwv.min.js +1 -1
- package/dist/dwv.min.js.map +1 -1
- package/package.json +1 -1
package/dist/dwv.d.ts
CHANGED
|
@@ -379,9 +379,9 @@ export declare class App {
|
|
|
379
379
|
/**
|
|
380
380
|
* Set the layer groups binders.
|
|
381
381
|
*
|
|
382
|
-
* @param {
|
|
382
|
+
* @param {string[]} list The list of binder names.
|
|
383
383
|
*/
|
|
384
|
-
setLayerGroupsBinders(list:
|
|
384
|
+
setLayerGroupsBinders(list: string[]): void;
|
|
385
385
|
/**
|
|
386
386
|
* Render the current data.
|
|
387
387
|
*
|
|
@@ -906,16 +906,20 @@ export declare class DicomWriter {
|
|
|
906
906
|
setUseUnVrForPrivateSq(flag: boolean): void;
|
|
907
907
|
/**
|
|
908
908
|
* Set the writing rules.
|
|
909
|
-
* List of writer rules indexed by either `default`,
|
|
909
|
+
* List of writer rules indexed by either `default`,
|
|
910
|
+
* tagKey, tagName or groupName.
|
|
910
911
|
* Each DICOM element will be checked to see if a rule is applicable.
|
|
911
|
-
* First checked by tagName and then by groupName,
|
|
912
|
+
* First checked by tagKey, tagName and then by groupName,
|
|
912
913
|
* if nothing is found the default rule is applied.
|
|
913
914
|
*
|
|
914
915
|
* @param {Object<string, WriterRule>} rules The input rules.
|
|
916
|
+
* @param {boolean} [addMissingTags] if true, explicit tags that
|
|
917
|
+
* have replace rule and a value will be
|
|
918
|
+
* added if missing. Defaults to false.
|
|
915
919
|
*/
|
|
916
920
|
setRules(rules: {
|
|
917
921
|
[x: string]: WriterRule;
|
|
918
|
-
}): void;
|
|
922
|
+
}, addMissingTags?: boolean): void;
|
|
919
923
|
/**
|
|
920
924
|
* Use a TextEncoder instead of the default text decoder.
|
|
921
925
|
*/
|
|
@@ -1508,16 +1512,16 @@ export declare function getDefaultDicomSegJson(): object;
|
|
|
1508
1512
|
export declare function getDwvVersion(): string;
|
|
1509
1513
|
|
|
1510
1514
|
/**
|
|
1511
|
-
* Get the DICOM elements from a 'simple' DICOM
|
|
1512
|
-
* The
|
|
1515
|
+
* Get the DICOM elements from a 'simple' DICOM tags object.
|
|
1516
|
+
* The input object is a simplified version of the oficial DICOM json with
|
|
1513
1517
|
* tag names instead of keys and direct values (no value property) for
|
|
1514
1518
|
* simple tags. See synthetic test data (in tests/dicom) for examples.
|
|
1515
1519
|
*
|
|
1516
|
-
* @param {Object<string, any>}
|
|
1517
|
-
*
|
|
1520
|
+
* @param {Object<string, any>} simpleTags The 'simple' DICOM
|
|
1521
|
+
* tags object.
|
|
1518
1522
|
* @returns {Object<string, DataElement>} The DICOM elements.
|
|
1519
1523
|
*/
|
|
1520
|
-
export declare function getElementsFromJSONTags(
|
|
1524
|
+
export declare function getElementsFromJSONTags(simpleTags: {
|
|
1521
1525
|
[x: string]: any;
|
|
1522
1526
|
}): {
|
|
1523
1527
|
[x: string]: DataElement;
|
|
@@ -1527,11 +1531,11 @@ export declare function getElementsFromJSONTags(jsonTags: {
|
|
|
1527
1531
|
* Get the indices that form a ellpise.
|
|
1528
1532
|
*
|
|
1529
1533
|
* @param {Index} center The ellipse center.
|
|
1530
|
-
* @param {
|
|
1531
|
-
* @param {
|
|
1532
|
-
* @returns {
|
|
1534
|
+
* @param {number[]} radius The 2 ellipse radiuses.
|
|
1535
|
+
* @param {number[]} dir The 2 ellipse directions.
|
|
1536
|
+
* @returns {Index[]} The indices of the ellipse.
|
|
1533
1537
|
*/
|
|
1534
|
-
export declare function getEllipseIndices(center: Index, radius:
|
|
1538
|
+
export declare function getEllipseIndices(center: Index, radius: number[], dir: number[]): Index[];
|
|
1535
1539
|
|
|
1536
1540
|
/**
|
|
1537
1541
|
* Get the layer details from a mouse event.
|
|
@@ -1546,10 +1550,10 @@ export declare function getLayerDetailsFromEvent(event: object): object;
|
|
|
1546
1550
|
/**
|
|
1547
1551
|
* Get the name of an image orientation patient.
|
|
1548
1552
|
*
|
|
1549
|
-
* @param {
|
|
1553
|
+
* @param {number[]} orientation The image orientation patient.
|
|
1550
1554
|
* @returns {string} The orientation name: axial, coronal or sagittal.
|
|
1551
1555
|
*/
|
|
1552
|
-
export declare function getOrientationName(orientation:
|
|
1556
|
+
export declare function getOrientationName(orientation: number[]): string;
|
|
1553
1557
|
|
|
1554
1558
|
/**
|
|
1555
1559
|
* Get the PixelData Tag.
|
|
@@ -1661,9 +1665,9 @@ declare class Image_2 {
|
|
|
1661
1665
|
/**
|
|
1662
1666
|
* @param {Geometry} geometry The geometry of the image.
|
|
1663
1667
|
* @param {TypedArray} buffer The image data as a one dimensional buffer.
|
|
1664
|
-
* @param {
|
|
1668
|
+
* @param {string[]} [imageUids] An array of Uids indexed to slice number.
|
|
1665
1669
|
*/
|
|
1666
|
-
constructor(geometry: Geometry, buffer: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, imageUids?:
|
|
1670
|
+
constructor(geometry: Geometry, buffer: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, imageUids?: string[]);
|
|
1667
1671
|
/**
|
|
1668
1672
|
* Get the image UID at a given index.
|
|
1669
1673
|
*
|
|
@@ -1786,15 +1790,19 @@ declare class Image_2 {
|
|
|
1786
1790
|
/**
|
|
1787
1791
|
* Get the meta information of the image.
|
|
1788
1792
|
*
|
|
1789
|
-
* @returns {
|
|
1793
|
+
* @returns {Object<string, any>} The meta information of the image.
|
|
1790
1794
|
*/
|
|
1791
|
-
getMeta():
|
|
1795
|
+
getMeta(): {
|
|
1796
|
+
[x: string]: any;
|
|
1797
|
+
};
|
|
1792
1798
|
/**
|
|
1793
1799
|
* Set the meta information of the image.
|
|
1794
1800
|
*
|
|
1795
|
-
* @param {
|
|
1801
|
+
* @param {Object<string, any>} rhs The meta information of the image.
|
|
1796
1802
|
*/
|
|
1797
|
-
setMeta(rhs:
|
|
1803
|
+
setMeta(rhs: {
|
|
1804
|
+
[x: string]: any;
|
|
1805
|
+
}): void;
|
|
1798
1806
|
/**
|
|
1799
1807
|
* Get value at offset. Warning: No size check...
|
|
1800
1808
|
*
|
|
@@ -1806,19 +1814,19 @@ declare class Image_2 {
|
|
|
1806
1814
|
* Get the offsets where the buffer equals the input value.
|
|
1807
1815
|
* Loops through the whole volume, can get long for big data...
|
|
1808
1816
|
*
|
|
1809
|
-
* @param {number|
|
|
1810
|
-
* @returns {
|
|
1817
|
+
* @param {number|RGB} value The value to check.
|
|
1818
|
+
* @returns {number[]} The list of offsets.
|
|
1811
1819
|
*/
|
|
1812
|
-
getOffsets(value: number |
|
|
1820
|
+
getOffsets(value: number | RGB): number[];
|
|
1813
1821
|
/**
|
|
1814
1822
|
* Check if the input values are in the buffer.
|
|
1815
1823
|
* Could loop through the whole volume, can get long for big data...
|
|
1816
1824
|
*
|
|
1817
1825
|
* @param {Array} values The values to check.
|
|
1818
|
-
* @returns {
|
|
1826
|
+
* @returns {boolean[]} A list of booleans for each input value,
|
|
1819
1827
|
* set to true if the value is present in the buffer.
|
|
1820
1828
|
*/
|
|
1821
|
-
hasValues(values: any[]):
|
|
1829
|
+
hasValues(values: any[]): boolean[];
|
|
1822
1830
|
/**
|
|
1823
1831
|
* Clone the image.
|
|
1824
1832
|
*
|
|
@@ -1882,29 +1890,31 @@ declare class Image_2 {
|
|
|
1882
1890
|
/**
|
|
1883
1891
|
* Set the inner buffer values at given offsets.
|
|
1884
1892
|
*
|
|
1885
|
-
* @param {
|
|
1886
|
-
* @param {
|
|
1893
|
+
* @param {number[]} offsets List of offsets where to set the data.
|
|
1894
|
+
* @param {number|RGB} value The value to set at the given offsets.
|
|
1887
1895
|
* @fires Image#imagechange
|
|
1888
1896
|
*/
|
|
1889
|
-
setAtOffsets(offsets:
|
|
1897
|
+
setAtOffsets(offsets: number[], value: number | RGB): void;
|
|
1890
1898
|
/**
|
|
1891
1899
|
* Set the inner buffer values at given offsets.
|
|
1892
1900
|
*
|
|
1893
|
-
* @param {
|
|
1894
|
-
*
|
|
1901
|
+
* @param {number[][]} offsetsLists List of offset lists where
|
|
1902
|
+
* to set the data.
|
|
1903
|
+
* @param {RGB} value The value to set at the given offsets.
|
|
1895
1904
|
* @returns {Array} A list of objects representing the original values before
|
|
1896
1905
|
* replacing them.
|
|
1897
1906
|
* @fires Image#imagechange
|
|
1898
1907
|
*/
|
|
1899
|
-
setAtOffsetsAndGetOriginals(offsetsLists:
|
|
1908
|
+
setAtOffsetsAndGetOriginals(offsetsLists: number[][], value: RGB): any[];
|
|
1900
1909
|
/**
|
|
1901
1910
|
* Set the inner buffer values at given offsets.
|
|
1902
1911
|
*
|
|
1903
|
-
* @param {
|
|
1912
|
+
* @param {number[][]} offsetsLists List of offset lists
|
|
1913
|
+
* where to set the data.
|
|
1904
1914
|
* @param {object|Array} value The value to set at the given offsets.
|
|
1905
1915
|
* @fires Image#imagechange
|
|
1906
1916
|
*/
|
|
1907
|
-
setAtOffsetsWithIterator(offsetsLists:
|
|
1917
|
+
setAtOffsetsWithIterator(offsetsLists: number[][], value: object | any[]): void;
|
|
1908
1918
|
/**
|
|
1909
1919
|
* Get the value of the image at a specific coordinate.
|
|
1910
1920
|
*
|
|
@@ -1976,20 +1986,20 @@ declare class Image_2 {
|
|
|
1976
1986
|
*
|
|
1977
1987
|
* Note: Uses raw buffer values.
|
|
1978
1988
|
*
|
|
1979
|
-
* @param {
|
|
1989
|
+
* @param {number[]} weights The weights of the 2D kernel as a 3x3 matrix.
|
|
1980
1990
|
* @returns {Image} The convoluted image.
|
|
1981
1991
|
*/
|
|
1982
|
-
convolute2D(weights:
|
|
1992
|
+
convolute2D(weights: number[]): Image_2;
|
|
1983
1993
|
/**
|
|
1984
1994
|
* Convolute an image buffer with a given 2D kernel.
|
|
1985
1995
|
*
|
|
1986
1996
|
* Note: Uses raw buffer values.
|
|
1987
1997
|
*
|
|
1988
|
-
* @param {
|
|
1998
|
+
* @param {number[]} weights The weights of the 2D kernel as a 3x3 matrix.
|
|
1989
1999
|
* @param {TypedArray} buffer The buffer to convolute.
|
|
1990
2000
|
* @param {number} startOffset The index to start at.
|
|
1991
2001
|
*/
|
|
1992
|
-
convoluteBuffer(weights:
|
|
2002
|
+
convoluteBuffer(weights: number[], buffer: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, startOffset: number): void;
|
|
1993
2003
|
/**
|
|
1994
2004
|
* Transform an image using a specific operator.
|
|
1995
2005
|
* WARNING: no size check!
|
|
@@ -2207,9 +2217,9 @@ export declare class LayerGroup {
|
|
|
2207
2217
|
/**
|
|
2208
2218
|
* Get the view layers data indices.
|
|
2209
2219
|
*
|
|
2210
|
-
* @returns {
|
|
2220
|
+
* @returns {string[]} The list of indices.
|
|
2211
2221
|
*/
|
|
2212
|
-
getViewDataIndices():
|
|
2222
|
+
getViewDataIndices(): string[];
|
|
2213
2223
|
/**
|
|
2214
2224
|
* Get the active draw layer.
|
|
2215
2225
|
*
|
|
@@ -2391,7 +2401,15 @@ export declare const luts: {
|
|
|
2391
2401
|
* Mask {@link Image} factory.
|
|
2392
2402
|
*/
|
|
2393
2403
|
export declare class MaskFactory {
|
|
2394
|
-
|
|
2404
|
+
/**
|
|
2405
|
+
* Check dicom elements. Throws an error if not suitable.
|
|
2406
|
+
*
|
|
2407
|
+
* @param {Object<string, DataElement>} _dicomElements The DICOM tags.
|
|
2408
|
+
* @returns {object|undefined} A possible warning.
|
|
2409
|
+
*/
|
|
2410
|
+
checkElements(_dicomElements: {
|
|
2411
|
+
[x: string]: DataElement;
|
|
2412
|
+
}): object | undefined;
|
|
2395
2413
|
/**
|
|
2396
2414
|
* Get an {@link Image} object from the read DICOM file.
|
|
2397
2415
|
*
|
|
@@ -2550,16 +2568,16 @@ export declare class MaskSegmentHelper {
|
|
|
2550
2568
|
removeFromHidden(segmentNumber: number): void;
|
|
2551
2569
|
/**
|
|
2552
2570
|
* @callback alphaFn@callback alphaFn
|
|
2553
|
-
* @param {
|
|
2554
|
-
* @param {
|
|
2555
|
-
* @returns {number} The
|
|
2571
|
+
* @param {number[]|number} value The pixel value.
|
|
2572
|
+
* @param {number} index The values' index.
|
|
2573
|
+
* @returns {number} The opacity of the input value.
|
|
2556
2574
|
*/
|
|
2557
2575
|
/**
|
|
2558
2576
|
* Get the alpha function to apply hidden colors.
|
|
2559
2577
|
*
|
|
2560
2578
|
* @returns {alphaFn} The corresponding alpha function.
|
|
2561
2579
|
*/
|
|
2562
|
-
getAlphaFunc(): (value:
|
|
2580
|
+
getAlphaFunc(): (value: number[] | number, index: number) => number;
|
|
2563
2581
|
/**
|
|
2564
2582
|
* @callback eventFn@callback eventFn
|
|
2565
2583
|
* @param {object} event The event.
|
|
@@ -2944,19 +2962,6 @@ export declare class Point2D {
|
|
|
2944
2962
|
* @returns {string} The point as a string.
|
|
2945
2963
|
*/
|
|
2946
2964
|
toString(): string;
|
|
2947
|
-
/**
|
|
2948
|
-
* Get the distance to another Point2D.
|
|
2949
|
-
*
|
|
2950
|
-
* @param {Point2D} point2D The input point.
|
|
2951
|
-
* @returns {number} The distance to the input point.
|
|
2952
|
-
*/
|
|
2953
|
-
getDistance(point2D: Point2D): number;
|
|
2954
|
-
/**
|
|
2955
|
-
* Round a Point2D.
|
|
2956
|
-
*
|
|
2957
|
-
* @returns {Point2D} The rounded point.
|
|
2958
|
-
*/
|
|
2959
|
-
getRound(): Point2D;
|
|
2960
2965
|
#private;
|
|
2961
2966
|
}
|
|
2962
2967
|
|
|
@@ -3121,9 +3126,9 @@ export declare class RGB {
|
|
|
3121
3126
|
*/
|
|
3122
3127
|
export declare class Size {
|
|
3123
3128
|
/**
|
|
3124
|
-
* @param {
|
|
3129
|
+
* @param {number[]} values The size values.
|
|
3125
3130
|
*/
|
|
3126
|
-
constructor(values:
|
|
3131
|
+
constructor(values: number[]);
|
|
3127
3132
|
/**
|
|
3128
3133
|
* Get the size value at the given array index.
|
|
3129
3134
|
*
|
|
@@ -3146,9 +3151,9 @@ export declare class Size {
|
|
|
3146
3151
|
/**
|
|
3147
3152
|
* Get the values of this index.
|
|
3148
3153
|
*
|
|
3149
|
-
* @returns {
|
|
3154
|
+
* @returns {number[]} The array of values.
|
|
3150
3155
|
*/
|
|
3151
|
-
getValues():
|
|
3156
|
+
getValues(): number[];
|
|
3152
3157
|
/**
|
|
3153
3158
|
* Check if a dimension exists and has more than one element.
|
|
3154
3159
|
*
|
|
@@ -3197,10 +3202,10 @@ export declare class Size {
|
|
|
3197
3202
|
* Check that an index is within bounds.
|
|
3198
3203
|
*
|
|
3199
3204
|
* @param {Index} index The index to check.
|
|
3200
|
-
* @param {
|
|
3205
|
+
* @param {number[]} dirs Optional list of directions to check.
|
|
3201
3206
|
* @returns {boolean} True if the given coordinates are within bounds.
|
|
3202
3207
|
*/
|
|
3203
|
-
isInBounds(index: Index, dirs:
|
|
3208
|
+
isInBounds(index: Index, dirs: number[]): boolean;
|
|
3204
3209
|
/**
|
|
3205
3210
|
* Convert an index to an offset in memory.
|
|
3206
3211
|
*
|
|
@@ -3232,9 +3237,9 @@ export declare class Size {
|
|
|
3232
3237
|
*/
|
|
3233
3238
|
export declare class Spacing {
|
|
3234
3239
|
/**
|
|
3235
|
-
* @param {
|
|
3240
|
+
* @param {number[]} values The spacing values.
|
|
3236
3241
|
*/
|
|
3237
|
-
constructor(values:
|
|
3242
|
+
constructor(values: number[]);
|
|
3238
3243
|
/**
|
|
3239
3244
|
* Get the spacing value at the given array index.
|
|
3240
3245
|
*
|
|
@@ -3257,9 +3262,9 @@ export declare class Spacing {
|
|
|
3257
3262
|
/**
|
|
3258
3263
|
* Get the values of this spacing.
|
|
3259
3264
|
*
|
|
3260
|
-
* @returns {
|
|
3265
|
+
* @returns {number[]} The array of values.
|
|
3261
3266
|
*/
|
|
3262
|
-
getValues():
|
|
3267
|
+
getValues(): number[];
|
|
3263
3268
|
/**
|
|
3264
3269
|
* Check for equality.
|
|
3265
3270
|
*
|
|
@@ -3624,23 +3629,23 @@ export declare class View {
|
|
|
3624
3629
|
getPlaybackMilliseconds(recommendedDisplayFrameRate: number): number;
|
|
3625
3630
|
/**
|
|
3626
3631
|
* @callback alphaFn@callback alphaFn
|
|
3627
|
-
* @param {
|
|
3628
|
-
* @param {
|
|
3629
|
-
* @returns {number} The
|
|
3632
|
+
* @param {number[]|number} value The pixel value.
|
|
3633
|
+
* @param {number} index The values' index.
|
|
3634
|
+
* @returns {number} The opacity of the input value.
|
|
3630
3635
|
*/
|
|
3631
3636
|
/**
|
|
3632
3637
|
* Get the alpha function.
|
|
3633
3638
|
*
|
|
3634
3639
|
* @returns {alphaFn} The function.
|
|
3635
3640
|
*/
|
|
3636
|
-
getAlphaFunction(): (value:
|
|
3641
|
+
getAlphaFunction(): (value: number[] | number, index: number) => number;
|
|
3637
3642
|
/**
|
|
3638
3643
|
* Set alpha function.
|
|
3639
3644
|
*
|
|
3640
3645
|
* @param {alphaFn} func The function.
|
|
3641
3646
|
* @fires View#alphafuncchange
|
|
3642
3647
|
*/
|
|
3643
|
-
setAlphaFunction(func: (value:
|
|
3648
|
+
setAlphaFunction(func: (value: number[] | number, index: number) => number): void;
|
|
3644
3649
|
/**
|
|
3645
3650
|
* Get the window presets.
|
|
3646
3651
|
*
|
|
@@ -4022,9 +4027,9 @@ export declare class ViewController {
|
|
|
4022
4027
|
/**
|
|
4023
4028
|
* Get the current view (2D) spacing.
|
|
4024
4029
|
*
|
|
4025
|
-
* @returns {
|
|
4030
|
+
* @returns {number[]} The spacing as a 2D array.
|
|
4026
4031
|
*/
|
|
4027
|
-
get2DSpacing():
|
|
4032
|
+
get2DSpacing(): number[];
|
|
4028
4033
|
/**
|
|
4029
4034
|
* Get the image rescaled value at the input position.
|
|
4030
4035
|
*
|
|
@@ -4122,20 +4127,19 @@ export declare class ViewController {
|
|
|
4122
4127
|
*/
|
|
4123
4128
|
setCurrentPosition(pos: Point, silent?: boolean): boolean;
|
|
4124
4129
|
/**
|
|
4125
|
-
* Get a position from a 2D
|
|
4130
|
+
* Get a world position from a 2D plane position.
|
|
4126
4131
|
*
|
|
4127
|
-
* @param {
|
|
4128
|
-
* @param {number} y The row position.
|
|
4132
|
+
* @param {Point2D} point2D The input point.
|
|
4129
4133
|
* @returns {Point} The associated position.
|
|
4130
4134
|
*/
|
|
4131
|
-
getPositionFromPlanePoint(
|
|
4135
|
+
getPositionFromPlanePoint(point2D: Point2D): Point;
|
|
4132
4136
|
/**
|
|
4133
|
-
* Get a 2D
|
|
4137
|
+
* Get a 2D plane position from a world position.
|
|
4134
4138
|
*
|
|
4135
4139
|
* @param {Point} point The 3D position.
|
|
4136
|
-
* @returns {
|
|
4140
|
+
* @returns {Point2D} The 2D position.
|
|
4137
4141
|
*/
|
|
4138
|
-
getPlanePositionFromPosition(point: Point):
|
|
4142
|
+
getPlanePositionFromPosition(point: Point): Point2D;
|
|
4139
4143
|
/**
|
|
4140
4144
|
* Set the current index.
|
|
4141
4145
|
*
|
|
@@ -4148,10 +4152,10 @@ export declare class ViewController {
|
|
|
4148
4152
|
* Get a plane 3D position from a plane 2D position: does not compensate
|
|
4149
4153
|
* for the image origin. Needed for setting the scale center...
|
|
4150
4154
|
*
|
|
4151
|
-
* @param {
|
|
4155
|
+
* @param {Point2D} point2D The 2D position.
|
|
4152
4156
|
* @returns {Point3D} The 3D point.
|
|
4153
4157
|
*/
|
|
4154
|
-
getPlanePositionFromPlanePoint(point2D:
|
|
4158
|
+
getPlanePositionFromPlanePoint(point2D: Point2D): Point3D;
|
|
4155
4159
|
/**
|
|
4156
4160
|
* Get a 3D offset from a plane one.
|
|
4157
4161
|
*
|
|
@@ -4229,16 +4233,16 @@ export declare class ViewController {
|
|
|
4229
4233
|
setColourMap(name: string): void;
|
|
4230
4234
|
/**
|
|
4231
4235
|
* @callback alphaFn@callback alphaFn
|
|
4232
|
-
* @param {
|
|
4233
|
-
* @param {
|
|
4234
|
-
* @returns {number} The
|
|
4236
|
+
* @param {number[]|number} value The pixel value.
|
|
4237
|
+
* @param {number} index The values' index.
|
|
4238
|
+
* @returns {number} The opacity of the input value.
|
|
4235
4239
|
*/
|
|
4236
4240
|
/**
|
|
4237
4241
|
* Set the view per value alpha function.
|
|
4238
4242
|
*
|
|
4239
4243
|
* @param {alphaFn} func The function.
|
|
4240
4244
|
*/
|
|
4241
|
-
setViewAlphaFunction(func: (value:
|
|
4245
|
+
setViewAlphaFunction(func: (value: number[] | number, index: number) => number): void;
|
|
4242
4246
|
/**
|
|
4243
4247
|
* Add an event listener to this class.
|
|
4244
4248
|
*
|
|
@@ -4384,46 +4388,41 @@ export declare class ViewLayer {
|
|
|
4384
4388
|
*/
|
|
4385
4389
|
setOffset(newOffset: object): void;
|
|
4386
4390
|
/**
|
|
4387
|
-
* Transform a display position to
|
|
4391
|
+
* Transform a display position to a 2D index.
|
|
4388
4392
|
*
|
|
4389
|
-
* @param {
|
|
4390
|
-
* @
|
|
4391
|
-
* @returns {Index} The equivalent index.
|
|
4393
|
+
* @param {Point2D} point2D The input point.
|
|
4394
|
+
* @returns {Index} The equivalent 2D index.
|
|
4392
4395
|
*/
|
|
4393
|
-
displayToPlaneIndex(
|
|
4396
|
+
displayToPlaneIndex(point2D: Point2D): Index;
|
|
4394
4397
|
/**
|
|
4395
4398
|
* Remove scale from a display position.
|
|
4396
4399
|
*
|
|
4397
|
-
* @param {
|
|
4398
|
-
* @
|
|
4399
|
-
* @returns {object} The de-scaled position as {x,y}.
|
|
4400
|
+
* @param {Point2D} point2D The input point.
|
|
4401
|
+
* @returns {Point2D} The de-scaled point.
|
|
4400
4402
|
*/
|
|
4401
|
-
displayToPlaneScale(
|
|
4403
|
+
displayToPlaneScale(point2D: Point2D): Point2D;
|
|
4402
4404
|
/**
|
|
4403
4405
|
* Get a plane position from a display position.
|
|
4404
4406
|
*
|
|
4405
|
-
* @param {
|
|
4406
|
-
* @
|
|
4407
|
-
* @returns {object} The plane position as {x,y}.
|
|
4407
|
+
* @param {Point2D} point2D The input point.
|
|
4408
|
+
* @returns {Point2D} The plane position.
|
|
4408
4409
|
*/
|
|
4409
|
-
displayToPlanePos(
|
|
4410
|
+
displayToPlanePos(point2D: Point2D): Point2D;
|
|
4410
4411
|
/**
|
|
4411
4412
|
* Get a display position from a plane position.
|
|
4412
4413
|
*
|
|
4413
|
-
* @param {
|
|
4414
|
-
* @
|
|
4415
|
-
* @returns {object} The display position as {x,y}, can be individually
|
|
4414
|
+
* @param {Point2D} point2D The input point.
|
|
4415
|
+
* @returns {Point2D} The display position, can be individually
|
|
4416
4416
|
* undefined if out of bounds.
|
|
4417
4417
|
*/
|
|
4418
|
-
planePosToDisplay(
|
|
4418
|
+
planePosToDisplay(point2D: Point2D): Point2D;
|
|
4419
4419
|
/**
|
|
4420
4420
|
* Get a main plane position from a display position.
|
|
4421
4421
|
*
|
|
4422
|
-
* @param {
|
|
4423
|
-
* @
|
|
4424
|
-
* @returns {object} The main plane position as {x,y}.
|
|
4422
|
+
* @param {Point2D} point2D The input point.
|
|
4423
|
+
* @returns {Point2D} The main plane position.
|
|
4425
4424
|
*/
|
|
4426
|
-
displayToMainPlanePos(
|
|
4425
|
+
displayToMainPlanePos(point2D: Point2D): Point2D;
|
|
4427
4426
|
/**
|
|
4428
4427
|
* Display the layer.
|
|
4429
4428
|
*
|