dwv 0.33.0-beta.18 → 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 +83 -88
- 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
|
*/
|
|
@@ -1527,11 +1531,11 @@ export declare function getElementsFromJSONTags(simpleTags: {
|
|
|
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
|
*
|
|
@@ -1810,19 +1814,19 @@ declare class Image_2 {
|
|
|
1810
1814
|
* Get the offsets where the buffer equals the input value.
|
|
1811
1815
|
* Loops through the whole volume, can get long for big data...
|
|
1812
1816
|
*
|
|
1813
|
-
* @param {number|
|
|
1814
|
-
* @returns {
|
|
1817
|
+
* @param {number|RGB} value The value to check.
|
|
1818
|
+
* @returns {number[]} The list of offsets.
|
|
1815
1819
|
*/
|
|
1816
|
-
getOffsets(value: number |
|
|
1820
|
+
getOffsets(value: number | RGB): number[];
|
|
1817
1821
|
/**
|
|
1818
1822
|
* Check if the input values are in the buffer.
|
|
1819
1823
|
* Could loop through the whole volume, can get long for big data...
|
|
1820
1824
|
*
|
|
1821
1825
|
* @param {Array} values The values to check.
|
|
1822
|
-
* @returns {
|
|
1826
|
+
* @returns {boolean[]} A list of booleans for each input value,
|
|
1823
1827
|
* set to true if the value is present in the buffer.
|
|
1824
1828
|
*/
|
|
1825
|
-
hasValues(values: any[]):
|
|
1829
|
+
hasValues(values: any[]): boolean[];
|
|
1826
1830
|
/**
|
|
1827
1831
|
* Clone the image.
|
|
1828
1832
|
*
|
|
@@ -1886,29 +1890,31 @@ declare class Image_2 {
|
|
|
1886
1890
|
/**
|
|
1887
1891
|
* Set the inner buffer values at given offsets.
|
|
1888
1892
|
*
|
|
1889
|
-
* @param {
|
|
1890
|
-
* @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.
|
|
1891
1895
|
* @fires Image#imagechange
|
|
1892
1896
|
*/
|
|
1893
|
-
setAtOffsets(offsets:
|
|
1897
|
+
setAtOffsets(offsets: number[], value: number | RGB): void;
|
|
1894
1898
|
/**
|
|
1895
1899
|
* Set the inner buffer values at given offsets.
|
|
1896
1900
|
*
|
|
1897
|
-
* @param {
|
|
1898
|
-
*
|
|
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.
|
|
1899
1904
|
* @returns {Array} A list of objects representing the original values before
|
|
1900
1905
|
* replacing them.
|
|
1901
1906
|
* @fires Image#imagechange
|
|
1902
1907
|
*/
|
|
1903
|
-
setAtOffsetsAndGetOriginals(offsetsLists:
|
|
1908
|
+
setAtOffsetsAndGetOriginals(offsetsLists: number[][], value: RGB): any[];
|
|
1904
1909
|
/**
|
|
1905
1910
|
* Set the inner buffer values at given offsets.
|
|
1906
1911
|
*
|
|
1907
|
-
* @param {
|
|
1912
|
+
* @param {number[][]} offsetsLists List of offset lists
|
|
1913
|
+
* where to set the data.
|
|
1908
1914
|
* @param {object|Array} value The value to set at the given offsets.
|
|
1909
1915
|
* @fires Image#imagechange
|
|
1910
1916
|
*/
|
|
1911
|
-
setAtOffsetsWithIterator(offsetsLists:
|
|
1917
|
+
setAtOffsetsWithIterator(offsetsLists: number[][], value: object | any[]): void;
|
|
1912
1918
|
/**
|
|
1913
1919
|
* Get the value of the image at a specific coordinate.
|
|
1914
1920
|
*
|
|
@@ -1980,20 +1986,20 @@ declare class Image_2 {
|
|
|
1980
1986
|
*
|
|
1981
1987
|
* Note: Uses raw buffer values.
|
|
1982
1988
|
*
|
|
1983
|
-
* @param {
|
|
1989
|
+
* @param {number[]} weights The weights of the 2D kernel as a 3x3 matrix.
|
|
1984
1990
|
* @returns {Image} The convoluted image.
|
|
1985
1991
|
*/
|
|
1986
|
-
convolute2D(weights:
|
|
1992
|
+
convolute2D(weights: number[]): Image_2;
|
|
1987
1993
|
/**
|
|
1988
1994
|
* Convolute an image buffer with a given 2D kernel.
|
|
1989
1995
|
*
|
|
1990
1996
|
* Note: Uses raw buffer values.
|
|
1991
1997
|
*
|
|
1992
|
-
* @param {
|
|
1998
|
+
* @param {number[]} weights The weights of the 2D kernel as a 3x3 matrix.
|
|
1993
1999
|
* @param {TypedArray} buffer The buffer to convolute.
|
|
1994
2000
|
* @param {number} startOffset The index to start at.
|
|
1995
2001
|
*/
|
|
1996
|
-
convoluteBuffer(weights:
|
|
2002
|
+
convoluteBuffer(weights: number[], buffer: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, startOffset: number): void;
|
|
1997
2003
|
/**
|
|
1998
2004
|
* Transform an image using a specific operator.
|
|
1999
2005
|
* WARNING: no size check!
|
|
@@ -2211,9 +2217,9 @@ export declare class LayerGroup {
|
|
|
2211
2217
|
/**
|
|
2212
2218
|
* Get the view layers data indices.
|
|
2213
2219
|
*
|
|
2214
|
-
* @returns {
|
|
2220
|
+
* @returns {string[]} The list of indices.
|
|
2215
2221
|
*/
|
|
2216
|
-
getViewDataIndices():
|
|
2222
|
+
getViewDataIndices(): string[];
|
|
2217
2223
|
/**
|
|
2218
2224
|
* Get the active draw layer.
|
|
2219
2225
|
*
|
|
@@ -2395,7 +2401,15 @@ export declare const luts: {
|
|
|
2395
2401
|
* Mask {@link Image} factory.
|
|
2396
2402
|
*/
|
|
2397
2403
|
export declare class MaskFactory {
|
|
2398
|
-
|
|
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;
|
|
2399
2413
|
/**
|
|
2400
2414
|
* Get an {@link Image} object from the read DICOM file.
|
|
2401
2415
|
*
|
|
@@ -2948,19 +2962,6 @@ export declare class Point2D {
|
|
|
2948
2962
|
* @returns {string} The point as a string.
|
|
2949
2963
|
*/
|
|
2950
2964
|
toString(): string;
|
|
2951
|
-
/**
|
|
2952
|
-
* Get the distance to another Point2D.
|
|
2953
|
-
*
|
|
2954
|
-
* @param {Point2D} point2D The input point.
|
|
2955
|
-
* @returns {number} The distance to the input point.
|
|
2956
|
-
*/
|
|
2957
|
-
getDistance(point2D: Point2D): number;
|
|
2958
|
-
/**
|
|
2959
|
-
* Round a Point2D.
|
|
2960
|
-
*
|
|
2961
|
-
* @returns {Point2D} The rounded point.
|
|
2962
|
-
*/
|
|
2963
|
-
getRound(): Point2D;
|
|
2964
2965
|
#private;
|
|
2965
2966
|
}
|
|
2966
2967
|
|
|
@@ -3125,9 +3126,9 @@ export declare class RGB {
|
|
|
3125
3126
|
*/
|
|
3126
3127
|
export declare class Size {
|
|
3127
3128
|
/**
|
|
3128
|
-
* @param {
|
|
3129
|
+
* @param {number[]} values The size values.
|
|
3129
3130
|
*/
|
|
3130
|
-
constructor(values:
|
|
3131
|
+
constructor(values: number[]);
|
|
3131
3132
|
/**
|
|
3132
3133
|
* Get the size value at the given array index.
|
|
3133
3134
|
*
|
|
@@ -3150,9 +3151,9 @@ export declare class Size {
|
|
|
3150
3151
|
/**
|
|
3151
3152
|
* Get the values of this index.
|
|
3152
3153
|
*
|
|
3153
|
-
* @returns {
|
|
3154
|
+
* @returns {number[]} The array of values.
|
|
3154
3155
|
*/
|
|
3155
|
-
getValues():
|
|
3156
|
+
getValues(): number[];
|
|
3156
3157
|
/**
|
|
3157
3158
|
* Check if a dimension exists and has more than one element.
|
|
3158
3159
|
*
|
|
@@ -3201,10 +3202,10 @@ export declare class Size {
|
|
|
3201
3202
|
* Check that an index is within bounds.
|
|
3202
3203
|
*
|
|
3203
3204
|
* @param {Index} index The index to check.
|
|
3204
|
-
* @param {
|
|
3205
|
+
* @param {number[]} dirs Optional list of directions to check.
|
|
3205
3206
|
* @returns {boolean} True if the given coordinates are within bounds.
|
|
3206
3207
|
*/
|
|
3207
|
-
isInBounds(index: Index, dirs:
|
|
3208
|
+
isInBounds(index: Index, dirs: number[]): boolean;
|
|
3208
3209
|
/**
|
|
3209
3210
|
* Convert an index to an offset in memory.
|
|
3210
3211
|
*
|
|
@@ -3236,9 +3237,9 @@ export declare class Size {
|
|
|
3236
3237
|
*/
|
|
3237
3238
|
export declare class Spacing {
|
|
3238
3239
|
/**
|
|
3239
|
-
* @param {
|
|
3240
|
+
* @param {number[]} values The spacing values.
|
|
3240
3241
|
*/
|
|
3241
|
-
constructor(values:
|
|
3242
|
+
constructor(values: number[]);
|
|
3242
3243
|
/**
|
|
3243
3244
|
* Get the spacing value at the given array index.
|
|
3244
3245
|
*
|
|
@@ -3261,9 +3262,9 @@ export declare class Spacing {
|
|
|
3261
3262
|
/**
|
|
3262
3263
|
* Get the values of this spacing.
|
|
3263
3264
|
*
|
|
3264
|
-
* @returns {
|
|
3265
|
+
* @returns {number[]} The array of values.
|
|
3265
3266
|
*/
|
|
3266
|
-
getValues():
|
|
3267
|
+
getValues(): number[];
|
|
3267
3268
|
/**
|
|
3268
3269
|
* Check for equality.
|
|
3269
3270
|
*
|
|
@@ -4026,9 +4027,9 @@ export declare class ViewController {
|
|
|
4026
4027
|
/**
|
|
4027
4028
|
* Get the current view (2D) spacing.
|
|
4028
4029
|
*
|
|
4029
|
-
* @returns {
|
|
4030
|
+
* @returns {number[]} The spacing as a 2D array.
|
|
4030
4031
|
*/
|
|
4031
|
-
get2DSpacing():
|
|
4032
|
+
get2DSpacing(): number[];
|
|
4032
4033
|
/**
|
|
4033
4034
|
* Get the image rescaled value at the input position.
|
|
4034
4035
|
*
|
|
@@ -4126,20 +4127,19 @@ export declare class ViewController {
|
|
|
4126
4127
|
*/
|
|
4127
4128
|
setCurrentPosition(pos: Point, silent?: boolean): boolean;
|
|
4128
4129
|
/**
|
|
4129
|
-
* Get a position from a 2D
|
|
4130
|
+
* Get a world position from a 2D plane position.
|
|
4130
4131
|
*
|
|
4131
|
-
* @param {
|
|
4132
|
-
* @param {number} y The row position.
|
|
4132
|
+
* @param {Point2D} point2D The input point.
|
|
4133
4133
|
* @returns {Point} The associated position.
|
|
4134
4134
|
*/
|
|
4135
|
-
getPositionFromPlanePoint(
|
|
4135
|
+
getPositionFromPlanePoint(point2D: Point2D): Point;
|
|
4136
4136
|
/**
|
|
4137
|
-
* Get a 2D
|
|
4137
|
+
* Get a 2D plane position from a world position.
|
|
4138
4138
|
*
|
|
4139
4139
|
* @param {Point} point The 3D position.
|
|
4140
|
-
* @returns {
|
|
4140
|
+
* @returns {Point2D} The 2D position.
|
|
4141
4141
|
*/
|
|
4142
|
-
getPlanePositionFromPosition(point: Point):
|
|
4142
|
+
getPlanePositionFromPosition(point: Point): Point2D;
|
|
4143
4143
|
/**
|
|
4144
4144
|
* Set the current index.
|
|
4145
4145
|
*
|
|
@@ -4152,10 +4152,10 @@ export declare class ViewController {
|
|
|
4152
4152
|
* Get a plane 3D position from a plane 2D position: does not compensate
|
|
4153
4153
|
* for the image origin. Needed for setting the scale center...
|
|
4154
4154
|
*
|
|
4155
|
-
* @param {
|
|
4155
|
+
* @param {Point2D} point2D The 2D position.
|
|
4156
4156
|
* @returns {Point3D} The 3D point.
|
|
4157
4157
|
*/
|
|
4158
|
-
getPlanePositionFromPlanePoint(point2D:
|
|
4158
|
+
getPlanePositionFromPlanePoint(point2D: Point2D): Point3D;
|
|
4159
4159
|
/**
|
|
4160
4160
|
* Get a 3D offset from a plane one.
|
|
4161
4161
|
*
|
|
@@ -4388,46 +4388,41 @@ export declare class ViewLayer {
|
|
|
4388
4388
|
*/
|
|
4389
4389
|
setOffset(newOffset: object): void;
|
|
4390
4390
|
/**
|
|
4391
|
-
* Transform a display position to
|
|
4391
|
+
* Transform a display position to a 2D index.
|
|
4392
4392
|
*
|
|
4393
|
-
* @param {
|
|
4394
|
-
* @
|
|
4395
|
-
* @returns {Index} The equivalent index.
|
|
4393
|
+
* @param {Point2D} point2D The input point.
|
|
4394
|
+
* @returns {Index} The equivalent 2D index.
|
|
4396
4395
|
*/
|
|
4397
|
-
displayToPlaneIndex(
|
|
4396
|
+
displayToPlaneIndex(point2D: Point2D): Index;
|
|
4398
4397
|
/**
|
|
4399
4398
|
* Remove scale from a display position.
|
|
4400
4399
|
*
|
|
4401
|
-
* @param {
|
|
4402
|
-
* @
|
|
4403
|
-
* @returns {object} The de-scaled position as {x,y}.
|
|
4400
|
+
* @param {Point2D} point2D The input point.
|
|
4401
|
+
* @returns {Point2D} The de-scaled point.
|
|
4404
4402
|
*/
|
|
4405
|
-
displayToPlaneScale(
|
|
4403
|
+
displayToPlaneScale(point2D: Point2D): Point2D;
|
|
4406
4404
|
/**
|
|
4407
4405
|
* Get a plane position from a display position.
|
|
4408
4406
|
*
|
|
4409
|
-
* @param {
|
|
4410
|
-
* @
|
|
4411
|
-
* @returns {object} The plane position as {x,y}.
|
|
4407
|
+
* @param {Point2D} point2D The input point.
|
|
4408
|
+
* @returns {Point2D} The plane position.
|
|
4412
4409
|
*/
|
|
4413
|
-
displayToPlanePos(
|
|
4410
|
+
displayToPlanePos(point2D: Point2D): Point2D;
|
|
4414
4411
|
/**
|
|
4415
4412
|
* Get a display position from a plane position.
|
|
4416
4413
|
*
|
|
4417
|
-
* @param {
|
|
4418
|
-
* @
|
|
4419
|
-
* @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
|
|
4420
4416
|
* undefined if out of bounds.
|
|
4421
4417
|
*/
|
|
4422
|
-
planePosToDisplay(
|
|
4418
|
+
planePosToDisplay(point2D: Point2D): Point2D;
|
|
4423
4419
|
/**
|
|
4424
4420
|
* Get a main plane position from a display position.
|
|
4425
4421
|
*
|
|
4426
|
-
* @param {
|
|
4427
|
-
* @
|
|
4428
|
-
* @returns {object} The main plane position as {x,y}.
|
|
4422
|
+
* @param {Point2D} point2D The input point.
|
|
4423
|
+
* @returns {Point2D} The main plane position.
|
|
4429
4424
|
*/
|
|
4430
|
-
displayToMainPlanePos(
|
|
4425
|
+
displayToMainPlanePos(point2D: Point2D): Point2D;
|
|
4431
4426
|
/**
|
|
4432
4427
|
* Display the layer.
|
|
4433
4428
|
*
|