dwv 0.35.0-beta.11 → 0.35.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
@@ -571,6 +571,7 @@ export declare class App {
571
571
  * Load a list of files. Can be image files or a state file.
572
572
  *
573
573
  * @param {File[]} files The list of files to load.
574
+ * @returns {string} The data ID, '-1' if problem.
574
575
  * @fires App#loadstart
575
576
  * @fires App#loadprogress
576
577
  * @fires App#loaditem
@@ -579,7 +580,7 @@ export declare class App {
579
580
  * @fires App#abort
580
581
  * @function
581
582
  */
582
- loadFiles: (files: File[]) => void;
583
+ loadFiles: (files: File[]) => string;
583
584
  /**
584
585
  * Load a list of URLs. Can be image files or a state file.
585
586
  *
@@ -588,6 +589,7 @@ export declare class App {
588
589
  * - requestHeaders: an array of {name, value} to use as request headers,
589
590
  * - withCredentials: boolean xhr.withCredentials flag to pass to the request,
590
591
  * - batchSize: the size of the request url batch.
592
+ * @returns {string} The data ID, '-1' if problem.
591
593
  * @fires App#loadstart
592
594
  * @fires App#loadprogress
593
595
  * @fires App#loaditem
@@ -596,7 +598,7 @@ export declare class App {
596
598
  * @fires App#abort
597
599
  * @function
598
600
  */
599
- loadURLs: (urls: string[], options?: object) => void;
601
+ loadURLs: (urls: string[], options?: object) => string;
600
602
  /**
601
603
  * Load from an input uri.
602
604
  *
@@ -610,6 +612,7 @@ export declare class App {
610
612
  *
611
613
  * @param {Array} data The list of ArrayBuffers to load
612
614
  * in the form of [{name: "", filename: "", data: data}].
615
+ * @returns {string} The data ID.
613
616
  * @fires App#loadstart
614
617
  * @fires App#loadprogress
615
618
  * @fires App#loaditem
@@ -618,7 +621,7 @@ export declare class App {
618
621
  * @fires App#abort
619
622
  * @function
620
623
  */
621
- loadImageObject: (data: any[]) => void;
624
+ loadImageObject: (data: any[]) => string;
622
625
  /**
623
626
  * Abort all the current loads.
624
627
  */
@@ -1694,7 +1697,7 @@ export declare class DrawLayer {
1694
1697
  */
1695
1698
  getDataId(): string;
1696
1699
  /**
1697
- * Get the reference data id.
1700
+ * Get the reference layer id.
1698
1701
  *
1699
1702
  * @returns {string} The id.
1700
1703
  */
@@ -3122,6 +3125,12 @@ export declare class LayerGroup {
3122
3125
  * @returns {number} The number of layers.
3123
3126
  */
3124
3127
  getNumberOfViewLayers(): number;
3128
+ /**
3129
+ * Get the active image layer.
3130
+ *
3131
+ * @returns {ViewLayer|DrawLayer|undefined} The layer.
3132
+ */
3133
+ getActiveLayer(): ViewLayer | DrawLayer | undefined;
3125
3134
  /**
3126
3135
  * Get the active image layer.
3127
3136
  *
@@ -3134,6 +3143,13 @@ export declare class LayerGroup {
3134
3143
  * @returns {ViewLayer|undefined} The layer.
3135
3144
  */
3136
3145
  getBaseViewLayer(): ViewLayer | undefined;
3146
+ /**
3147
+ * Get a view layer associated to a data id.
3148
+ *
3149
+ * @param {string} id The layer id.
3150
+ * @returns {ViewLayer|undefined} The layer.
3151
+ */
3152
+ getViewLayerById(id: string): ViewLayer | undefined;
3137
3153
  /**
3138
3154
  * Get the view layers associated to a data id.
3139
3155
  *
@@ -3160,6 +3176,13 @@ export declare class LayerGroup {
3160
3176
  * @returns {DrawLayer|undefined} The layer.
3161
3177
  */
3162
3178
  getActiveDrawLayer(): DrawLayer | undefined;
3179
+ /**
3180
+ * Get a draw layer associated to a data id.
3181
+ *
3182
+ * @param {string} id The layer id.
3183
+ * @returns {DrawLayer|undefined} The layer.
3184
+ */
3185
+ getDrawLayerById(id: string): DrawLayer | undefined;
3163
3186
  /**
3164
3187
  * Get the draw layers associated to a data id.
3165
3188
  *
@@ -3168,30 +3191,17 @@ export declare class LayerGroup {
3168
3191
  */
3169
3192
  getDrawLayersByDataId(dataId: string): DrawLayer[];
3170
3193
  /**
3171
- * Set the active view layer.
3194
+ * Set the active layer.
3172
3195
  *
3173
3196
  * @param {number} index The index of the layer to set as active.
3174
3197
  */
3175
- setActiveViewLayer(index: number): void;
3176
- /**
3177
- * Set the active view layer with a data id.
3178
- *
3179
- * @param {string} dataId The data id.
3180
- */
3181
- setActiveViewLayerByDataId(dataId: string): void;
3198
+ setActiveLayer(index: number): void;
3182
3199
  /**
3183
- * Set the active draw layer.
3184
- *
3185
- * @param {number|undefined} index The index of the layer to set as active
3186
- * or undefined to not set any.
3187
- */
3188
- setActiveDrawLayer(index: number | undefined): void;
3189
- /**
3190
- * Set the active draw layer with a data id.
3200
+ * Set the active layer with a data id.
3191
3201
  *
3192
3202
  * @param {string} dataId The data id.
3193
3203
  */
3194
- setActiveDrawLayerByDataId(dataId: string): void;
3204
+ setActiveLayerByDataId(dataId: string): void;
3195
3205
  /**
3196
3206
  * Add a view layer.
3197
3207
  *
@@ -4570,9 +4580,9 @@ export declare class ROI {
4570
4580
  * a non-self-intersecting closed polygon.
4571
4581
  * Ref: {@link https://en.wikipedia.org/wiki/Centroid#Of_a_polygon}.
4572
4582
  *
4573
- * @returns {Point2D} The centroid point.
4583
+ * @returns {Point2D|undefined} The centroid point.
4574
4584
  */
4575
- getCentroid(): Point2D;
4585
+ getCentroid(): Point2D | undefined;
4576
4586
  #private;
4577
4587
  }
4578
4588