dwv 0.34.0-beta.15 → 0.34.0-beta.16
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 +72 -19
- package/dist/dwv.min.js +1 -1
- package/dist/dwv.min.js.map +1 -1
- package/package.json +14 -14
package/dist/dwv.d.ts
CHANGED
|
@@ -84,6 +84,12 @@ export declare class Annotation {
|
|
|
84
84
|
* @param {ViewController} viewController The associated view controller.
|
|
85
85
|
*/
|
|
86
86
|
setViewController(viewController: ViewController): void;
|
|
87
|
+
/**
|
|
88
|
+
* Get the centroid of the math shape.
|
|
89
|
+
*
|
|
90
|
+
* @returns {Point|undefined} The 3D centroid point.
|
|
91
|
+
*/
|
|
92
|
+
getCentroid(): Point | undefined;
|
|
87
93
|
/**
|
|
88
94
|
* Set the annotation text expression.
|
|
89
95
|
*
|
|
@@ -682,25 +688,20 @@ export declare class App {
|
|
|
682
688
|
/**
|
|
683
689
|
* Set the drawings of the active layer group.
|
|
684
690
|
*
|
|
685
|
-
* @deprecated
|
|
686
|
-
* @param {Array}
|
|
687
|
-
* @param {Array}
|
|
688
|
-
|
|
689
|
-
setDrawings(_drawings: any[], _drawingsDetails: any[]): void;
|
|
690
|
-
/**
|
|
691
|
-
* Get the JSON state of the app.
|
|
692
|
-
*
|
|
693
|
-
* @deprecated
|
|
694
|
-
* @returns {string} The state of the app as a JSON string.
|
|
691
|
+
* @deprecated Please switch to DICOM SR annotations.
|
|
692
|
+
* @param {Array} drawings An array of drawings.
|
|
693
|
+
* @param {Array} drawingsDetails An array of drawings details.
|
|
694
|
+
* @param {string} dataId The converted data id.
|
|
695
695
|
*/
|
|
696
|
-
|
|
696
|
+
setDrawings(drawings: any[], drawingsDetails: any[], dataId: string): void;
|
|
697
697
|
/**
|
|
698
698
|
* Apply a JSON state to this app.
|
|
699
699
|
*
|
|
700
700
|
* @deprecated
|
|
701
701
|
* @param {string} jsonState The state of the app as a JSON string.
|
|
702
|
+
* @param {string} dataId The state data id.
|
|
702
703
|
*/
|
|
703
|
-
applyJsonState(jsonState: string): void;
|
|
704
|
+
applyJsonState(jsonState: string, dataId: string): void;
|
|
704
705
|
/**
|
|
705
706
|
* Handle resize: fit the display to the window.
|
|
706
707
|
* To be called once the image is loaded.
|
|
@@ -1534,12 +1535,6 @@ export declare class DrawController {
|
|
|
1534
1535
|
* @param {string} value The value of the meta data.
|
|
1535
1536
|
*/
|
|
1536
1537
|
setAnnotationMeta(key: string, value: string): void;
|
|
1537
|
-
/**
|
|
1538
|
-
* Get draw store details.
|
|
1539
|
-
*
|
|
1540
|
-
* @deprecated
|
|
1541
|
-
*/
|
|
1542
|
-
getDrawStoreDetails(): void;
|
|
1543
1538
|
#private;
|
|
1544
1539
|
}
|
|
1545
1540
|
|
|
@@ -3725,6 +3720,12 @@ export declare class Point2D {
|
|
|
3725
3720
|
* @returns {number} The Y position of the point.
|
|
3726
3721
|
*/
|
|
3727
3722
|
getY(): number;
|
|
3723
|
+
/**
|
|
3724
|
+
* Get the centroid of the point, ie itself.
|
|
3725
|
+
*
|
|
3726
|
+
* @returns {Point2D} The centroid point.
|
|
3727
|
+
*/
|
|
3728
|
+
getCentroid(): Point2D;
|
|
3728
3729
|
/**
|
|
3729
3730
|
* Check for Point2D equality.
|
|
3730
3731
|
*
|
|
@@ -4326,12 +4327,55 @@ export declare class ToolConfig {
|
|
|
4326
4327
|
* List of client provided tools to be added to
|
|
4327
4328
|
* the default ones.
|
|
4328
4329
|
*
|
|
4330
|
+
* @example
|
|
4331
|
+
* // custom tool
|
|
4332
|
+
* class AlertTool {
|
|
4333
|
+
* mousedown() {alert('AlertTool mousedown');}
|
|
4334
|
+
* init() {}
|
|
4335
|
+
* activate() {}
|
|
4336
|
+
* }
|
|
4337
|
+
* // pass it to dwv tool list
|
|
4338
|
+
* dwv.toolList['Alert'] = AlertTool;
|
|
4339
|
+
* // create the dwv app
|
|
4340
|
+
* const app = new dwv.App();
|
|
4341
|
+
* // initialise
|
|
4342
|
+
* const viewConfig0 = new dwv.ViewConfig('layerGroup0');
|
|
4343
|
+
* const viewConfigs = {'*': [viewConfig0]};
|
|
4344
|
+
* const options = new dwv.AppOptions(viewConfigs);
|
|
4345
|
+
* options.tools = {Alert: {}};
|
|
4346
|
+
* app.init(options);
|
|
4347
|
+
* // activate tool
|
|
4348
|
+
* app.addEventListener('load', function () {
|
|
4349
|
+
* app.setTool('Alert');
|
|
4350
|
+
* });
|
|
4351
|
+
* // load dicom data
|
|
4352
|
+
* app.loadURLs([
|
|
4353
|
+
* 'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323851.dcm'
|
|
4354
|
+
* ]);
|
|
4355
|
+
*
|
|
4329
4356
|
* @type {Object<string, any>}
|
|
4330
4357
|
*/
|
|
4331
4358
|
export declare const toolList: {
|
|
4332
4359
|
[x: string]: any;
|
|
4333
4360
|
};
|
|
4334
4361
|
|
|
4362
|
+
export declare namespace toolOptions {
|
|
4363
|
+
export namespace draw {
|
|
4364
|
+
{ ArrowFactory };
|
|
4365
|
+
{ CircleFactory };
|
|
4366
|
+
{ EllipseFactory };
|
|
4367
|
+
{ ProtractorFactory };
|
|
4368
|
+
{ RectangleFactory };
|
|
4369
|
+
{ RoiFactory };
|
|
4370
|
+
{ RulerFactory };
|
|
4371
|
+
}
|
|
4372
|
+
export namespace filter {
|
|
4373
|
+
{ Threshold };
|
|
4374
|
+
{ Sobel };
|
|
4375
|
+
{ Sharpen };
|
|
4376
|
+
}
|
|
4377
|
+
}
|
|
4378
|
+
|
|
4335
4379
|
/**
|
|
4336
4380
|
* Immutable 3D vector.
|
|
4337
4381
|
*/
|
|
@@ -5006,9 +5050,11 @@ export declare class ViewController {
|
|
|
5006
5050
|
* Get a world position from a 2D plane position.
|
|
5007
5051
|
*
|
|
5008
5052
|
* @param {Point2D} point2D The input point.
|
|
5053
|
+
* @param {number} [k] Optional slice index,
|
|
5054
|
+
* if undefined, uses the current one.
|
|
5009
5055
|
* @returns {Point} The associated position.
|
|
5010
5056
|
*/
|
|
5011
|
-
getPositionFromPlanePoint(point2D: Point2D): Point;
|
|
5057
|
+
getPositionFromPlanePoint(point2D: Point2D, k?: number): Point;
|
|
5012
5058
|
/**
|
|
5013
5059
|
* Get a 2D plane position from a world position.
|
|
5014
5060
|
*
|
|
@@ -5016,6 +5062,13 @@ export declare class ViewController {
|
|
|
5016
5062
|
* @returns {Point2D} The 2D position.
|
|
5017
5063
|
*/
|
|
5018
5064
|
getPlanePositionFromPosition(point: Point): Point2D;
|
|
5065
|
+
/**
|
|
5066
|
+
* Get the index of a world position.
|
|
5067
|
+
*
|
|
5068
|
+
* @param {Point} point The 3D position.
|
|
5069
|
+
* @returns {Index} The index.
|
|
5070
|
+
*/
|
|
5071
|
+
getIndexFromPosition(point: Point): Index;
|
|
5019
5072
|
/**
|
|
5020
5073
|
* Set the current index.
|
|
5021
5074
|
*
|