dwv 0.33.0-beta.3 → 0.33.0-beta.4
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 +79 -64
- package/dist/dwv.min.js +1 -1
- package/dist/dwv.min.js.map +1 -1
- package/package.json +2 -2
package/dist/dwv.d.ts
CHANGED
|
@@ -27,10 +27,10 @@ export declare class App {
|
|
|
27
27
|
/**
|
|
28
28
|
* Get the image.
|
|
29
29
|
*
|
|
30
|
-
* @param {
|
|
30
|
+
* @param {string} dataId The data id.
|
|
31
31
|
* @returns {Image} The associated image.
|
|
32
32
|
*/
|
|
33
|
-
getImage(
|
|
33
|
+
getImage(dataId: string): Image_2;
|
|
34
34
|
/**
|
|
35
35
|
* Get the last loaded image.
|
|
36
36
|
*
|
|
@@ -38,12 +38,12 @@ export declare class App {
|
|
|
38
38
|
*/
|
|
39
39
|
getLastImage(): Image_2;
|
|
40
40
|
/**
|
|
41
|
-
* Set the image at the given
|
|
41
|
+
* Set the image at the given id.
|
|
42
42
|
*
|
|
43
|
-
* @param {
|
|
43
|
+
* @param {string} dataId The data id.
|
|
44
44
|
* @param {Image} img The associated image.
|
|
45
45
|
*/
|
|
46
|
-
setImage(
|
|
46
|
+
setImage(dataId: string, img: Image_2): void;
|
|
47
47
|
/**
|
|
48
48
|
* Set the last image.
|
|
49
49
|
*
|
|
@@ -55,16 +55,16 @@ export declare class App {
|
|
|
55
55
|
*
|
|
56
56
|
* @param {Image} image The new image.
|
|
57
57
|
* @param {object} meta The image meta.
|
|
58
|
-
* @returns {
|
|
58
|
+
* @returns {string} The new image data id.
|
|
59
59
|
*/
|
|
60
|
-
addNewImage(image: Image_2, meta: object):
|
|
60
|
+
addNewImage(image: Image_2, meta: object): string;
|
|
61
61
|
/**
|
|
62
62
|
* Get the meta data.
|
|
63
63
|
*
|
|
64
|
-
* @param {
|
|
64
|
+
* @param {string} dataId The data id.
|
|
65
65
|
* @returns {object} The list of meta data.
|
|
66
66
|
*/
|
|
67
|
-
getMetaData(
|
|
67
|
+
getMetaData(dataId: string): object;
|
|
68
68
|
/**
|
|
69
69
|
* Get the list of ids in the data storage.
|
|
70
70
|
*
|
|
@@ -115,21 +115,21 @@ export declare class App {
|
|
|
115
115
|
*/
|
|
116
116
|
getActiveLayerGroup(): LayerGroup;
|
|
117
117
|
/**
|
|
118
|
-
* Get the view layers associated to a data
|
|
118
|
+
* Get the view layers associated to a data id.
|
|
119
119
|
* The layer are available after the first loaded item.
|
|
120
120
|
*
|
|
121
|
-
* @param {
|
|
121
|
+
* @param {string} dataId The data id.
|
|
122
122
|
* @returns {Array} The layers.
|
|
123
123
|
*/
|
|
124
|
-
|
|
124
|
+
getViewLayersByDataId(dataId: string): any[];
|
|
125
125
|
/**
|
|
126
|
-
* Get the draw layers associated to a data
|
|
126
|
+
* Get the draw layers associated to a data id.
|
|
127
127
|
* The layer are available after the first loaded item.
|
|
128
128
|
*
|
|
129
|
-
* @param {
|
|
129
|
+
* @param {string} dataId The data id.
|
|
130
130
|
* @returns {Array} The layers.
|
|
131
131
|
*/
|
|
132
|
-
|
|
132
|
+
getDrawLayersByDataId(dataId: string): any[];
|
|
133
133
|
/**
|
|
134
134
|
* Get a layer group by div id.
|
|
135
135
|
* The layer is available after the first loaded item.
|
|
@@ -161,7 +161,7 @@ export declare class App {
|
|
|
161
161
|
* Initialise the application.
|
|
162
162
|
*
|
|
163
163
|
* @param {object} opt The application option with:
|
|
164
|
-
* - `dataViewConfigs`:
|
|
164
|
+
* - `dataViewConfigs`: dataId indexed object containing the data view
|
|
165
165
|
* configurations in the form of a list of objects containing:
|
|
166
166
|
* - divId: the HTML div id
|
|
167
167
|
* - orientation: optional 'axial', 'coronal' or 'sagittal' orientation
|
|
@@ -288,6 +288,12 @@ export declare class App {
|
|
|
288
288
|
* Init the Window/Level display
|
|
289
289
|
*/
|
|
290
290
|
initWLDisplay(): void;
|
|
291
|
+
/**
|
|
292
|
+
* Set the imageSmoothing flag value. Default is false.
|
|
293
|
+
*
|
|
294
|
+
* @param {boolean} flag True to enable smoothing.
|
|
295
|
+
*/
|
|
296
|
+
setImageSmoothing(flag: boolean): void;
|
|
291
297
|
/**
|
|
292
298
|
* Get the data view config.
|
|
293
299
|
* Carefull, returns a reference, do not modify without resetting.
|
|
@@ -304,25 +310,25 @@ export declare class App {
|
|
|
304
310
|
/**
|
|
305
311
|
* Add a data view config.
|
|
306
312
|
*
|
|
307
|
-
* @param {
|
|
313
|
+
* @param {string} dataId The data id.
|
|
308
314
|
* @param {object} config The view configuration.
|
|
309
315
|
*/
|
|
310
|
-
addDataViewConfig(dataId:
|
|
316
|
+
addDataViewConfig(dataId: string, config: object): void;
|
|
311
317
|
/**
|
|
312
318
|
* Remove a data view config.
|
|
313
319
|
*
|
|
314
|
-
* @param {
|
|
320
|
+
* @param {string} dataId The data id.
|
|
315
321
|
* @param {object} config The view configuration.
|
|
316
322
|
*/
|
|
317
|
-
removeDataViewConfig(dataId:
|
|
323
|
+
removeDataViewConfig(dataId: string, config: object): void;
|
|
318
324
|
/**
|
|
319
325
|
* Update a data view config.
|
|
320
326
|
*
|
|
321
|
-
* @param {
|
|
327
|
+
* @param {string} dataId The data id.
|
|
322
328
|
* @param {string} divId The div id.
|
|
323
329
|
* @param {object} config The view configuration.
|
|
324
330
|
*/
|
|
325
|
-
updateDataViewConfig(dataId:
|
|
331
|
+
updateDataViewConfig(dataId: string, divId: string, config: object): void;
|
|
326
332
|
/**
|
|
327
333
|
* Set the layer groups binders.
|
|
328
334
|
*
|
|
@@ -332,10 +338,10 @@ export declare class App {
|
|
|
332
338
|
/**
|
|
333
339
|
* Render the current data.
|
|
334
340
|
*
|
|
335
|
-
* @param {
|
|
341
|
+
* @param {string} dataId The data id to render.
|
|
336
342
|
* @param {Array} [viewConfigs] The list of configs to render.
|
|
337
343
|
*/
|
|
338
|
-
render(
|
|
344
|
+
render(dataId: string, viewConfigs?: any[]): void;
|
|
339
345
|
/**
|
|
340
346
|
* Zoom to the layers.
|
|
341
347
|
*
|
|
@@ -460,18 +466,18 @@ export declare class App {
|
|
|
460
466
|
*/
|
|
461
467
|
getCurrentStackIndex(): number;
|
|
462
468
|
/**
|
|
463
|
-
* Get the overlay data for a data
|
|
469
|
+
* Get the overlay data for a data id.
|
|
464
470
|
*
|
|
465
|
-
* @param {
|
|
466
|
-
* @returns {OverlayData} The overlay data.
|
|
471
|
+
* @param {string} dataId The data id.
|
|
472
|
+
* @returns {OverlayData|undefined} The overlay data.
|
|
467
473
|
*/
|
|
468
|
-
getOverlayData(
|
|
474
|
+
getOverlayData(dataId: string): OverlayData | undefined;
|
|
469
475
|
/**
|
|
470
476
|
* Toggle overlay listeners.
|
|
471
477
|
*
|
|
472
|
-
* @param {
|
|
478
|
+
* @param {string} dataId The data id.
|
|
473
479
|
*/
|
|
474
|
-
toggleOverlayListeners(
|
|
480
|
+
toggleOverlayListeners(dataId: string): void;
|
|
475
481
|
#private;
|
|
476
482
|
}
|
|
477
483
|
|
|
@@ -670,11 +676,11 @@ export declare class DrawLayer {
|
|
|
670
676
|
*/
|
|
671
677
|
constructor(containerDiv: HTMLDivElement);
|
|
672
678
|
/**
|
|
673
|
-
* Get the associated data
|
|
679
|
+
* Get the associated data id.
|
|
674
680
|
*
|
|
675
|
-
* @returns {
|
|
681
|
+
* @returns {string} The id.
|
|
676
682
|
*/
|
|
677
|
-
|
|
683
|
+
getDataId(): string;
|
|
678
684
|
/**
|
|
679
685
|
* Get the Konva stage.
|
|
680
686
|
*
|
|
@@ -774,9 +780,9 @@ export declare class DrawLayer {
|
|
|
774
780
|
*
|
|
775
781
|
* @param {object} size The image size as {x,y}.
|
|
776
782
|
* @param {object} spacing The image spacing as {x,y}.
|
|
777
|
-
* @param {
|
|
783
|
+
* @param {string} dataId The associated data id.
|
|
778
784
|
*/
|
|
779
|
-
initialise(size: object, spacing: object,
|
|
785
|
+
initialise(size: object, spacing: object, dataId: string): void;
|
|
780
786
|
/**
|
|
781
787
|
* Fit the layer to its parent container.
|
|
782
788
|
*
|
|
@@ -1621,6 +1627,12 @@ export declare class LayerGroup {
|
|
|
1621
1627
|
* @param {boolean} flag True to display the crosshair.
|
|
1622
1628
|
*/
|
|
1623
1629
|
setShowCrosshair(flag: boolean): void;
|
|
1630
|
+
/**
|
|
1631
|
+
* Set the imageSmoothing flag value.
|
|
1632
|
+
*
|
|
1633
|
+
* @param {boolean} flag True to enable smoothing.
|
|
1634
|
+
*/
|
|
1635
|
+
setImageSmoothing(flag: boolean): void;
|
|
1624
1636
|
/**
|
|
1625
1637
|
* Get the Id of the container div.
|
|
1626
1638
|
*
|
|
@@ -1660,16 +1672,16 @@ export declare class LayerGroup {
|
|
|
1660
1672
|
/**
|
|
1661
1673
|
* Get the active image layer.
|
|
1662
1674
|
*
|
|
1663
|
-
* @returns {ViewLayer} The layer.
|
|
1675
|
+
* @returns {ViewLayer|undefined} The layer.
|
|
1664
1676
|
*/
|
|
1665
|
-
getActiveViewLayer(): ViewLayer;
|
|
1677
|
+
getActiveViewLayer(): ViewLayer | undefined;
|
|
1666
1678
|
/**
|
|
1667
|
-
* Get the view layers associated to a data
|
|
1679
|
+
* Get the view layers associated to a data id.
|
|
1668
1680
|
*
|
|
1669
|
-
* @param {
|
|
1681
|
+
* @param {string} dataId The data id.
|
|
1670
1682
|
* @returns {ViewLayer[]} The layers.
|
|
1671
1683
|
*/
|
|
1672
|
-
|
|
1684
|
+
getViewLayersByDataId(dataId: string): ViewLayer[];
|
|
1673
1685
|
/**
|
|
1674
1686
|
* Search view layers for equal imae meta data.
|
|
1675
1687
|
*
|
|
@@ -1686,16 +1698,16 @@ export declare class LayerGroup {
|
|
|
1686
1698
|
/**
|
|
1687
1699
|
* Get the active draw layer.
|
|
1688
1700
|
*
|
|
1689
|
-
* @returns {DrawLayer} The layer.
|
|
1701
|
+
* @returns {DrawLayer|undefined} The layer.
|
|
1690
1702
|
*/
|
|
1691
|
-
getActiveDrawLayer(): DrawLayer;
|
|
1703
|
+
getActiveDrawLayer(): DrawLayer | undefined;
|
|
1692
1704
|
/**
|
|
1693
|
-
* Get the draw layers associated to a data
|
|
1705
|
+
* Get the draw layers associated to a data id.
|
|
1694
1706
|
*
|
|
1695
|
-
* @param {
|
|
1707
|
+
* @param {string} dataId The data id.
|
|
1696
1708
|
* @returns {DrawLayer[]} The layers.
|
|
1697
1709
|
*/
|
|
1698
|
-
|
|
1710
|
+
getDrawLayersByDataId(dataId: string): DrawLayer[];
|
|
1699
1711
|
/**
|
|
1700
1712
|
* Set the active view layer.
|
|
1701
1713
|
*
|
|
@@ -1703,11 +1715,11 @@ export declare class LayerGroup {
|
|
|
1703
1715
|
*/
|
|
1704
1716
|
setActiveViewLayer(index: number): void;
|
|
1705
1717
|
/**
|
|
1706
|
-
* Set the active view layer with a data
|
|
1718
|
+
* Set the active view layer with a data id.
|
|
1707
1719
|
*
|
|
1708
|
-
* @param {
|
|
1720
|
+
* @param {string} dataId The data id.
|
|
1709
1721
|
*/
|
|
1710
|
-
|
|
1722
|
+
setActiveViewLayerByDataId(dataId: string): void;
|
|
1711
1723
|
/**
|
|
1712
1724
|
* Set the active draw layer.
|
|
1713
1725
|
*
|
|
@@ -1715,11 +1727,11 @@ export declare class LayerGroup {
|
|
|
1715
1727
|
*/
|
|
1716
1728
|
setActiveDrawLayer(index: number): void;
|
|
1717
1729
|
/**
|
|
1718
|
-
* Set the active draw layer with a data
|
|
1730
|
+
* Set the active draw layer with a data id.
|
|
1719
1731
|
*
|
|
1720
|
-
* @param {
|
|
1732
|
+
* @param {string} dataId The data id.
|
|
1721
1733
|
*/
|
|
1722
|
-
|
|
1734
|
+
setActiveDrawLayerByDataId(dataId: string): void;
|
|
1723
1735
|
/**
|
|
1724
1736
|
* Add a view layer.
|
|
1725
1737
|
*
|
|
@@ -1738,6 +1750,9 @@ export declare class LayerGroup {
|
|
|
1738
1750
|
empty(): void;
|
|
1739
1751
|
/**
|
|
1740
1752
|
* Remove a layer from this layer group.
|
|
1753
|
+
* Warning: if current active layer, the index will
|
|
1754
|
+
* be set to `undefined`. Call one of the setActive
|
|
1755
|
+
* methods to define the active index.
|
|
1741
1756
|
*
|
|
1742
1757
|
* @param {ViewLayer | DrawLayer} layer The layer to remove.
|
|
1743
1758
|
*/
|
|
@@ -1974,10 +1989,10 @@ export declare class Matrix33 {
|
|
|
1974
1989
|
export declare class OverlayData {
|
|
1975
1990
|
/**
|
|
1976
1991
|
* @param {App} app The associated application.
|
|
1977
|
-
* @param {
|
|
1992
|
+
* @param {string} dataId The associated data id.
|
|
1978
1993
|
* @param {object} configs The overlay config.
|
|
1979
1994
|
*/
|
|
1980
|
-
constructor(app: App, dataId:
|
|
1995
|
+
constructor(app: App, dataId: string, configs: object);
|
|
1981
1996
|
/**
|
|
1982
1997
|
* Reset the data.
|
|
1983
1998
|
*/
|
|
@@ -2942,9 +2957,9 @@ export declare class View {
|
|
|
2942
2957
|
export declare class ViewController {
|
|
2943
2958
|
/**
|
|
2944
2959
|
* @param {View} view The associated view.
|
|
2945
|
-
* @param {
|
|
2960
|
+
* @param {string} dataId The associated data id.
|
|
2946
2961
|
*/
|
|
2947
|
-
constructor(view: View,
|
|
2962
|
+
constructor(view: View, dataId: string);
|
|
2948
2963
|
/**
|
|
2949
2964
|
* Get the plane helper.
|
|
2950
2965
|
*
|
|
@@ -3071,9 +3086,9 @@ export declare class ViewController {
|
|
|
3071
3086
|
* Set the associated image.
|
|
3072
3087
|
*
|
|
3073
3088
|
* @param {Image} img The associated image.
|
|
3074
|
-
* @param {
|
|
3089
|
+
* @param {string} dataId The data id of the image.
|
|
3075
3090
|
*/
|
|
3076
|
-
setImage(img: Image_2,
|
|
3091
|
+
setImage(img: Image_2, dataId: string): void;
|
|
3077
3092
|
/**
|
|
3078
3093
|
* Get the current spacing.
|
|
3079
3094
|
*
|
|
@@ -3323,24 +3338,24 @@ export declare class ViewLayer {
|
|
|
3323
3338
|
*/
|
|
3324
3339
|
constructor(containerDiv: HTMLElement);
|
|
3325
3340
|
/**
|
|
3326
|
-
* Get the associated data
|
|
3341
|
+
* Get the associated data id.
|
|
3327
3342
|
*
|
|
3328
|
-
* @returns {
|
|
3343
|
+
* @returns {string} The data id.
|
|
3329
3344
|
*/
|
|
3330
|
-
|
|
3345
|
+
getDataId(): string;
|
|
3331
3346
|
/**
|
|
3332
|
-
* Set the
|
|
3347
|
+
* Set the imageSmoothing flag value.
|
|
3333
3348
|
*
|
|
3334
3349
|
* @param {boolean} flag True to enable smoothing.
|
|
3335
3350
|
*/
|
|
3336
|
-
|
|
3351
|
+
setImageSmoothing(flag: boolean): void;
|
|
3337
3352
|
/**
|
|
3338
3353
|
* Set the associated view.
|
|
3339
3354
|
*
|
|
3340
3355
|
* @param {object} view The view.
|
|
3341
|
-
* @param {
|
|
3356
|
+
* @param {string} dataId The associated data id.
|
|
3342
3357
|
*/
|
|
3343
|
-
setView(view: object,
|
|
3358
|
+
setView(view: object, dataId: string): void;
|
|
3344
3359
|
/**
|
|
3345
3360
|
* Get the view controller.
|
|
3346
3361
|
*
|