dwv 0.33.0-beta.7 → 0.33.0-beta.9
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 +90 -27
- package/dist/dwv.min.js +1 -1
- package/dist/dwv.min.js.map +1 -1
- package/package.json +8 -8
package/dist/dwv.d.ts
CHANGED
|
@@ -681,6 +681,10 @@ export declare class DataElement {
|
|
|
681
681
|
items: any[];
|
|
682
682
|
}
|
|
683
683
|
|
|
684
|
+
declare type DataElements = {
|
|
685
|
+
[x: string]: DataElement;
|
|
686
|
+
};
|
|
687
|
+
|
|
684
688
|
/**
|
|
685
689
|
* Decoder scripts to be passed to web workers for image decoding.
|
|
686
690
|
*/
|
|
@@ -1375,6 +1379,13 @@ export declare class Geometry {
|
|
|
1375
1379
|
#private;
|
|
1376
1380
|
}
|
|
1377
1381
|
|
|
1382
|
+
/**
|
|
1383
|
+
* Get the default DICOM seg tags as an object.
|
|
1384
|
+
*
|
|
1385
|
+
* @returns {object} The default tags.
|
|
1386
|
+
*/
|
|
1387
|
+
export declare function getDefaultDicomSegJson(): object;
|
|
1388
|
+
|
|
1378
1389
|
/**
|
|
1379
1390
|
* List of DICOM data elements indexed via a 8 character string formed from
|
|
1380
1391
|
* the group and element numbers.
|
|
@@ -1404,6 +1415,26 @@ export declare function getElementsFromJSONTags(jsonTags: {
|
|
|
1404
1415
|
[x: string]: DataElement;
|
|
1405
1416
|
};
|
|
1406
1417
|
|
|
1418
|
+
/**
|
|
1419
|
+
* Get the indices that form a ellpise.
|
|
1420
|
+
*
|
|
1421
|
+
* @param {Index} center The ellipse center.
|
|
1422
|
+
* @param {Array} radius The 2 ellipse radiuses.
|
|
1423
|
+
* @param {Array} dir The 2 ellipse directions.
|
|
1424
|
+
* @returns {Array} The indices of the ellipse.
|
|
1425
|
+
*/
|
|
1426
|
+
export declare function getEllipseIndices(center: Index, radius: any[], dir: any[]): any[];
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* Get the layer details from a mouse event.
|
|
1430
|
+
*
|
|
1431
|
+
* @param {object} event The event to get the layer div id from. Expecting
|
|
1432
|
+
* an event origininating from a canvas inside a layer HTML div
|
|
1433
|
+
* with the 'layer' class and id generated with `getLayerDivId`.
|
|
1434
|
+
* @returns {object} The layer details as {groupDivId, layerId}.
|
|
1435
|
+
*/
|
|
1436
|
+
export declare function getLayerDetailsFromEvent(event: object): object;
|
|
1437
|
+
|
|
1407
1438
|
/**
|
|
1408
1439
|
* Get the name of an image orientation patient.
|
|
1409
1440
|
*
|
|
@@ -1941,6 +1972,15 @@ export declare class Index {
|
|
|
1941
1972
|
#private;
|
|
1942
1973
|
}
|
|
1943
1974
|
|
|
1975
|
+
/**
|
|
1976
|
+
* CIE LAB value (L: [0, 100], a: [-128, 127], b: [-128, 127]) to
|
|
1977
|
+
* unsigned int CIE LAB ([0, 65535]).
|
|
1978
|
+
*
|
|
1979
|
+
* @param {object} triplet CIE XYZ triplet as {x,y,z} with CIE LAB range.
|
|
1980
|
+
* @returns {object} CIE LAB triplet as {l,a,b} with unsigned range.
|
|
1981
|
+
*/
|
|
1982
|
+
export declare function labToUintLab(triplet: object): object;
|
|
1983
|
+
|
|
1944
1984
|
/**
|
|
1945
1985
|
* Layer group.
|
|
1946
1986
|
*
|
|
@@ -2016,6 +2056,12 @@ export declare class LayerGroup {
|
|
|
2016
2056
|
* @returns {number} The number of layers.
|
|
2017
2057
|
*/
|
|
2018
2058
|
getNumberOfLayers(): number;
|
|
2059
|
+
/**
|
|
2060
|
+
* Get the number of view layers handled by this class.
|
|
2061
|
+
*
|
|
2062
|
+
* @returns {number} The number of layers.
|
|
2063
|
+
*/
|
|
2064
|
+
getNumberOfViewLayers(): number;
|
|
2019
2065
|
/**
|
|
2020
2066
|
* Get the active image layer.
|
|
2021
2067
|
*
|
|
@@ -2219,6 +2265,23 @@ export declare const luts: {
|
|
|
2219
2265
|
[x: string]: ColourMap;
|
|
2220
2266
|
};
|
|
2221
2267
|
|
|
2268
|
+
/**
|
|
2269
|
+
* Mask {@link Image} factory.
|
|
2270
|
+
*/
|
|
2271
|
+
export declare class MaskFactory {
|
|
2272
|
+
checkElements(_dicomElements: any): void;
|
|
2273
|
+
/**
|
|
2274
|
+
* Get an {@link Image} object from the read DICOM file.
|
|
2275
|
+
*
|
|
2276
|
+
* @param {DataElements} dataElements The DICOM tags.
|
|
2277
|
+
* @param {Uint8Array | Int8Array |
|
|
2278
|
+
* Uint16Array | Int16Array |
|
|
2279
|
+
* Uint32Array | Int32Array} pixelBuffer The pixel buffer.
|
|
2280
|
+
* @returns {Image} A new Image.
|
|
2281
|
+
*/
|
|
2282
|
+
create(dataElements: DataElements, pixelBuffer: Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array): Image_2;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2222
2285
|
/**
|
|
2223
2286
|
* Immutable 3x3 Matrix.
|
|
2224
2287
|
*/
|
|
@@ -2828,6 +2891,14 @@ export declare class Spacing {
|
|
|
2828
2891
|
#private;
|
|
2829
2892
|
}
|
|
2830
2893
|
|
|
2894
|
+
/**
|
|
2895
|
+
* Convert sRGB to CIE LAB (standard illuminant D65).
|
|
2896
|
+
*
|
|
2897
|
+
* @param {object} triplet sRGB triplet as {r,g,b}.
|
|
2898
|
+
* @returns {object} CIE LAB triplet as {l,a,b}.
|
|
2899
|
+
*/
|
|
2900
|
+
export declare function srgbToCielab(triplet: object): object;
|
|
2901
|
+
|
|
2831
2902
|
/**
|
|
2832
2903
|
* Immutable tag.
|
|
2833
2904
|
*/
|
|
@@ -3007,6 +3078,17 @@ export declare class ToolConfig {
|
|
|
3007
3078
|
options: string[] | undefined;
|
|
3008
3079
|
}
|
|
3009
3080
|
|
|
3081
|
+
export declare namespace toolList {
|
|
3082
|
+
{ WindowLevel };
|
|
3083
|
+
{ Scroll };
|
|
3084
|
+
{ ZoomAndPan };
|
|
3085
|
+
{ Opacity };
|
|
3086
|
+
{ Draw };
|
|
3087
|
+
{ Filter };
|
|
3088
|
+
{ Floodfill };
|
|
3089
|
+
{ Livewire };
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3010
3092
|
/**
|
|
3011
3093
|
* Immutable 3D vector.
|
|
3012
3094
|
*/
|
|
@@ -3201,12 +3283,6 @@ export declare class View {
|
|
|
3201
3283
|
* @param {object} presets The window presets.
|
|
3202
3284
|
*/
|
|
3203
3285
|
setWindowPresets(presets: object): void;
|
|
3204
|
-
/**
|
|
3205
|
-
* Set the default colour map.
|
|
3206
|
-
*
|
|
3207
|
-
* @param {ColourMap} map The colour map.
|
|
3208
|
-
*/
|
|
3209
|
-
setDefaultColourMap(map: ColourMap): void;
|
|
3210
3286
|
/**
|
|
3211
3287
|
* Add window presets to the existing ones.
|
|
3212
3288
|
*
|
|
@@ -3222,16 +3298,16 @@ export declare class View {
|
|
|
3222
3298
|
/**
|
|
3223
3299
|
* Get the colour map of the image.
|
|
3224
3300
|
*
|
|
3225
|
-
* @returns {
|
|
3301
|
+
* @returns {string} The colour map name.
|
|
3226
3302
|
*/
|
|
3227
|
-
getColourMap():
|
|
3303
|
+
getColourMap(): string;
|
|
3228
3304
|
/**
|
|
3229
3305
|
* Set the colour map of the image.
|
|
3230
3306
|
*
|
|
3231
|
-
* @param {
|
|
3232
|
-
* @fires View#
|
|
3307
|
+
* @param {string} name The colour map name.
|
|
3308
|
+
* @fires View#colourmapchange
|
|
3233
3309
|
*/
|
|
3234
|
-
setColourMap(
|
|
3310
|
+
setColourMap(name: string): void;
|
|
3235
3311
|
/**
|
|
3236
3312
|
* Get the current position.
|
|
3237
3313
|
*
|
|
@@ -3743,22 +3819,15 @@ export declare class ViewController {
|
|
|
3743
3819
|
/**
|
|
3744
3820
|
* Get the colour map.
|
|
3745
3821
|
*
|
|
3746
|
-
* @returns {ColourMap} The colour map.
|
|
3747
|
-
*/
|
|
3748
|
-
getColourMap(): ColourMap;
|
|
3749
|
-
/**
|
|
3750
|
-
* Get the colour map name.
|
|
3751
|
-
*
|
|
3752
3822
|
* @returns {string} The colour map name.
|
|
3753
3823
|
*/
|
|
3754
|
-
|
|
3824
|
+
getColourMap(): string;
|
|
3755
3825
|
/**
|
|
3756
3826
|
* Set the colour map.
|
|
3757
3827
|
*
|
|
3758
|
-
* @param {
|
|
3759
|
-
* @param {string} [name] The colour map name.
|
|
3828
|
+
* @param {string} name The colour map name.
|
|
3760
3829
|
*/
|
|
3761
|
-
setColourMap(
|
|
3830
|
+
setColourMap(name: string): void;
|
|
3762
3831
|
/**
|
|
3763
3832
|
* @callback alphaFn@callback alphaFn
|
|
3764
3833
|
* @param {object} value The pixel value.
|
|
@@ -3771,12 +3840,6 @@ export declare class ViewController {
|
|
|
3771
3840
|
* @param {alphaFn} func The function.
|
|
3772
3841
|
*/
|
|
3773
3842
|
setViewAlphaFunction(func: (value: object, index: object) => number): void;
|
|
3774
|
-
/**
|
|
3775
|
-
* Set the colour map from a name.
|
|
3776
|
-
*
|
|
3777
|
-
* @param {string} name The name of the colour map to set.
|
|
3778
|
-
*/
|
|
3779
|
-
setColourMapFromName(name: string): void;
|
|
3780
3843
|
/**
|
|
3781
3844
|
* Add an event listener to this class.
|
|
3782
3845
|
*
|