dwv 0.34.1 → 0.35.0-beta.10

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 CHANGED
@@ -276,10 +276,11 @@ export declare class AnnotationGroupFactory {
276
276
  */
277
277
  getWarning(): string | undefined;
278
278
  /**
279
- * Check dicom elements. Throws an error if not suitable.
279
+ * Check dicom elements.
280
280
  *
281
281
  * @param {Object<string, DataElement>} dataElements The DICOM data elements.
282
282
  * @returns {string|undefined} A possible warning.
283
+ * @throws Error for missing or wrong data.
283
284
  */
284
285
  checkElements(dataElements: {
285
286
  [x: string]: DataElement;
@@ -289,6 +290,7 @@ export declare class AnnotationGroupFactory {
289
290
  *
290
291
  * @param {Object<string, DataElement>} dataElements The DICOM tags.
291
292
  * @returns {AnnotationGroup} A new annotation group.
293
+ * @throws Error for missing or wrong data.
292
294
  */
293
295
  create(dataElements: {
294
296
  [x: string]: DataElement;
@@ -476,9 +478,9 @@ export declare class App {
476
478
  * The layer is available after the first loaded item.
477
479
  *
478
480
  * @param {string} divId The div id.
479
- * @returns {LayerGroup} The layer group.
481
+ * @returns {LayerGroup|undefined} The layer group.
480
482
  */
481
- getLayerGroupByDivId(divId: string): LayerGroup;
483
+ getLayerGroupByDivId(divId: string): LayerGroup | undefined;
482
484
  /**
483
485
  * Get the number of layer groups.
484
486
  *
@@ -956,12 +958,6 @@ export declare class AppOptions {
956
958
  rootDocument: DocumentFragment;
957
959
  }
958
960
 
959
- export declare namespace BLACK {
960
- let r: number;
961
- let g: number;
962
- let b: number;
963
- }
964
-
965
961
  /**
966
962
  * Build a multipart message.
967
963
  *
@@ -1092,10 +1088,12 @@ export declare class Circle {
1092
1088
  * Quantify an circle according to view information.
1093
1089
  *
1094
1090
  * @param {ViewController} viewController The associated view controller.
1091
+ * @param {Index} index The index at which to get the
1092
+ * image values.
1095
1093
  * @param {string[]} flags A list of stat values to calculate.
1096
1094
  * @returns {object} A quantification object.
1097
1095
  */
1098
- quantify(viewController: ViewController, flags: string[]): object;
1096
+ quantify(viewController: ViewController, index: Index, flags: string[]): object;
1099
1097
  #private;
1100
1098
  }
1101
1099
 
@@ -1161,14 +1159,20 @@ export declare function createView(elements: {
1161
1159
  [x: string]: DataElement;
1162
1160
  }, image: Image_2): View;
1163
1161
 
1164
- export declare namespace customUI {
1165
- /**
1166
- * Open a dialogue to edit roi data. Defaults to window.prompt.
1167
- *
1168
- * @param {Annotation} annotation The roi data.
1169
- * @param {Function} callback The callback to launch on dialogue exit.
1170
- */
1171
- export function openRoiDialog(annotation: Annotation, callback: Function): void;
1162
+ export declare namespace custom {
1163
+ let wlPresets: {
1164
+ [x: string]: {
1165
+ [x: string]: WindowLevel;
1166
+ };
1167
+ };
1168
+ let labelTexts: {
1169
+ [x: string]: {
1170
+ [x: string]: string;
1171
+ };
1172
+ };
1173
+ let openRoiDialog: any;
1174
+ let getTagTime: any;
1175
+ let getTagPixelUnit: any;
1172
1176
  }
1173
1177
 
1174
1178
  /**
@@ -1239,25 +1243,6 @@ export declare const decoderScripts: {
1239
1243
  rle: string;
1240
1244
  };
1241
1245
 
1242
- /**
1243
- * List of default window level presets.
1244
- *
1245
- * @type {Object.<string, Object.<string, WindowLevel>>}
1246
- */
1247
- export declare const defaultPresets: {
1248
- [x: string]: {
1249
- [x: string]: WindowLevel;
1250
- };
1251
- };
1252
-
1253
- export declare namespace defaults {
1254
- let labelText: {
1255
- [x: string]: {
1256
- [x: string]: string;
1257
- };
1258
- };
1259
- }
1260
-
1261
1246
  /**
1262
1247
  * Delete segment command.
1263
1248
  */
@@ -1437,12 +1422,20 @@ export declare class DicomParser {
1437
1422
  [x: string]: DataElement;
1438
1423
  };
1439
1424
  /**
1440
- * Parse the complete DICOM file (given as input to the class).
1425
+ * Safely get an elements' first value from the parsed elements.
1426
+ *
1427
+ * @param {string} key The tag key as for example '00100020'.
1428
+ * @returns {any|undefined} The elements' value or undefined.
1429
+ */
1430
+ safeGet(key: string): any | undefined;
1431
+ /**
1432
+ * Parse a DICOM buffer.
1441
1433
  * Fills in the member object 'dataElements'.
1442
1434
  *
1443
1435
  * @param {ArrayBuffer} buffer The input array buffer.
1436
+ * @param {Tag} [untilTag] Optional tag to stop the parsing once reached.
1444
1437
  */
1445
- parse(buffer: ArrayBuffer): void;
1438
+ parse(buffer: ArrayBuffer, untilTag?: Tag): void;
1446
1439
  #private;
1447
1440
  }
1448
1441
 
@@ -1924,19 +1917,6 @@ export declare class DrawLayer {
1924
1917
  * @returns {boolean} True if the position was updated.
1925
1918
  */
1926
1919
  setCurrentPosition(position: Point, index?: Index): boolean;
1927
- /**
1928
- * Get the current position group.
1929
- *
1930
- * @returns {Konva.Group|undefined} The Konva.Group.
1931
- */
1932
- getCurrentPosGroup(): Konva.Group | undefined;
1933
- /**
1934
- * Get a Konva group using its id.
1935
- *
1936
- * @param {string} id The group id.
1937
- * @returns {object|undefined} The Konva group.
1938
- */
1939
- getGroup(id: string): object | undefined;
1940
1920
  /**
1941
1921
  * Add an event listener to this class.
1942
1922
  *
@@ -2092,10 +2072,12 @@ export declare class Ellipse {
2092
2072
  * Quantify an ellipse according to view information.
2093
2073
  *
2094
2074
  * @param {ViewController} viewController The associated view controller.
2075
+ * @param {Index} index The index at which to get the
2076
+ * image values.
2095
2077
  * @param {string[]} flags A list of stat values to calculate.
2096
2078
  * @returns {object} A quantification object.
2097
2079
  */
2098
- quantify(viewController: ViewController, flags: string[]): object;
2080
+ quantify(viewController: ViewController, index: Index, flags: string[]): object;
2099
2081
  #private;
2100
2082
  }
2101
2083
 
@@ -2104,14 +2086,14 @@ export declare class Ellipse {
2104
2086
  */
2105
2087
  export declare class Geometry {
2106
2088
  /**
2107
- * @param {Point3D} origin The object origin (a 3D point).
2089
+ * @param {Point3D[]} origins The object origins.
2108
2090
  * @param {Size} size The object size.
2109
2091
  * @param {Spacing} spacing The object spacing.
2110
2092
  * @param {Matrix33} [orientation] The object orientation (3*3 matrix,
2111
2093
  * default to 3*3 identity).
2112
2094
  * @param {number} [time] Optional time index.
2113
2095
  */
2114
- constructor(origin: Point3D, size: Size, spacing: Spacing, orientation?: Matrix33, time?: number);
2096
+ constructor(origins: Point3D[], size: Size, spacing: Spacing, orientation?: Matrix33, time?: number);
2115
2097
  /**
2116
2098
  * Get the time value that was passed at construction.
2117
2099
  *
@@ -2250,6 +2232,13 @@ export declare class Geometry {
2250
2232
  * @returns {boolean} True if the given coordinates are within bounds.
2251
2233
  */
2252
2234
  isIndexInBounds(index: Index, dirs?: number[]): boolean;
2235
+ /**
2236
+ * Get the geometrical range, ie the minimum and maximum
2237
+ * positions.
2238
+ *
2239
+ * @returns {Point[]} The min and max positions.
2240
+ */
2241
+ getRange(): Point[];
2253
2242
  /**
2254
2243
  * Convert an index into world coordinates.
2255
2244
  *
@@ -2625,6 +2614,25 @@ declare class Image_2 {
2625
2614
  * @param {string} interp The photometricInterpretation of the image.
2626
2615
  */
2627
2616
  setPhotometricInterpretation(interp: string): void;
2617
+ /**
2618
+ * Set the palette colour map.
2619
+ *
2620
+ * @param {ColourMap} map The colour map.
2621
+ */
2622
+ setPaletteColourMap(map: ColourMap): void;
2623
+ /**
2624
+ * Get the palette colour map.
2625
+ *
2626
+ * @returns {ColourMap} The colour map.
2627
+ */
2628
+ getPaletteColourMap(): ColourMap;
2629
+ /**
2630
+ * Update the palette colour map.
2631
+ *
2632
+ * @param {number} index The index to change the colour of.
2633
+ * @param {RGB} colour The colour to use at index.
2634
+ */
2635
+ updatePaletteColourMap(index: number, colour: RGB): void;
2628
2636
  /**
2629
2637
  * Get the planarConfiguration of the image.
2630
2638
  *
@@ -2757,21 +2765,21 @@ declare class Image_2 {
2757
2765
  *
2758
2766
  * @param {number[][]} offsetsLists List of offset lists where
2759
2767
  * to set the data.
2760
- * @param {RGB} value The value to set at the given offsets.
2768
+ * @param {number} value The value to set at the given offsets.
2761
2769
  * @returns {Array} A list of objects representing the original values before
2762
2770
  * replacing them.
2763
2771
  * @fires Image#imagecontentchange
2764
2772
  */
2765
- setAtOffsetsAndGetOriginals(offsetsLists: number[][], value: RGB): any[];
2773
+ setAtOffsetsAndGetOriginals(offsetsLists: number[][], value: number): any[];
2766
2774
  /**
2767
2775
  * Set the inner buffer values at given offsets.
2768
2776
  *
2769
2777
  * @param {number[][]} offsetsLists List of offset lists
2770
2778
  * where to set the data.
2771
- * @param {RGB|Array} value The value to set at the given offsets.
2779
+ * @param {number|Array} value The value to set at the given offsets.
2772
2780
  * @fires Image#imagecontentchange
2773
2781
  */
2774
- setAtOffsetsWithIterator(offsetsLists: number[][], value: RGB | any[]): void;
2782
+ setAtOffsetsWithIterator(offsetsLists: number[][], value: number | any[]): void;
2775
2783
  /**
2776
2784
  * Get the value of the image at a specific coordinate.
2777
2785
  *
@@ -2937,14 +2945,32 @@ export declare class Index {
2937
2945
  */
2938
2946
  compare(rhs: Index): number[];
2939
2947
  /**
2940
- * Add another index to this one.
2948
+ * Add another index to this one and return
2949
+ * the result as a new index.
2941
2950
  *
2942
2951
  * @param {Index} rhs The index to add.
2943
2952
  * @returns {Index} The index representing the sum of both indices.
2944
2953
  */
2945
2954
  add(rhs: Index): Index;
2946
2955
  /**
2947
- * Get the current index with a new 2D base.
2956
+ * Increment this index by 1 at the given dimension
2957
+ * and return the result as a new index.
2958
+ *
2959
+ * @param {number} dim The dimension number.
2960
+ * @returns {Index} The result index.
2961
+ */
2962
+ next(dim: number): Index;
2963
+ /**
2964
+ * Decrement this index by 1 at the given dimension
2965
+ * and return the result as a new index.
2966
+ *
2967
+ * @param {number} dim The dimension number.
2968
+ * @returns {Index} The result index.
2969
+ */
2970
+ previous(dim: number): Index;
2971
+ /**
2972
+ * Get the current index with a new 2D base
2973
+ * and return the result as a new index.
2948
2974
  *
2949
2975
  * @param {number} i The new 0 index.
2950
2976
  * @param {number} j The new 1 index.
@@ -2993,6 +3019,12 @@ export declare class LayerGroup {
2993
3019
  * @param {HTMLElement} containerDiv The associated HTML div.
2994
3020
  */
2995
3021
  constructor(containerDiv: HTMLElement);
3022
+ /**
3023
+ * Get the position helper.
3024
+ *
3025
+ * @returns {PositionHelper} The position helper.
3026
+ */
3027
+ getPositionHelper(): PositionHelper;
2996
3028
  /**
2997
3029
  * Get the showCrosshair flag.
2998
3030
  *
@@ -3014,9 +3046,9 @@ export declare class LayerGroup {
3014
3046
  /**
3015
3047
  * Get the Id of the container div.
3016
3048
  *
3017
- * @returns {string} The id of the div.
3049
+ * @returns {string|undefined} The id of the div.
3018
3050
  */
3019
- getDivId(): string;
3051
+ getDivId(): string | undefined;
3020
3052
  /**
3021
3053
  * Get the layer scale.
3022
3054
  *
@@ -3228,7 +3260,7 @@ export declare class LayerGroup {
3228
3260
  */
3229
3261
  moreThanOne(dim: number): boolean;
3230
3262
  /**
3231
- * Update layers (but not the active view layer) to a position change.
3263
+ * Update layers (but not the event source layer) to a position change.
3232
3264
  *
3233
3265
  * @param {object} event The position change event.
3234
3266
  * @function
@@ -3355,10 +3387,11 @@ export declare class MaskFactory {
3355
3387
  */
3356
3388
  getWarning(): string | undefined;
3357
3389
  /**
3358
- * Check dicom elements. Throws an error if not suitable.
3390
+ * Check dicom elements.
3359
3391
  *
3360
3392
  * @param {Object<string, DataElement>} _dicomElements The DICOM tags.
3361
3393
  * @returns {string|undefined} A possible warning.
3394
+ * @throws Error for missing or wrong data.
3362
3395
  */
3363
3396
  checkElements(_dicomElements: {
3364
3397
  [x: string]: DataElement;
@@ -3371,6 +3404,7 @@ export declare class MaskFactory {
3371
3404
  * Uint16Array | Int16Array |
3372
3405
  * Uint32Array | Int32Array} pixelBuffer The pixel buffer.
3373
3406
  * @returns {Image} A new Image.
3407
+ * @throws Error for missing or wrong data.
3374
3408
  */
3375
3409
  create(dataElements: {
3376
3410
  [x: string]: DataElement;
@@ -3541,9 +3575,9 @@ export declare class MaskSegmentViewHelper {
3541
3575
  /**
3542
3576
  * Add a segment to the hidden list.
3543
3577
  *
3544
- * @param {MaskSegment} segment The segment to add.
3578
+ * @param {number} segmentNumber The segment number.
3545
3579
  */
3546
- addToHidden(segment: MaskSegment): void;
3580
+ addToHidden(segmentNumber: number): void;
3547
3581
  /**
3548
3582
  * Remove a segment from the hidden list.
3549
3583
  *
@@ -3552,7 +3586,7 @@ export declare class MaskSegmentViewHelper {
3552
3586
  removeFromHidden(segmentNumber: number): void;
3553
3587
  /**
3554
3588
  * @callback alphaFn@callback alphaFn
3555
- * @param {number[]|number} value The pixel value.
3589
+ * @param {number|number[]} value The pixel value.
3556
3590
  * @param {number} index The values' index.
3557
3591
  * @returns {number} The opacity of the input value.
3558
3592
  */
@@ -3561,7 +3595,7 @@ export declare class MaskSegmentViewHelper {
3561
3595
  *
3562
3596
  * @returns {alphaFn} The corresponding alpha function.
3563
3597
  */
3564
- getAlphaFunc(): (value: number[] | number, index: number) => number;
3598
+ getAlphaFunc(): (value: number | number[], index: number) => number;
3565
3599
  #private;
3566
3600
  }
3567
3601
 
@@ -3871,6 +3905,13 @@ export declare class PlaneHelper {
3871
3905
  * @returns {Index} The corresponding index.
3872
3906
  */
3873
3907
  worldToIndex(point: Point): Index;
3908
+ /**
3909
+ * Image index to world.
3910
+ *
3911
+ * @param {Index} index The input index.
3912
+ * @returns {Point} The corresponding point.
3913
+ */
3914
+ indexToWorld(index: Index): Point;
3874
3915
  /**
3875
3916
  * Is this view in the same orientation as the image aquisition.
3876
3917
  *
@@ -3889,13 +3930,13 @@ export declare class PlaneHelper {
3889
3930
  *
3890
3931
  * @returns {number} The index.
3891
3932
  */
3892
- getScrollIndex(): number;
3933
+ getScrollDimIndex(): number;
3893
3934
  /**
3894
3935
  * Get the native (image) scroll dimension index.
3895
3936
  *
3896
3937
  * @returns {number} The index.
3897
3938
  */
3898
- getNativeScrollIndex(): number;
3939
+ getNativeScrollDimIndex(): number;
3899
3940
  #private;
3900
3941
  }
3901
3942
 
@@ -4114,6 +4155,153 @@ export declare class Point3D {
4114
4155
  #private;
4115
4156
  }
4116
4157
 
4158
+ /**
4159
+ * Position helper.
4160
+ */
4161
+ export declare class PositionHelper {
4162
+ /**
4163
+ * @param {View} view The associated view.
4164
+ */
4165
+ constructor(view: View);
4166
+ /**
4167
+ * Get the geometry.
4168
+ *
4169
+ * @returns {Geometry} The geometry.
4170
+ */
4171
+ getGeometry(): Geometry;
4172
+ /**
4173
+ * Get the scroll index.
4174
+ *
4175
+ * @returns {number} The scroll index.
4176
+ */
4177
+ getScrollDimIndex(): number;
4178
+ /**
4179
+ * Get the maximum dimension value.
4180
+ *
4181
+ * @param {number} dim The dimension.
4182
+ * @returns {number} The maximum value.
4183
+ */
4184
+ getMaximumDimValue(dim: number): number;
4185
+ /**
4186
+ * Get the maximum scroll value.
4187
+ *
4188
+ * @returns {number} The maximum value.
4189
+ */
4190
+ getMaximumScrollValue(): number;
4191
+ /**
4192
+ * Get the current position.
4193
+ *
4194
+ * @returns {Point} The current position.
4195
+ */
4196
+ getCurrentPosition(): Point;
4197
+ /**
4198
+ * Get the value at dimension index for the current position.
4199
+ *
4200
+ * @param {number} dim The dimension.
4201
+ * @returns {number} The value.
4202
+ */
4203
+ getCurrentPositionDimValue(dim: number): number;
4204
+ /**
4205
+ * Get the value at scroll index for the current position.
4206
+ *
4207
+ * @returns {number} The value.
4208
+ */
4209
+ getCurrentPositionScrollValue(): number;
4210
+ /**
4211
+ * Get the current position updated at the provided dimension index
4212
+ * with the input value.
4213
+ *
4214
+ * @param {number} dim The dimension.
4215
+ * @param {number} value The value to used at dimension index.
4216
+ * @returns {Point} The position.
4217
+ */
4218
+ getCurrentPositionAtDimValue(dim: number, value: number): Point;
4219
+ /**
4220
+ * Get the current position updated at scroll index with the input value.
4221
+ *
4222
+ * @param {number} value The value to use at scroll index.
4223
+ * @returns {Point} The position.
4224
+ */
4225
+ getCurrentPositionAtScrollValue(value: number): Point;
4226
+ /**
4227
+ * Get the current index.
4228
+ *
4229
+ * @returns {Index} The current index.
4230
+ */
4231
+ getCurrentIndex(): Index;
4232
+ /**
4233
+ * Set the current position.
4234
+ *
4235
+ * @param {Point} position The position.
4236
+ * @param {boolean} [silent] Flag to fire event or not.
4237
+ * @returns {boolean} True if possible and in bounds.
4238
+ */
4239
+ setCurrentPosition(position: Point, silent?: boolean): boolean;
4240
+ /**
4241
+ * Set the current position only if it is in the geometry bounds.
4242
+ *
4243
+ * @param {Point} position The position.
4244
+ * @param {boolean} [silent] Flag to fire event or not.
4245
+ * @returns {boolean} True if possible and in bounds.
4246
+ */
4247
+ setCurrentPositionSafe(position: Point, silent?: boolean): boolean;
4248
+ /**
4249
+ * Merge with another helper.
4250
+ *
4251
+ * @param {PositionHelper} rhs The helper to merge with this one.
4252
+ */
4253
+ merge(rhs: PositionHelper): void;
4254
+ /**
4255
+ * Check if the current position (default) or
4256
+ * the provided position is in bounds.
4257
+ *
4258
+ * @param {Point} position Optional position.
4259
+ * @returns {boolean} True is the position is in bounds.
4260
+ */
4261
+ isPositionInBounds(position: Point): boolean;
4262
+ /**
4263
+ * Get the current position incremented in the input direction.
4264
+ *
4265
+ * @param {number} dim The direction in which to increment.
4266
+ * @returns {Point} The resulting point.
4267
+ */
4268
+ getIncrementPosition(dim: number): Point;
4269
+ /**
4270
+ * Get the current position decremented in the input direction.
4271
+ *
4272
+ * @param {number} dim The direction in which to decrement.
4273
+ * @returns {Point} The resulting point.
4274
+ */
4275
+ getDecrementPosition(dim: number): Point;
4276
+ /**
4277
+ * Increment the current position along the provided dim.
4278
+ *
4279
+ * @param {number} dim The direction in which to increment.
4280
+ * @returns {boolean} True if possible and in bounds.
4281
+ */
4282
+ incrementPosition(dim: number): boolean;
4283
+ /**
4284
+ * Decrement the current position along the provided dim.
4285
+ *
4286
+ * @param {number} dim The direction in which to decrement.
4287
+ * @returns {boolean} True if possible and in bounds.
4288
+ */
4289
+ decrementPosition(dim: number): boolean;
4290
+ /**
4291
+ * Increment the current position along the scroll dimension.
4292
+ *
4293
+ * @returns {boolean} True if possible and in bounds.
4294
+ */
4295
+ incrementPositionAlongScroll(): boolean;
4296
+ /**
4297
+ * Decrement the current position along the scroll dimension.
4298
+ *
4299
+ * @returns {boolean} True if possible and in bounds.
4300
+ */
4301
+ decrementPositionAlongScroll(): boolean;
4302
+ #private;
4303
+ }
4304
+
4117
4305
  /**
4118
4306
  * Round a float number to a given precision.
4119
4307
  *
@@ -4253,10 +4441,12 @@ export declare class Rectangle {
4253
4441
  * Quantify a rectangle according to view information.
4254
4442
  *
4255
4443
  * @param {ViewController} viewController The associated view controller.
4444
+ * @param {Index} index The index at which to get the
4445
+ * image values.
4256
4446
  * @param {string[]} flags A list of stat values to calculate.
4257
4447
  * @returns {object} A quantification object.
4258
4448
  */
4259
- quantify(viewController: ViewController, flags: string[]): object;
4449
+ quantify(viewController: ViewController, index: Index, flags: string[]): object;
4260
4450
  #private;
4261
4451
  }
4262
4452
 
@@ -4694,23 +4884,6 @@ export declare class Tag {
4694
4884
  #private;
4695
4885
  }
4696
4886
 
4697
- /**
4698
- * Methods used to extract values from DICOM elements.
4699
- *
4700
- * Implemented as class and method to allow for override via its prototype.
4701
- */
4702
- export declare class TagValueExtractor {
4703
- /**
4704
- * Get the time.
4705
- *
4706
- * @param {Object<string, DataElement>} _elements The DICOM elements.
4707
- * @returns {number|undefined} The time value if available.
4708
- */
4709
- getTime(_elements: {
4710
- [x: string]: DataElement;
4711
- }): number | undefined;
4712
- }
4713
-
4714
4887
  /**
4715
4888
  * Toolbox controller.
4716
4889
  */
@@ -5172,23 +5345,23 @@ export declare class View {
5172
5345
  */
5173
5346
  getOrigin(position?: Point): Point3D;
5174
5347
  /**
5175
- * Set the current position.
5348
+ * Set the current position via an index.
5176
5349
  *
5177
- * @param {Point} position The new position.
5350
+ * @param {Index} index The new index.
5178
5351
  * @param {boolean} [silent] Flag to fire event or not.
5179
5352
  * @returns {boolean} False if not in bounds.
5180
5353
  * @fires View#positionchange
5181
5354
  */
5182
- setCurrentPosition(position: Point, silent?: boolean): boolean;
5355
+ setCurrentIndex(index: Index, silent?: boolean): boolean;
5183
5356
  /**
5184
- * Set the current index.
5357
+ * Set current position.
5185
5358
  *
5186
- * @param {Index} index The new index.
5359
+ * @param {Point} position The new position.
5187
5360
  * @param {boolean} [silent] Flag to fire event or not.
5188
5361
  * @returns {boolean} False if not in bounds.
5189
5362
  * @fires View#positionchange
5190
5363
  */
5191
- setCurrentIndex(index: Index, silent?: boolean): boolean;
5364
+ setCurrentPosition(position: Point, silent?: boolean): boolean;
5192
5365
  /**
5193
5366
  * Set the view window/level.
5194
5367
  *
@@ -5260,7 +5433,7 @@ export declare class View {
5260
5433
  *
5261
5434
  * @returns {number} The index.
5262
5435
  */
5263
- getScrollIndex(): number;
5436
+ getScrollDimIndex(): number;
5264
5437
  /**
5265
5438
  * Is this view in the same orientation as the image aquisition.
5266
5439
  *
@@ -5387,6 +5560,12 @@ export declare class ViewController {
5387
5560
  * @returns {boolean} True if the controler is playing.
5388
5561
  */
5389
5562
  isPlaying(): boolean;
5563
+ /**
5564
+ * Get the position helper.
5565
+ *
5566
+ * @returns {PositionHelper} The helper.
5567
+ */
5568
+ getPositionHelper(): PositionHelper;
5390
5569
  /**
5391
5570
  * Get the current position.
5392
5571
  *
@@ -5426,17 +5605,17 @@ export declare class ViewController {
5426
5605
  */
5427
5606
  getCurrentOrientedIndex(): Index;
5428
5607
  /**
5429
- * Get the scroll index.
5608
+ * Get the scroll dimension index.
5430
5609
  *
5431
5610
  * @returns {number} The index.
5432
5611
  */
5433
- getScrollIndex(): number;
5612
+ getScrollDimIndex(): number;
5434
5613
  /**
5435
- * Get the current scroll index value.
5614
+ * Get the current index scroll value.
5436
5615
  *
5437
- * @returns {object} The value.
5616
+ * @returns {number} The value.
5438
5617
  */
5439
- getCurrentScrollIndexValue(): object;
5618
+ getCurrentIndexScrollValue(): number;
5440
5619
  /**
5441
5620
  * Get the first origin or at a given position.
5442
5621
  *
@@ -5503,16 +5682,20 @@ export declare class ViewController {
5503
5682
  *
5504
5683
  * @param {Point2D} min Minimum point.
5505
5684
  * @param {Point2D} max Maximum point.
5685
+ * @param {Index} index The index at which to get the
5686
+ * image values (combined with min/max).
5506
5687
  * @returns {Array} A list of values.
5507
5688
  */
5508
- getImageRegionValues(min: Point2D, max: Point2D): any[];
5689
+ getImageRegionValues(min: Point2D, max: Point2D, index: Index): any[];
5509
5690
  /**
5510
5691
  * Get some values from the associated image in variable regions.
5511
5692
  *
5512
5693
  * @param {number[][][]} regions A list of [x, y] pairs (min, max).
5694
+ * @param {Index} index The index at which to get the
5695
+ * image values (combined with regions min/max).
5513
5696
  * @returns {Array} A list of values.
5514
5697
  */
5515
- getImageVariableRegionValues(regions: number[][][]): any[];
5698
+ getImageVariableRegionValues(regions: number[][][], index: Index): any[];
5516
5699
  /**
5517
5700
  * Can the image values be quantified?
5518
5701
  *
@@ -5635,62 +5818,6 @@ export declare class ViewController {
5635
5818
  * @returns {Vector3D} The 3D world offset.
5636
5819
  */
5637
5820
  getOffset3DFromPlaneOffset(offset2D: Scalar2D): Vector3D;
5638
- /**
5639
- * Get the current position incremented in the input direction.
5640
- *
5641
- * @param {number} dim The direction in which to increment.
5642
- * @returns {Point} The resulting point.
5643
- */
5644
- getIncrementPosition(dim: number): Point;
5645
- /**
5646
- * Get the current position decremented in the input direction.
5647
- *
5648
- * @param {number} dim The direction in which to decrement.
5649
- * @returns {Point} The resulting point.
5650
- */
5651
- getDecrementPosition(dim: number): Point;
5652
- /**
5653
- * Get the current position decremented in the scroll direction.
5654
- *
5655
- * @returns {Point} The resulting point.
5656
- */
5657
- getIncrementScrollPosition(): Point;
5658
- /**
5659
- * Get the current position decremented in the scroll direction.
5660
- *
5661
- * @returns {Point} The resulting point.
5662
- */
5663
- getDecrementScrollPosition(): Point;
5664
- /**
5665
- * Increment the provided dimension.
5666
- *
5667
- * @param {number} dim The dimension to increment.
5668
- * @param {boolean} [silent] Do not send event.
5669
- * @returns {boolean} False if not in bounds.
5670
- */
5671
- incrementIndex(dim: number, silent?: boolean): boolean;
5672
- /**
5673
- * Decrement the provided dimension.
5674
- *
5675
- * @param {number} dim The dimension to increment.
5676
- * @param {boolean} [silent] Do not send event.
5677
- * @returns {boolean} False if not in bounds.
5678
- */
5679
- decrementIndex(dim: number, silent?: boolean): boolean;
5680
- /**
5681
- * Decrement the scroll dimension index.
5682
- *
5683
- * @param {boolean} [silent] Do not send event.
5684
- * @returns {boolean} False if not in bounds.
5685
- */
5686
- decrementScrollIndex(silent?: boolean): boolean;
5687
- /**
5688
- * Increment the scroll dimension index.
5689
- *
5690
- * @param {boolean} [silent] Do not send event.
5691
- * @returns {boolean} False if not in bounds.
5692
- */
5693
- incrementScrollIndex(silent?: boolean): boolean;
5694
5821
  /**
5695
5822
  * Scroll play: loop through all slices.
5696
5823
  */