dwv 0.36.0-beta.11 → 0.36.0-beta.13

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
@@ -3156,11 +3156,11 @@ declare class Image_2 {
3156
3156
  * @param {number} i The X index.
3157
3157
  * @param {number} j The Y index.
3158
3158
  * @param {number} k The Z index.
3159
- * @param {number} f The frame number.
3159
+ * @param {number} [f] Optional frame number.
3160
3160
  * @returns {number} The value at the desired position.
3161
3161
  * Warning: No size check...
3162
3162
  */
3163
- getValue(i: number, j: number, k: number, f: number): number;
3163
+ getValue(i: number, j: number, k: number, f?: number): number;
3164
3164
  /**
3165
3165
  * Get the value of the image at a specific index.
3166
3166
  *
@@ -3175,11 +3175,11 @@ declare class Image_2 {
3175
3175
  * @param {number} i The X index.
3176
3176
  * @param {number} j The Y index.
3177
3177
  * @param {number} k The Z index.
3178
- * @param {number} f The frame number.
3178
+ * @param {number} [f] Optional frame number.
3179
3179
  * @returns {number} The rescaled value at the desired position.
3180
3180
  * Warning: No size check...
3181
3181
  */
3182
- getRescaledValue(i: number, j: number, k: number, f: number): number;
3182
+ getRescaledValue(i: number, j: number, k: number, f?: number): number;
3183
3183
  /**
3184
3184
  * Get the rescaled value of the image at a specific index.
3185
3185
  *
@@ -3436,9 +3436,10 @@ export declare class LayerGroup {
3436
3436
  /**
3437
3437
  * Get the position helper.
3438
3438
  *
3439
- * @returns {PositionHelper} The position helper.
3439
+ * @returns {PositionHelper|undefined} The position helper or
3440
+ * undefined if no layers.
3440
3441
  */
3441
- getPositionHelper(): PositionHelper;
3442
+ getPositionHelper(): PositionHelper | undefined;
3442
3443
  /**
3443
3444
  * Get the showCrosshair flag.
3444
3445
  *
@@ -5318,7 +5319,7 @@ export declare class Size {
5318
5319
  *
5319
5320
  * @param {Index} index The index to convert.
5320
5321
  * @param {number} [start] Optional start dimension to base the offset on.
5321
- * @returns {number} The offset.
5322
+ * @returns {number} The offset or -1 if out of bounds.
5322
5323
  */
5323
5324
  indexToOffset(index: Index, start?: number): number;
5324
5325
  /**
@@ -5334,6 +5335,22 @@ export declare class Size {
5334
5335
  * @returns {Scalar2D} The 2D base [0,1] as {x,y}.
5335
5336
  */
5336
5337
  get2D(): Scalar2D;
5338
+ /**
5339
+ * Normalise a point to this size.
5340
+ *
5341
+ * @param {Point} point The input point.
5342
+ * @param {Point} [extra] Optional point used to fill extra dimensions.
5343
+ * @returns {Point} The result point.
5344
+ */
5345
+ normalisePoint(point: Point, extra?: Point): Point;
5346
+ /**
5347
+ * Normalise an index to this size.
5348
+ *
5349
+ * @param {Index} index The input index.
5350
+ * @param {Index} [extra] Optional index used to fill extra dimensions.
5351
+ * @returns {Index} The result point.
5352
+ */
5353
+ normaliseIndex(index: Index, extra?: Index): Index;
5337
5354
  #private;
5338
5355
  }
5339
5356
 
@@ -5862,14 +5879,6 @@ export declare class View {
5862
5879
  * (0 <= integer <= MAX_CONTOUR_SIZE).
5863
5880
  */
5864
5881
  setContourThickness(thickness: number): void;
5865
- /**
5866
- * Initialise the view: set initial index.
5867
- */
5868
- init(): void;
5869
- /**
5870
- * Set the initial index to the middle position.
5871
- */
5872
- setInitialIndex(): void;
5873
5882
  /**
5874
5883
  * Get the milliseconds per frame from frame rate.
5875
5884
  *
@@ -5917,9 +5926,9 @@ export declare class View {
5917
5926
  /**
5918
5927
  * Get the current window level preset name.
5919
5928
  *
5920
- * @returns {string} The preset name.
5929
+ * @returns {string|undefined} The preset name.
5921
5930
  */
5922
- getCurrentWindowPresetName(): string;
5931
+ getCurrentWindowPresetName(): string | undefined;
5923
5932
  /**
5924
5933
  * Get the colour map of the image.
5925
5934
  *
@@ -5936,15 +5945,15 @@ export declare class View {
5936
5945
  /**
5937
5946
  * Get the current position.
5938
5947
  *
5939
- * @returns {Point} The current position.
5948
+ * @returns {Point|undefined} The current position.
5940
5949
  */
5941
- getCurrentPosition(): Point;
5950
+ getCurrentPosition(): Point | undefined;
5942
5951
  /**
5943
5952
  * Get the current index.
5944
5953
  *
5945
- * @returns {Index} The current index.
5954
+ * @returns {Index|undefined} The current index.
5946
5955
  */
5947
- getCurrentIndex(): Index;
5956
+ getCurrentIndex(): Index | undefined;
5948
5957
  /**
5949
5958
  * Get the SOP image UID of the current image.
5950
5959
  *
@@ -5992,12 +6001,12 @@ export declare class View {
5992
6001
  /**
5993
6002
  * Set current position.
5994
6003
  *
5995
- * @param {Point} position The new position.
6004
+ * @param {Point} inPosition The new position.
5996
6005
  * @param {boolean} [silent] Flag to fire event or not.
5997
6006
  * @returns {boolean} False if not in bounds.
5998
6007
  * @fires View#positionchange
5999
6008
  */
6000
- setCurrentPosition(position: Point, silent?: boolean): boolean;
6009
+ setCurrentPosition(inPosition: Point, silent?: boolean): boolean;
6001
6010
  /**
6002
6011
  * Set the view window/level.
6003
6012
  *
@@ -6227,17 +6236,12 @@ export declare class ViewController {
6227
6236
  */
6228
6237
  isPlaying(): boolean;
6229
6238
  /**
6230
- * Get the position helper.
6239
+ * Get a position helper: returns a new helper
6240
+ * based on the current view.
6231
6241
  *
6232
6242
  * @returns {PositionHelper} The helper.
6233
6243
  */
6234
6244
  getPositionHelper(): PositionHelper;
6235
- /**
6236
- * Get a clone of the position helper.
6237
- *
6238
- * @returns {PositionHelper} The helper clone.
6239
- */
6240
- getPositionHelperClone(): PositionHelper;
6241
6245
  /**
6242
6246
  * Get the current position.
6243
6247
  *