dwv 0.33.0-beta.26 → 0.33.0-beta.28
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 +91 -38
- 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
|
@@ -1933,10 +1933,10 @@ declare class Image_2 {
|
|
|
1933
1933
|
*
|
|
1934
1934
|
* @param {number[][]} offsetsLists List of offset lists
|
|
1935
1935
|
* where to set the data.
|
|
1936
|
-
* @param {
|
|
1936
|
+
* @param {RGB|Array} value The value to set at the given offsets.
|
|
1937
1937
|
* @fires Image#imagechange
|
|
1938
1938
|
*/
|
|
1939
|
-
setAtOffsetsWithIterator(offsetsLists: number[][], value:
|
|
1939
|
+
setAtOffsetsWithIterator(offsetsLists: number[][], value: RGB | any[]): void;
|
|
1940
1940
|
/**
|
|
1941
1941
|
* Get the value of the image at a specific coordinate.
|
|
1942
1942
|
*
|
|
@@ -2316,6 +2316,35 @@ export declare class LayerGroup {
|
|
|
2316
2316
|
* @param {ViewLayer | DrawLayer} layer The layer to remove.
|
|
2317
2317
|
*/
|
|
2318
2318
|
removeLayer(layer: ViewLayer | DrawLayer): void;
|
|
2319
|
+
/**
|
|
2320
|
+
* Test if one of the view layers satisfies an input callbackFn.
|
|
2321
|
+
*
|
|
2322
|
+
* @param {Function} callbackFn A function that takes a ViewLayer as input
|
|
2323
|
+
* and returns a boolean.
|
|
2324
|
+
* @returns {boolean} True if one of the ViewLayers satisfies the callbackFn.
|
|
2325
|
+
*/
|
|
2326
|
+
someViewLayer(callbackFn: Function): boolean;
|
|
2327
|
+
/**
|
|
2328
|
+
* Can the input position be set on one of the view layers.
|
|
2329
|
+
*
|
|
2330
|
+
* @param {Point} position The input position.
|
|
2331
|
+
* @returns {boolean} True if one view layer accepts the input position.
|
|
2332
|
+
*/
|
|
2333
|
+
isPositionInBounds(position: Point): boolean;
|
|
2334
|
+
/**
|
|
2335
|
+
* Can one of the view layers be scrolled.
|
|
2336
|
+
*
|
|
2337
|
+
* @returns {boolean} True if one view layer can be scrolled.
|
|
2338
|
+
*/
|
|
2339
|
+
canScroll(): boolean;
|
|
2340
|
+
/**
|
|
2341
|
+
* Does one of the view layer have more than one slice in the
|
|
2342
|
+
* given dimension.
|
|
2343
|
+
*
|
|
2344
|
+
* @param {number} dim The input dimension.
|
|
2345
|
+
* @returns {boolean} True if one view layer has more than one slice.
|
|
2346
|
+
*/
|
|
2347
|
+
moreThanOne(dim: number): boolean;
|
|
2319
2348
|
/**
|
|
2320
2349
|
* Update layers (but not the active view layer) to a position change.
|
|
2321
2350
|
*
|
|
@@ -3159,6 +3188,24 @@ export declare class RGB {
|
|
|
3159
3188
|
b: number;
|
|
3160
3189
|
}
|
|
3161
3190
|
|
|
3191
|
+
/**
|
|
3192
|
+
* Scroll wheel class: provides a wheel event handler
|
|
3193
|
+
* that scroll the corresponding data.
|
|
3194
|
+
*/
|
|
3195
|
+
export declare class ScrollWheel {
|
|
3196
|
+
/**
|
|
3197
|
+
* @param {App} app The associated application.
|
|
3198
|
+
*/
|
|
3199
|
+
constructor(app: App);
|
|
3200
|
+
/**
|
|
3201
|
+
* Handle mouse wheel event.
|
|
3202
|
+
*
|
|
3203
|
+
* @param {WheelEvent} event The mouse wheel event.
|
|
3204
|
+
*/
|
|
3205
|
+
wheel(event: WheelEvent): void;
|
|
3206
|
+
#private;
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3162
3209
|
/**
|
|
3163
3210
|
* Immutable Size class.
|
|
3164
3211
|
* Warning: the input array is NOT cloned, modifying it will
|
|
@@ -3749,12 +3796,13 @@ export declare class View {
|
|
|
3749
3796
|
*/
|
|
3750
3797
|
getCurrentIndex(): Index;
|
|
3751
3798
|
/**
|
|
3752
|
-
* Check
|
|
3799
|
+
* Check if the current position (default) or
|
|
3800
|
+
* the provided position is in bounds.
|
|
3753
3801
|
*
|
|
3754
|
-
* @param {Point} position
|
|
3802
|
+
* @param {Point} [position] Optional position.
|
|
3755
3803
|
* @returns {boolean} True is the position is in bounds.
|
|
3756
3804
|
*/
|
|
3757
|
-
|
|
3805
|
+
isPositionInBounds(position?: Point): boolean;
|
|
3758
3806
|
/**
|
|
3759
3807
|
* Get the first origin or at a given position.
|
|
3760
3808
|
*
|
|
@@ -3846,42 +3894,12 @@ export declare class View {
|
|
|
3846
3894
|
* otherwise generates at current index.
|
|
3847
3895
|
*/
|
|
3848
3896
|
generateImageData(data: ImageData, index: Index): void;
|
|
3849
|
-
/**
|
|
3850
|
-
* Increment the provided dimension.
|
|
3851
|
-
*
|
|
3852
|
-
* @param {number} dim The dimension to increment.
|
|
3853
|
-
* @param {boolean} silent Do not send event.
|
|
3854
|
-
* @returns {boolean} False if not in bounds.
|
|
3855
|
-
*/
|
|
3856
|
-
incrementIndex(dim: number, silent: boolean): boolean;
|
|
3857
|
-
/**
|
|
3858
|
-
* Decrement the provided dimension.
|
|
3859
|
-
*
|
|
3860
|
-
* @param {number} dim The dimension to increment.
|
|
3861
|
-
* @param {boolean} silent Do not send event.
|
|
3862
|
-
* @returns {boolean} False if not in bounds.
|
|
3863
|
-
*/
|
|
3864
|
-
decrementIndex(dim: number, silent: boolean): boolean;
|
|
3865
3897
|
/**
|
|
3866
3898
|
* Get the scroll dimension index.
|
|
3867
3899
|
*
|
|
3868
3900
|
* @returns {number} The index.
|
|
3869
3901
|
*/
|
|
3870
3902
|
getScrollIndex(): number;
|
|
3871
|
-
/**
|
|
3872
|
-
* Decrement the scroll dimension index.
|
|
3873
|
-
*
|
|
3874
|
-
* @param {boolean} silent Do not send event.
|
|
3875
|
-
* @returns {boolean} False if not in bounds.
|
|
3876
|
-
*/
|
|
3877
|
-
decrementScrollIndex(silent: boolean): boolean;
|
|
3878
|
-
/**
|
|
3879
|
-
* Increment the scroll dimension index.
|
|
3880
|
-
*
|
|
3881
|
-
* @param {boolean} silent Do not send event.
|
|
3882
|
-
* @returns {boolean} False if not in bounds.
|
|
3883
|
-
*/
|
|
3884
|
-
incrementScrollIndex(silent: boolean): boolean;
|
|
3885
3903
|
#private;
|
|
3886
3904
|
}
|
|
3887
3905
|
|
|
@@ -4138,6 +4156,14 @@ export declare class ViewController {
|
|
|
4138
4156
|
* @returns {Size} The size.
|
|
4139
4157
|
*/
|
|
4140
4158
|
getImageSize(): Size;
|
|
4159
|
+
/**
|
|
4160
|
+
* Is the data size larger than one in the given dimension?
|
|
4161
|
+
*
|
|
4162
|
+
* @param {number} dim The dimension.
|
|
4163
|
+
* @returns {boolean} True if the image size is larger than one
|
|
4164
|
+
* in the given dimension.
|
|
4165
|
+
*/
|
|
4166
|
+
moreThanOne(dim: number): boolean;
|
|
4141
4167
|
/**
|
|
4142
4168
|
* Get the image world (mm) 2D size.
|
|
4143
4169
|
*
|
|
@@ -4158,12 +4184,13 @@ export declare class ViewController {
|
|
|
4158
4184
|
*/
|
|
4159
4185
|
equalImageMeta(meta: object): boolean;
|
|
4160
4186
|
/**
|
|
4161
|
-
* Check
|
|
4187
|
+
* Check if the current position (default) or
|
|
4188
|
+
* the provided position is in bounds.
|
|
4162
4189
|
*
|
|
4163
|
-
* @param {Point} position
|
|
4190
|
+
* @param {Point} [position] Optional position.
|
|
4164
4191
|
* @returns {boolean} True is the position is in bounds.
|
|
4165
4192
|
*/
|
|
4166
|
-
|
|
4193
|
+
isPositionInBounds(position?: Point): boolean;
|
|
4167
4194
|
/**
|
|
4168
4195
|
* Set the current position.
|
|
4169
4196
|
*
|
|
@@ -4210,6 +4237,32 @@ export declare class ViewController {
|
|
|
4210
4237
|
* @returns {Vector3D} The 3D world offset.
|
|
4211
4238
|
*/
|
|
4212
4239
|
getOffset3DFromPlaneOffset(offset2D: object): Vector3D;
|
|
4240
|
+
/**
|
|
4241
|
+
* Get the current position incremented in the input direction.
|
|
4242
|
+
*
|
|
4243
|
+
* @param {number} dim The direction in which to increment.
|
|
4244
|
+
* @returns {Point} The resulting point.
|
|
4245
|
+
*/
|
|
4246
|
+
getIncrementPosition(dim: number): Point;
|
|
4247
|
+
/**
|
|
4248
|
+
* Get the current position decremented in the input direction.
|
|
4249
|
+
*
|
|
4250
|
+
* @param {number} dim The direction in which to decrement.
|
|
4251
|
+
* @returns {Point} The resulting point.
|
|
4252
|
+
*/
|
|
4253
|
+
getDecrementPosition(dim: number): Point;
|
|
4254
|
+
/**
|
|
4255
|
+
* Get the current position decremented in the scroll direction.
|
|
4256
|
+
*
|
|
4257
|
+
* @returns {Point} The resulting point.
|
|
4258
|
+
*/
|
|
4259
|
+
getIncrementScrollPosition(): Point;
|
|
4260
|
+
/**
|
|
4261
|
+
* Get the current position decremented in the scroll direction.
|
|
4262
|
+
*
|
|
4263
|
+
* @returns {Point} The resulting point.
|
|
4264
|
+
*/
|
|
4265
|
+
getDecrementScrollPosition(): Point;
|
|
4213
4266
|
/**
|
|
4214
4267
|
* Increment the provided dimension.
|
|
4215
4268
|
*
|