dwv 0.34.0-beta.9 → 0.35.0-beta.1
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 +800 -115
- package/dist/dwv.min.js +1 -1
- package/dist/dwv.min.js.map +1 -1
- package/package.json +18 -18
package/dist/dwv.d.ts
CHANGED
|
@@ -67,17 +67,49 @@ export declare class Annotation {
|
|
|
67
67
|
*/
|
|
68
68
|
labelPosition: Point2D | undefined;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* The plane origin, the 3D position of index [0, 0, k].
|
|
71
|
+
*
|
|
72
|
+
* @type {Point3D|undefined}
|
|
73
|
+
*/
|
|
74
|
+
planeOrigin: Point3D | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* A couple of points that help define the annotation plane.
|
|
77
|
+
*
|
|
78
|
+
* @type {Point3D[]|undefined}
|
|
79
|
+
*/
|
|
80
|
+
planePoints: Point3D[] | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Get the orientation name for this annotation.
|
|
83
|
+
*
|
|
84
|
+
* @returns {string|undefined} The orientation name,
|
|
85
|
+
* undefined if same as reference data.
|
|
86
|
+
*/
|
|
87
|
+
getOrientationName(): string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Initialise the annotation.
|
|
71
90
|
*
|
|
72
91
|
* @param {ViewController} viewController The associated view controller.
|
|
73
92
|
*/
|
|
93
|
+
init(viewController: ViewController): void;
|
|
94
|
+
/**
|
|
95
|
+
* Check if an input view is compatible with the annotation.
|
|
96
|
+
*
|
|
97
|
+
* @param {PlaneHelper} planeHelper The input view to check.
|
|
98
|
+
* @returns {boolean} True if compatible view.
|
|
99
|
+
*/
|
|
100
|
+
isCompatibleView(planeHelper: PlaneHelper): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Set the associated view controller if it is compatible.
|
|
103
|
+
*
|
|
104
|
+
* @param {ViewController} viewController The view controller.
|
|
105
|
+
*/
|
|
74
106
|
setViewController(viewController: ViewController): void;
|
|
75
107
|
/**
|
|
76
|
-
* Get the
|
|
108
|
+
* Get the centroid of the math shape.
|
|
77
109
|
*
|
|
78
|
-
* @returns {
|
|
110
|
+
* @returns {Point|undefined} The 3D centroid point.
|
|
79
111
|
*/
|
|
80
|
-
|
|
112
|
+
getCentroid(): Point | undefined;
|
|
81
113
|
/**
|
|
82
114
|
* Set the annotation text expression.
|
|
83
115
|
*
|
|
@@ -104,12 +136,6 @@ export declare class Annotation {
|
|
|
104
136
|
* @returns {object} The factory.
|
|
105
137
|
*/
|
|
106
138
|
getFactory(): object;
|
|
107
|
-
/**
|
|
108
|
-
* Get the string type of this annotation.
|
|
109
|
-
*
|
|
110
|
-
* @returns {string} The type.
|
|
111
|
-
*/
|
|
112
|
-
getType(): string;
|
|
113
139
|
#private;
|
|
114
140
|
}
|
|
115
141
|
|
|
@@ -146,6 +172,18 @@ export declare class AnnotationGroup {
|
|
|
146
172
|
* @param {boolean} flag True to make the annotation group editable.
|
|
147
173
|
*/
|
|
148
174
|
setEditable(flag: boolean): void;
|
|
175
|
+
/**
|
|
176
|
+
* Get the group colour.
|
|
177
|
+
*
|
|
178
|
+
* @returns {string} The colour as hex string.
|
|
179
|
+
*/
|
|
180
|
+
getColour(): string;
|
|
181
|
+
/**
|
|
182
|
+
* Set the group colour.
|
|
183
|
+
*
|
|
184
|
+
* @param {string} colour The colour as hex string.
|
|
185
|
+
*/
|
|
186
|
+
setColour(colour: string): void;
|
|
149
187
|
/**
|
|
150
188
|
* Add a new annotation.
|
|
151
189
|
*
|
|
@@ -299,6 +337,14 @@ export declare class App {
|
|
|
299
337
|
* @returns {DicomData|undefined} The data.
|
|
300
338
|
*/
|
|
301
339
|
getData(dataId: string): DicomData | undefined;
|
|
340
|
+
/**
|
|
341
|
+
* Get the image.
|
|
342
|
+
*
|
|
343
|
+
* @param {string} dataId The data id.
|
|
344
|
+
* @returns {Image|undefined} The associated image.
|
|
345
|
+
* @deprecated Since v0.34, please use the getData method.
|
|
346
|
+
*/
|
|
347
|
+
getImage(dataId: string): Image_2 | undefined;
|
|
302
348
|
/**
|
|
303
349
|
* Set the image at the given id.
|
|
304
350
|
*
|
|
@@ -339,7 +385,8 @@ export declare class App {
|
|
|
339
385
|
* Can the data (of the active view of the active layer) be scrolled?
|
|
340
386
|
*
|
|
341
387
|
* @returns {boolean} True if the data has a third dimension greater than one.
|
|
342
|
-
* @deprecated
|
|
388
|
+
* @deprecated Since v0.33, please use the ViewController
|
|
389
|
+
* equivalent directly instead.
|
|
343
390
|
*/
|
|
344
391
|
canScroll(): boolean;
|
|
345
392
|
/**
|
|
@@ -347,7 +394,8 @@ export declare class App {
|
|
|
347
394
|
* (of the active view of the active layer)?
|
|
348
395
|
*
|
|
349
396
|
* @returns {boolean} True if the data is monochrome.
|
|
350
|
-
* @deprecated
|
|
397
|
+
* @deprecated Since v0.33, please use the ViewController
|
|
398
|
+
* equivalent directly instead.
|
|
351
399
|
*/
|
|
352
400
|
canWindowLevel(): boolean;
|
|
353
401
|
/**
|
|
@@ -395,6 +443,16 @@ export declare class App {
|
|
|
395
443
|
* @returns {ViewLayer[]} The layers.
|
|
396
444
|
*/
|
|
397
445
|
getViewLayersByDataId(dataId: string): ViewLayer[];
|
|
446
|
+
/**
|
|
447
|
+
* Get a list of view layers according to an input callback function.
|
|
448
|
+
*
|
|
449
|
+
* @param {Function} [callbackFn] A function that takes
|
|
450
|
+
* a ViewLayer as input and returns a boolean. If undefined,
|
|
451
|
+
* returns all view layers.
|
|
452
|
+
* @returns {ViewLayer[]} The layers that
|
|
453
|
+
* satisfy the callbackFn.
|
|
454
|
+
*/
|
|
455
|
+
getViewLayers(callbackFn?: Function): ViewLayer[];
|
|
398
456
|
/**
|
|
399
457
|
* Get the draw layers associated to a data id.
|
|
400
458
|
* The layer are available after the first loaded item.
|
|
@@ -403,6 +461,16 @@ export declare class App {
|
|
|
403
461
|
* @returns {DrawLayer[]} The layers.
|
|
404
462
|
*/
|
|
405
463
|
getDrawLayersByDataId(dataId: string): DrawLayer[];
|
|
464
|
+
/**
|
|
465
|
+
* Get a list of draw layers according to an input callback function.
|
|
466
|
+
*
|
|
467
|
+
* @param {Function} [callbackFn] A function that takes
|
|
468
|
+
* a DrawLayer as input and returns a boolean. If undefined,
|
|
469
|
+
* returns all draw layers.
|
|
470
|
+
* @returns {DrawLayer[]} The layers that
|
|
471
|
+
* satisfy the callbackFn.
|
|
472
|
+
*/
|
|
473
|
+
getDrawLayers(callbackFn?: Function): DrawLayer[];
|
|
406
474
|
/**
|
|
407
475
|
* Get a layer group by div id.
|
|
408
476
|
* The layer is available after the first loaded item.
|
|
@@ -431,6 +499,15 @@ export declare class App {
|
|
|
431
499
|
* @function
|
|
432
500
|
*/
|
|
433
501
|
addToUndoStack: (cmd: object) => void;
|
|
502
|
+
/**
|
|
503
|
+
* Remove a command from the undo stack.
|
|
504
|
+
*
|
|
505
|
+
* @param {string} name The name of the command to remove.
|
|
506
|
+
* @returns {boolean} True if the command was found and removed.
|
|
507
|
+
* @fires UndoStack#undoremove
|
|
508
|
+
* @function
|
|
509
|
+
*/
|
|
510
|
+
removeFromUndoStack: (name: string) => boolean;
|
|
434
511
|
/**
|
|
435
512
|
* Initialise the application.
|
|
436
513
|
*
|
|
@@ -559,7 +636,8 @@ export declare class App {
|
|
|
559
636
|
* Init the Window/Level display
|
|
560
637
|
* (of the active layer of the active layer group).
|
|
561
638
|
*
|
|
562
|
-
* @deprecated
|
|
639
|
+
* @deprecated Since v0.33, please set the opacity
|
|
640
|
+
* of the desired view layer directly.
|
|
563
641
|
*/
|
|
564
642
|
initWLDisplay(): void;
|
|
565
643
|
/**
|
|
@@ -661,31 +739,28 @@ export declare class App {
|
|
|
661
739
|
* Set the active view layer (of the active layer group) opacity.
|
|
662
740
|
*
|
|
663
741
|
* @param {number} alpha The opacity ([0:1] range).
|
|
664
|
-
* @deprecated
|
|
742
|
+
* @deprecated Since v0.33, pplease set the opacity
|
|
743
|
+
* of the desired view layer directly.
|
|
665
744
|
*/
|
|
666
745
|
setOpacity(alpha: number): void;
|
|
667
746
|
/**
|
|
668
747
|
* Set the drawings of the active layer group.
|
|
669
748
|
*
|
|
670
|
-
* @deprecated
|
|
671
|
-
* @param {Array}
|
|
672
|
-
* @param {Array}
|
|
673
|
-
|
|
674
|
-
setDrawings(_drawings: any[], _drawingsDetails: any[]): void;
|
|
675
|
-
/**
|
|
676
|
-
* Get the JSON state of the app.
|
|
677
|
-
*
|
|
678
|
-
* @deprecated
|
|
679
|
-
* @returns {string} The state of the app as a JSON string.
|
|
749
|
+
* @deprecated Since v0.34, please switch to DICOM SR annotations.
|
|
750
|
+
* @param {Array} drawings An array of drawings.
|
|
751
|
+
* @param {Array} drawingsDetails An array of drawings details.
|
|
752
|
+
* @param {string} dataId The converted data id.
|
|
680
753
|
*/
|
|
681
|
-
|
|
754
|
+
setDrawings(drawings: any[], drawingsDetails: any[], dataId: string): void;
|
|
682
755
|
/**
|
|
683
756
|
* Apply a JSON state to this app.
|
|
684
757
|
*
|
|
685
|
-
* @deprecated
|
|
758
|
+
* @deprecated Since v0.34, please switch to DICOM SR
|
|
759
|
+
* for annotations.
|
|
686
760
|
* @param {string} jsonState The state of the app as a JSON string.
|
|
761
|
+
* @param {string} dataId The state data id.
|
|
687
762
|
*/
|
|
688
|
-
applyJsonState(jsonState: string): void;
|
|
763
|
+
applyJsonState(jsonState: string, dataId: string): void;
|
|
689
764
|
/**
|
|
690
765
|
* Handle resize: fit the display to the window.
|
|
691
766
|
* To be called once the image is loaded.
|
|
@@ -731,14 +806,16 @@ export declare class App {
|
|
|
731
806
|
* Set the colour map of the active view of the active layer group.
|
|
732
807
|
*
|
|
733
808
|
* @param {string} name The colour map name.
|
|
734
|
-
* @deprecated
|
|
809
|
+
* @deprecated Since v0.33, please use the ViewController
|
|
810
|
+
* equivalent directly instead.
|
|
735
811
|
*/
|
|
736
812
|
setColourMap(name: string): void;
|
|
737
813
|
/**
|
|
738
814
|
* Set the window/level preset of the active view of the active layer group.
|
|
739
815
|
*
|
|
740
816
|
* @param {string} preset The window/level preset.
|
|
741
|
-
* @deprecated
|
|
817
|
+
* @deprecated Since v0.33, please use the ViewController
|
|
818
|
+
* equivalent directly instead.
|
|
742
819
|
*/
|
|
743
820
|
setWindowLevelPreset(preset: string): void;
|
|
744
821
|
/**
|
|
@@ -794,18 +871,18 @@ export declare class App {
|
|
|
794
871
|
* Create new annotation data based on the data of
|
|
795
872
|
* the active view layer.
|
|
796
873
|
*
|
|
797
|
-
* @param {
|
|
798
|
-
* to the annotation.
|
|
874
|
+
* @param {string} refDataId The reference data id.
|
|
799
875
|
* @returns {DicomData} The new data.
|
|
800
876
|
*/
|
|
801
|
-
createAnnotationData(
|
|
877
|
+
createAnnotationData(refDataId: string): DicomData;
|
|
802
878
|
/**
|
|
803
879
|
* Add new data and render it with a simple new data view config.
|
|
804
880
|
*
|
|
805
881
|
* @param {DicomData} data The data to add.
|
|
806
882
|
* @param {string} divId The div where to draw.
|
|
883
|
+
* @param {string} refDataId The reference data id.
|
|
807
884
|
*/
|
|
808
|
-
addAndRenderAnnotationData(data: DicomData, divId: string): void;
|
|
885
|
+
addAndRenderAnnotationData(data: DicomData, divId: string, refDataId: string): void;
|
|
809
886
|
/**
|
|
810
887
|
* Add a draw layer.
|
|
811
888
|
*
|
|
@@ -879,12 +956,6 @@ export declare class AppOptions {
|
|
|
879
956
|
rootDocument: DocumentFragment;
|
|
880
957
|
}
|
|
881
958
|
|
|
882
|
-
export declare namespace BLACK {
|
|
883
|
-
let r: number;
|
|
884
|
-
let g: number;
|
|
885
|
-
let b: number;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
959
|
/**
|
|
889
960
|
* Build a multipart message.
|
|
890
961
|
*
|
|
@@ -949,6 +1020,79 @@ export declare class ChangeSegmentColourCommand {
|
|
|
949
1020
|
#private;
|
|
950
1021
|
}
|
|
951
1022
|
|
|
1023
|
+
/**
|
|
1024
|
+
* Circle shape.
|
|
1025
|
+
*/
|
|
1026
|
+
export declare class Circle {
|
|
1027
|
+
/**
|
|
1028
|
+
* @param {Point2D} centre A Point2D representing the centre
|
|
1029
|
+
* of the circle.
|
|
1030
|
+
* @param {number} radius The radius of the circle.
|
|
1031
|
+
*/
|
|
1032
|
+
constructor(centre: Point2D, radius: number);
|
|
1033
|
+
/**
|
|
1034
|
+
* Get the centre (point) of the circle.
|
|
1035
|
+
*
|
|
1036
|
+
* @returns {Point2D} The center (point) of the circle.
|
|
1037
|
+
*/
|
|
1038
|
+
getCenter(): Point2D;
|
|
1039
|
+
/**
|
|
1040
|
+
* Get the centroid of the circle.
|
|
1041
|
+
*
|
|
1042
|
+
* @returns {Point2D} The centroid point.
|
|
1043
|
+
*/
|
|
1044
|
+
getCentroid(): Point2D;
|
|
1045
|
+
/**
|
|
1046
|
+
* Get the radius of the circle.
|
|
1047
|
+
*
|
|
1048
|
+
* @returns {number} The radius of the circle.
|
|
1049
|
+
*/
|
|
1050
|
+
getRadius(): number;
|
|
1051
|
+
/**
|
|
1052
|
+
* Check for equality.
|
|
1053
|
+
*
|
|
1054
|
+
* @param {Circle} rhs The object to compare to.
|
|
1055
|
+
* @returns {boolean} True if both objects are equal.
|
|
1056
|
+
*/
|
|
1057
|
+
equals(rhs: Circle): boolean;
|
|
1058
|
+
/**
|
|
1059
|
+
* Get the surface of the circle.
|
|
1060
|
+
*
|
|
1061
|
+
* @returns {number} The surface of the circle.
|
|
1062
|
+
*/
|
|
1063
|
+
getSurface(): number;
|
|
1064
|
+
/**
|
|
1065
|
+
* Get the surface of the circle according to a spacing.
|
|
1066
|
+
*
|
|
1067
|
+
* @param {Scalar2D} spacing2D The 2D spacing.
|
|
1068
|
+
* @returns {number} The surface of the circle multiplied by the given
|
|
1069
|
+
* spacing or null for null spacings.
|
|
1070
|
+
*/
|
|
1071
|
+
getWorldSurface(spacing2D: Scalar2D): number;
|
|
1072
|
+
/**
|
|
1073
|
+
* Get the rounded limits of the circle.
|
|
1074
|
+
*
|
|
1075
|
+
* See: {@link https://en.wikipedia.org/wiki/Circle#Equations}.
|
|
1076
|
+
*
|
|
1077
|
+
* Circle formula: `x*x + y*y = r*r`.
|
|
1078
|
+
*
|
|
1079
|
+
* Implies: `y = (+-) sqrt(r*r - x*x)`.
|
|
1080
|
+
*
|
|
1081
|
+
* @returns {number[][][]} The rounded limits:
|
|
1082
|
+
* list of [x, y] pairs (min, max).
|
|
1083
|
+
*/
|
|
1084
|
+
getRound(): number[][][];
|
|
1085
|
+
/**
|
|
1086
|
+
* Quantify an circle according to view information.
|
|
1087
|
+
*
|
|
1088
|
+
* @param {ViewController} viewController The associated view controller.
|
|
1089
|
+
* @param {string[]} flags A list of stat values to calculate.
|
|
1090
|
+
* @returns {object} A quantification object.
|
|
1091
|
+
*/
|
|
1092
|
+
quantify(viewController: ViewController, flags: string[]): object;
|
|
1093
|
+
#private;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
952
1096
|
/**
|
|
953
1097
|
* Colour map: red, green and blue components
|
|
954
1098
|
* to associate with intensity values.
|
|
@@ -1519,12 +1663,6 @@ export declare class DrawController {
|
|
|
1519
1663
|
* @param {string} value The value of the meta data.
|
|
1520
1664
|
*/
|
|
1521
1665
|
setAnnotationMeta(key: string, value: string): void;
|
|
1522
|
-
/**
|
|
1523
|
-
* Get draw store details.
|
|
1524
|
-
*
|
|
1525
|
-
* @deprecated
|
|
1526
|
-
*/
|
|
1527
|
-
getDrawStoreDetails(): void;
|
|
1528
1666
|
#private;
|
|
1529
1667
|
}
|
|
1530
1668
|
|
|
@@ -1556,6 +1694,12 @@ export declare class DrawLayer {
|
|
|
1556
1694
|
* @returns {string} The id.
|
|
1557
1695
|
*/
|
|
1558
1696
|
getDataId(): string;
|
|
1697
|
+
/**
|
|
1698
|
+
* Get the reference data id.
|
|
1699
|
+
*
|
|
1700
|
+
* @returns {string} The id.
|
|
1701
|
+
*/
|
|
1702
|
+
getReferenceLayerId(): string;
|
|
1559
1703
|
/**
|
|
1560
1704
|
* Get the Konva stage.
|
|
1561
1705
|
*
|
|
@@ -1635,6 +1779,14 @@ export declare class DrawLayer {
|
|
|
1635
1779
|
* @param {Point3D} [center] The scale center.
|
|
1636
1780
|
*/
|
|
1637
1781
|
setScale(newScale: Scalar3D, center?: Point3D): void;
|
|
1782
|
+
/**
|
|
1783
|
+
* Initialise the layer scale.
|
|
1784
|
+
*
|
|
1785
|
+
* @param {Scalar3D} newScale The scale as {x,y,z}.
|
|
1786
|
+
* @param {Scalar2D} absoluteZoomOffset The zoom offset as {x,y}
|
|
1787
|
+
* without the fit scale (as provided by getAbsoluteZoomOffset).
|
|
1788
|
+
*/
|
|
1789
|
+
initScale(newScale: Scalar3D, absoluteZoomOffset: Scalar2D): void;
|
|
1638
1790
|
/**
|
|
1639
1791
|
* Set the layer offset.
|
|
1640
1792
|
*
|
|
@@ -1671,8 +1823,9 @@ export declare class DrawLayer {
|
|
|
1671
1823
|
*
|
|
1672
1824
|
* @param {Scalar2D} size The image size as {x,y}.
|
|
1673
1825
|
* @param {Scalar2D} spacing The image spacing as {x,y}.
|
|
1826
|
+
* @param {string} refLayerId The reference image dataId.
|
|
1674
1827
|
*/
|
|
1675
|
-
initialise(size: Scalar2D, spacing: Scalar2D): void;
|
|
1828
|
+
initialise(size: Scalar2D, spacing: Scalar2D, refLayerId: string): void;
|
|
1676
1829
|
/**
|
|
1677
1830
|
* Set the annotation group.
|
|
1678
1831
|
*
|
|
@@ -1681,6 +1834,12 @@ export declare class DrawLayer {
|
|
|
1681
1834
|
* @param {object} exeCallback The undo stack callback.
|
|
1682
1835
|
*/
|
|
1683
1836
|
setAnnotationGroup(annotationGroup: AnnotationGroup, dataId: string, exeCallback: object): void;
|
|
1837
|
+
/**
|
|
1838
|
+
* Activate shapes at current position.
|
|
1839
|
+
*
|
|
1840
|
+
* @param {boolean} flag The flag to activate or not.
|
|
1841
|
+
*/
|
|
1842
|
+
activateCurrentPositionShapes(flag: boolean): void;
|
|
1684
1843
|
/**
|
|
1685
1844
|
* Fit the layer to its parent container.
|
|
1686
1845
|
*
|
|
@@ -1712,10 +1871,17 @@ export declare class DrawLayer {
|
|
|
1712
1871
|
* will toggle visibility if not defined.
|
|
1713
1872
|
*/
|
|
1714
1873
|
setLabelsVisibility(visible?: boolean): void;
|
|
1874
|
+
/**
|
|
1875
|
+
* Set a shape group label visibility according to
|
|
1876
|
+
* this layer setting.
|
|
1877
|
+
*
|
|
1878
|
+
* @param {Konva.Group} shapeGroup The shape group.
|
|
1879
|
+
*/
|
|
1880
|
+
setLabelVisibility(shapeGroup: Konva.Group): void;
|
|
1715
1881
|
/**
|
|
1716
1882
|
* Delete a Draw from the stage.
|
|
1717
1883
|
*
|
|
1718
|
-
* @deprecated
|
|
1884
|
+
* @deprecated Since v0.34, please switch to `annotationGroup.remove`.
|
|
1719
1885
|
* @param {string} _id The id of the group to delete.
|
|
1720
1886
|
* @param {Function} _exeCallback The callback to call once the
|
|
1721
1887
|
* DeleteCommand has been executed.
|
|
@@ -1724,7 +1890,7 @@ export declare class DrawLayer {
|
|
|
1724
1890
|
/**
|
|
1725
1891
|
* Delete all Draws from the stage.
|
|
1726
1892
|
*
|
|
1727
|
-
* @deprecated
|
|
1893
|
+
* @deprecated Since v0.34, please switch to `annotationGroup.remove`.
|
|
1728
1894
|
* @param {Function} _exeCallback The callback to call once the
|
|
1729
1895
|
* DeleteCommand has been executed.
|
|
1730
1896
|
*/
|
|
@@ -1748,29 +1914,16 @@ export declare class DrawLayer {
|
|
|
1748
1914
|
* Set the current position.
|
|
1749
1915
|
*
|
|
1750
1916
|
* @param {Point} position The new position.
|
|
1751
|
-
* @param {Index} index
|
|
1917
|
+
* @param {Index} [index] Optional coresponding index.
|
|
1752
1918
|
* @returns {boolean} True if the position was updated.
|
|
1753
1919
|
*/
|
|
1754
|
-
setCurrentPosition(position: Point, index
|
|
1755
|
-
/**
|
|
1756
|
-
* Activate the current draw layer.
|
|
1757
|
-
*
|
|
1758
|
-
* @param {Index} index The current position.
|
|
1759
|
-
* @param {number} scrollIndex The scroll index.
|
|
1760
|
-
*/
|
|
1761
|
-
activateDrawLayer(index: Index, scrollIndex: number): void;
|
|
1920
|
+
setCurrentPosition(position: Point, index?: Index): boolean;
|
|
1762
1921
|
/**
|
|
1763
1922
|
* Get the current position group.
|
|
1764
1923
|
*
|
|
1765
1924
|
* @returns {Konva.Group|undefined} The Konva.Group.
|
|
1766
1925
|
*/
|
|
1767
1926
|
getCurrentPosGroup(): Konva.Group | undefined;
|
|
1768
|
-
/**
|
|
1769
|
-
* Get the non current position groups. Used to stop listeners.
|
|
1770
|
-
*
|
|
1771
|
-
* @returns {object[]} The groups that do not have the current position id.
|
|
1772
|
-
*/
|
|
1773
|
-
getNonCurrentPosGroup(): object[];
|
|
1774
1927
|
/**
|
|
1775
1928
|
* Get a Konva group using its id.
|
|
1776
1929
|
*
|
|
@@ -1846,11 +1999,11 @@ export declare class DrawShapeHandler {
|
|
|
1846
1999
|
/**
|
|
1847
2000
|
* Add shape group listeners.
|
|
1848
2001
|
*
|
|
1849
|
-
* @param {DrawLayer} drawLayer The origin draw layer.
|
|
1850
2002
|
* @param {Konva.Group} shapeGroup The shape group to set on.
|
|
1851
2003
|
* @param {Annotation} annotation The associated annotation.
|
|
2004
|
+
* @param {DrawLayer} drawLayer The origin draw layer.
|
|
1852
2005
|
*/
|
|
1853
|
-
|
|
2006
|
+
addShapeGroupListeners(shapeGroup: Konva.Group, annotation: Annotation, drawLayer: DrawLayer): void;
|
|
1854
2007
|
/**
|
|
1855
2008
|
* Remove shape group listeners.
|
|
1856
2009
|
*
|
|
@@ -1860,6 +2013,86 @@ export declare class DrawShapeHandler {
|
|
|
1860
2013
|
#private;
|
|
1861
2014
|
}
|
|
1862
2015
|
|
|
2016
|
+
/**
|
|
2017
|
+
* Ellipse shape.
|
|
2018
|
+
*/
|
|
2019
|
+
export declare class Ellipse {
|
|
2020
|
+
/**
|
|
2021
|
+
* @param {Point2D} centre A Point2D representing the centre
|
|
2022
|
+
* of the ellipse.
|
|
2023
|
+
* @param {number} a The radius of the ellipse on the horizontal axe.
|
|
2024
|
+
* @param {number} b The radius of the ellipse on the vertical axe.
|
|
2025
|
+
*/
|
|
2026
|
+
constructor(centre: Point2D, a: number, b: number);
|
|
2027
|
+
/**
|
|
2028
|
+
* Get the centre (point) of the ellipse.
|
|
2029
|
+
*
|
|
2030
|
+
* @returns {Point2D} The center (point) of the ellipse.
|
|
2031
|
+
*/
|
|
2032
|
+
getCenter(): Point2D;
|
|
2033
|
+
/**
|
|
2034
|
+
* Get the centroid of the ellipse.
|
|
2035
|
+
*
|
|
2036
|
+
* @returns {Point2D} The centroid point.
|
|
2037
|
+
*/
|
|
2038
|
+
getCentroid(): Point2D;
|
|
2039
|
+
/**
|
|
2040
|
+
* Get the radius of the ellipse on the horizontal axe.
|
|
2041
|
+
*
|
|
2042
|
+
* @returns {number} The radius of the ellipse on the horizontal axe.
|
|
2043
|
+
*/
|
|
2044
|
+
getA(): number;
|
|
2045
|
+
/**
|
|
2046
|
+
* Get the radius of the ellipse on the vertical axe.
|
|
2047
|
+
*
|
|
2048
|
+
* @returns {number} The radius of the ellipse on the vertical axe.
|
|
2049
|
+
*/
|
|
2050
|
+
getB(): number;
|
|
2051
|
+
/**
|
|
2052
|
+
* Check for equality.
|
|
2053
|
+
*
|
|
2054
|
+
* @param {Ellipse} rhs The object to compare to.
|
|
2055
|
+
* @returns {boolean} True if both objects are equal.
|
|
2056
|
+
*/
|
|
2057
|
+
equals(rhs: Ellipse): boolean;
|
|
2058
|
+
/**
|
|
2059
|
+
* Get the surface of the ellipse.
|
|
2060
|
+
*
|
|
2061
|
+
* @returns {number} The surface of the ellipse.
|
|
2062
|
+
*/
|
|
2063
|
+
getSurface(): number;
|
|
2064
|
+
/**
|
|
2065
|
+
* Get the surface of the ellipse according to a spacing.
|
|
2066
|
+
*
|
|
2067
|
+
* @param {Scalar2D} spacing2D The 2D spacing.
|
|
2068
|
+
* @returns {number} The surface of the ellipse multiplied by the given
|
|
2069
|
+
* spacing or null for null spacings.
|
|
2070
|
+
*/
|
|
2071
|
+
getWorldSurface(spacing2D: Scalar2D): number;
|
|
2072
|
+
/**
|
|
2073
|
+
* Get the rounded limits of the ellipse.
|
|
2074
|
+
*
|
|
2075
|
+
* See: {@link https://en.wikipedia.org/wiki/Ellipse#Standard_equation}.
|
|
2076
|
+
*
|
|
2077
|
+
* Ellipse formula: `x*x / a*a + y*y / b*b = 1`.
|
|
2078
|
+
*
|
|
2079
|
+
* Implies: `y = (+-)(b/a) * sqrt(a*a - x*x)`.
|
|
2080
|
+
*
|
|
2081
|
+
* @returns {number[][][]} The rounded limits:
|
|
2082
|
+
* list of [x, y] pairs (min, max).
|
|
2083
|
+
*/
|
|
2084
|
+
getRound(): number[][][];
|
|
2085
|
+
/**
|
|
2086
|
+
* Quantify an ellipse according to view information.
|
|
2087
|
+
*
|
|
2088
|
+
* @param {ViewController} viewController The associated view controller.
|
|
2089
|
+
* @param {string[]} flags A list of stat values to calculate.
|
|
2090
|
+
* @returns {object} A quantification object.
|
|
2091
|
+
*/
|
|
2092
|
+
quantify(viewController: ViewController, flags: string[]): object;
|
|
2093
|
+
#private;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
1863
2096
|
/**
|
|
1864
2097
|
* 2D/3D Geometry class.
|
|
1865
2098
|
*/
|
|
@@ -2104,7 +2337,7 @@ export declare function getEllipseIndices(center: Index, radius: number[], dir:
|
|
|
2104
2337
|
* @param {object} event The event to get the layer div id from. Expecting
|
|
2105
2338
|
* an event origininating from a canvas inside a layer HTML div
|
|
2106
2339
|
* with the 'layer' class and id generated with `getLayerDivId`.
|
|
2107
|
-
* @returns {object} The layer details as {groupDivId, layerId}.
|
|
2340
|
+
* @returns {object} The layer details as {groupDivId, layerIndex, layerId}.
|
|
2108
2341
|
*/
|
|
2109
2342
|
export declare function getLayerDetailsFromEvent(event: object): object;
|
|
2110
2343
|
|
|
@@ -2119,11 +2352,12 @@ export declare function getMousePoint(event: object): Point2D;
|
|
|
2119
2352
|
/**
|
|
2120
2353
|
* Get the name of an image orientation patient.
|
|
2121
2354
|
*
|
|
2122
|
-
* @param {number[]}
|
|
2355
|
+
* @param {number[]} cosines The image orientation
|
|
2356
|
+
* patient cosines (6 values).
|
|
2123
2357
|
* @returns {string|undefined} The orientation
|
|
2124
2358
|
* name: axial, coronal or sagittal.
|
|
2125
2359
|
*/
|
|
2126
|
-
export declare function getOrientationName(
|
|
2360
|
+
export declare function getOrientationName(cosines: number[]): string | undefined;
|
|
2127
2361
|
|
|
2128
2362
|
/**
|
|
2129
2363
|
* Get the PixelData Tag.
|
|
@@ -2132,6 +2366,16 @@ export declare function getOrientationName(orientation: number[]): string | unde
|
|
|
2132
2366
|
*/
|
|
2133
2367
|
export declare function getPixelDataTag(): Tag;
|
|
2134
2368
|
|
|
2369
|
+
/**
|
|
2370
|
+
* Get the indices that form a rectangle.
|
|
2371
|
+
*
|
|
2372
|
+
* @param {Index} center The rectangle center.
|
|
2373
|
+
* @param {number[]} size The 2 rectangle sizes.
|
|
2374
|
+
* @param {number[]} dir The 2 rectangle directions.
|
|
2375
|
+
* @returns {Index[]} The indices of the rectangle.
|
|
2376
|
+
*/
|
|
2377
|
+
export declare function getRectangleIndices(center: Index, size: number[], dir: number[]): Index[];
|
|
2378
|
+
|
|
2135
2379
|
/**
|
|
2136
2380
|
* Get patient orientation label in the reverse direction.
|
|
2137
2381
|
*
|
|
@@ -2274,6 +2518,13 @@ declare class Image_2 {
|
|
|
2274
2518
|
* @returns {Point3D|undefined} The origin.
|
|
2275
2519
|
*/
|
|
2276
2520
|
getOriginForImageUid(uid: string): Point3D | undefined;
|
|
2521
|
+
/**
|
|
2522
|
+
* Check if the image includes an UID.
|
|
2523
|
+
*
|
|
2524
|
+
* @param {string} uid The UID.
|
|
2525
|
+
* @returns {boolean} True if present.
|
|
2526
|
+
*/
|
|
2527
|
+
includesImageUid(uid: string): boolean;
|
|
2277
2528
|
/**
|
|
2278
2529
|
* Check if this image includes the input uids.
|
|
2279
2530
|
*
|
|
@@ -2304,7 +2555,7 @@ declare class Image_2 {
|
|
|
2304
2555
|
* Can window and level be applied to the data?
|
|
2305
2556
|
*
|
|
2306
2557
|
* @returns {boolean} True if the data is monochrome.
|
|
2307
|
-
* @deprecated
|
|
2558
|
+
* @deprecated Since v0.33, please use isMonochrome instead.
|
|
2308
2559
|
*/
|
|
2309
2560
|
canWindowLevel(): boolean;
|
|
2310
2561
|
/**
|
|
@@ -2368,6 +2619,25 @@ declare class Image_2 {
|
|
|
2368
2619
|
* @param {string} interp The photometricInterpretation of the image.
|
|
2369
2620
|
*/
|
|
2370
2621
|
setPhotometricInterpretation(interp: string): void;
|
|
2622
|
+
/**
|
|
2623
|
+
* Set the palette colour map.
|
|
2624
|
+
*
|
|
2625
|
+
* @param {ColourMap} map The colour map.
|
|
2626
|
+
*/
|
|
2627
|
+
setPaletteColourMap(map: ColourMap): void;
|
|
2628
|
+
/**
|
|
2629
|
+
* Get the palette colour map.
|
|
2630
|
+
*
|
|
2631
|
+
* @returns {ColourMap} The colour map.
|
|
2632
|
+
*/
|
|
2633
|
+
getPaletteColourMap(): ColourMap;
|
|
2634
|
+
/**
|
|
2635
|
+
* Update the palette colour map.
|
|
2636
|
+
*
|
|
2637
|
+
* @param {number} index The index to change the colour of.
|
|
2638
|
+
* @param {RGB} colour The colour to use at index.
|
|
2639
|
+
*/
|
|
2640
|
+
updatePaletteColourMap(index: number, colour: RGB): void;
|
|
2371
2641
|
/**
|
|
2372
2642
|
* Get the planarConfiguration of the image.
|
|
2373
2643
|
*
|
|
@@ -2500,21 +2770,21 @@ declare class Image_2 {
|
|
|
2500
2770
|
*
|
|
2501
2771
|
* @param {number[][]} offsetsLists List of offset lists where
|
|
2502
2772
|
* to set the data.
|
|
2503
|
-
* @param {
|
|
2773
|
+
* @param {number} value The value to set at the given offsets.
|
|
2504
2774
|
* @returns {Array} A list of objects representing the original values before
|
|
2505
2775
|
* replacing them.
|
|
2506
2776
|
* @fires Image#imagecontentchange
|
|
2507
2777
|
*/
|
|
2508
|
-
setAtOffsetsAndGetOriginals(offsetsLists: number[][], value:
|
|
2778
|
+
setAtOffsetsAndGetOriginals(offsetsLists: number[][], value: number): any[];
|
|
2509
2779
|
/**
|
|
2510
2780
|
* Set the inner buffer values at given offsets.
|
|
2511
2781
|
*
|
|
2512
2782
|
* @param {number[][]} offsetsLists List of offset lists
|
|
2513
2783
|
* where to set the data.
|
|
2514
|
-
* @param {
|
|
2784
|
+
* @param {number|Array} value The value to set at the given offsets.
|
|
2515
2785
|
* @fires Image#imagecontentchange
|
|
2516
2786
|
*/
|
|
2517
|
-
setAtOffsetsWithIterator(offsetsLists: number[][], value:
|
|
2787
|
+
setAtOffsetsWithIterator(offsetsLists: number[][], value: number | any[]): void;
|
|
2518
2788
|
/**
|
|
2519
2789
|
* Get the value of the image at a specific coordinate.
|
|
2520
2790
|
*
|
|
@@ -2694,13 +2964,6 @@ export declare class Index {
|
|
|
2694
2964
|
* @returns {Index} The new index.
|
|
2695
2965
|
*/
|
|
2696
2966
|
getWithNew2D(i: number, j: number): Index;
|
|
2697
|
-
/**
|
|
2698
|
-
* Get a string id from the index values in the form of: '#0-1_#1-2'.
|
|
2699
|
-
*
|
|
2700
|
-
* @param {number[]} [dims] Optional list of dimensions to use.
|
|
2701
|
-
* @returns {string} The string id.
|
|
2702
|
-
*/
|
|
2703
|
-
toStringId(dims?: number[]): string;
|
|
2704
2967
|
#private;
|
|
2705
2968
|
}
|
|
2706
2969
|
|
|
@@ -2805,6 +3068,35 @@ export declare class LayerGroup {
|
|
|
2805
3068
|
* a layer with the input id.
|
|
2806
3069
|
*/
|
|
2807
3070
|
includes(id: string): boolean;
|
|
3071
|
+
/**
|
|
3072
|
+
* Get a list of view layers according to an input callback function.
|
|
3073
|
+
*
|
|
3074
|
+
* @param {Function} [callbackFn] A function that takes
|
|
3075
|
+
* a ViewLayer as input and returns a boolean. If undefined,
|
|
3076
|
+
* returns all view layers.
|
|
3077
|
+
* @returns {ViewLayer[]} The layers that
|
|
3078
|
+
* satisfy the callbackFn.
|
|
3079
|
+
*/
|
|
3080
|
+
getViewLayers(callbackFn?: Function): ViewLayer[];
|
|
3081
|
+
/**
|
|
3082
|
+
* Test if one of the view layers satisfies an input callbackFn.
|
|
3083
|
+
*
|
|
3084
|
+
* @param {Function} callbackFn A function that takes
|
|
3085
|
+
* a ViewLayer as input and returns a boolean.
|
|
3086
|
+
* @returns {boolean} True if one of the ViewLayers
|
|
3087
|
+
* satisfies the callbackFn.
|
|
3088
|
+
*/
|
|
3089
|
+
someViewLayer(callbackFn: Function): boolean;
|
|
3090
|
+
/**
|
|
3091
|
+
* Get a list of draw layers according to an input callback function.
|
|
3092
|
+
*
|
|
3093
|
+
* @param {Function} [callbackFn] A function that takes
|
|
3094
|
+
* a DrawLayer as input and returns a boolean. If undefined,
|
|
3095
|
+
* returns all draw layers.
|
|
3096
|
+
* @returns {DrawLayer[]} The layers that
|
|
3097
|
+
* satisfy the callbackFn.
|
|
3098
|
+
*/
|
|
3099
|
+
getDrawLayers(callbackFn?: Function): DrawLayer[];
|
|
2808
3100
|
/**
|
|
2809
3101
|
* Get the number of view layers handled by this class.
|
|
2810
3102
|
*
|
|
@@ -2871,9 +3163,10 @@ export declare class LayerGroup {
|
|
|
2871
3163
|
/**
|
|
2872
3164
|
* Set the active draw layer.
|
|
2873
3165
|
*
|
|
2874
|
-
* @param {number} index The index of the layer to set as active
|
|
3166
|
+
* @param {number|undefined} index The index of the layer to set as active
|
|
3167
|
+
* or undefined to not set any.
|
|
2875
3168
|
*/
|
|
2876
|
-
setActiveDrawLayer(index: number): void;
|
|
3169
|
+
setActiveDrawLayer(index: number | undefined): void;
|
|
2877
3170
|
/**
|
|
2878
3171
|
* Set the active draw layer with a data id.
|
|
2879
3172
|
*
|
|
@@ -2926,14 +3219,6 @@ export declare class LayerGroup {
|
|
|
2926
3219
|
* Remove the tooltip html div.
|
|
2927
3220
|
*/
|
|
2928
3221
|
removeTooltipDiv(): void;
|
|
2929
|
-
/**
|
|
2930
|
-
* Test if one of the view layers satisfies an input callbackFn.
|
|
2931
|
-
*
|
|
2932
|
-
* @param {Function} callbackFn A function that takes a ViewLayer as input
|
|
2933
|
-
* and returns a boolean.
|
|
2934
|
-
* @returns {boolean} True if one of the ViewLayers satisfies the callbackFn.
|
|
2935
|
-
*/
|
|
2936
|
-
someViewLayer(callbackFn: Function): boolean;
|
|
2937
3222
|
/**
|
|
2938
3223
|
* Can the input position be set on one of the view layers.
|
|
2939
3224
|
*
|
|
@@ -3213,6 +3498,12 @@ export declare class MaskSegmentHelper {
|
|
|
3213
3498
|
* @returns {boolean} True if the segment is included.
|
|
3214
3499
|
*/
|
|
3215
3500
|
hasSegment(segmentNumber: number): boolean;
|
|
3501
|
+
/**
|
|
3502
|
+
* Get the number of segments of the segmentation.
|
|
3503
|
+
*
|
|
3504
|
+
* @returns {number} The number of segments.
|
|
3505
|
+
*/
|
|
3506
|
+
getNumberOfSegments(): number;
|
|
3216
3507
|
/**
|
|
3217
3508
|
* Check if a segment is present in a mask image.
|
|
3218
3509
|
*
|
|
@@ -3263,9 +3554,9 @@ export declare class MaskSegmentViewHelper {
|
|
|
3263
3554
|
/**
|
|
3264
3555
|
* Add a segment to the hidden list.
|
|
3265
3556
|
*
|
|
3266
|
-
* @param {
|
|
3557
|
+
* @param {number} segmentNumber The segment number.
|
|
3267
3558
|
*/
|
|
3268
|
-
addToHidden(
|
|
3559
|
+
addToHidden(segmentNumber: number): void;
|
|
3269
3560
|
/**
|
|
3270
3561
|
* Remove a segment from the hidden list.
|
|
3271
3562
|
*
|
|
@@ -3274,7 +3565,7 @@ export declare class MaskSegmentViewHelper {
|
|
|
3274
3565
|
removeFromHidden(segmentNumber: number): void;
|
|
3275
3566
|
/**
|
|
3276
3567
|
* @callback alphaFn@callback alphaFn
|
|
3277
|
-
* @param {number
|
|
3568
|
+
* @param {number} value The pixel value.
|
|
3278
3569
|
* @param {number} index The values' index.
|
|
3279
3570
|
* @returns {number} The opacity of the input value.
|
|
3280
3571
|
*/
|
|
@@ -3283,7 +3574,7 @@ export declare class MaskSegmentViewHelper {
|
|
|
3283
3574
|
*
|
|
3284
3575
|
* @returns {alphaFn} The corresponding alpha function.
|
|
3285
3576
|
*/
|
|
3286
|
-
getAlphaFunc(): (value: number
|
|
3577
|
+
getAlphaFunc(): (value: number, index: number) => number;
|
|
3287
3578
|
#private;
|
|
3288
3579
|
}
|
|
3289
3580
|
|
|
@@ -3478,11 +3769,22 @@ export declare class OverlayData {
|
|
|
3478
3769
|
*/
|
|
3479
3770
|
export declare class PlaneHelper {
|
|
3480
3771
|
/**
|
|
3481
|
-
* @param {
|
|
3482
|
-
* @param {Matrix33} imageOrientation The image oientation.
|
|
3772
|
+
* @param {Geometry} imageGeometry The image geometry.
|
|
3483
3773
|
* @param {Matrix33} viewOrientation The view orientation.
|
|
3484
3774
|
*/
|
|
3485
|
-
constructor(
|
|
3775
|
+
constructor(imageGeometry: Geometry, viewOrientation: Matrix33);
|
|
3776
|
+
/**
|
|
3777
|
+
* Get the view orientation.
|
|
3778
|
+
*
|
|
3779
|
+
* @returns {Matrix33} The orientation matrix.
|
|
3780
|
+
*/
|
|
3781
|
+
getViewOrientation(): Matrix33;
|
|
3782
|
+
/**
|
|
3783
|
+
* Get the target orientation.
|
|
3784
|
+
*
|
|
3785
|
+
* @returns {Matrix33} The orientation matrix.
|
|
3786
|
+
*/
|
|
3787
|
+
getTargetOrientation(): Matrix33;
|
|
3486
3788
|
/**
|
|
3487
3789
|
* Get a 3D offset from a plane one.
|
|
3488
3790
|
*
|
|
@@ -3546,6 +3848,48 @@ export declare class PlaneHelper {
|
|
|
3546
3848
|
* @returns {Point3D} The de-orienteded point.
|
|
3547
3849
|
*/
|
|
3548
3850
|
getImageDeOrientedPoint3D(point: Point3D): Point3D;
|
|
3851
|
+
/**
|
|
3852
|
+
* Get a world position from a 2D plane position.
|
|
3853
|
+
*
|
|
3854
|
+
* @param {Point2D} point2D The plane point.
|
|
3855
|
+
* @param {number} k The slice index.
|
|
3856
|
+
* @returns {Point3D} The world position.
|
|
3857
|
+
*/
|
|
3858
|
+
getPositionFromPlanePoint(point2D: Point2D, k: number): Point3D;
|
|
3859
|
+
/**
|
|
3860
|
+
* Get a 2D plane position from a world position.
|
|
3861
|
+
*
|
|
3862
|
+
* @param {Point} point The world position.
|
|
3863
|
+
* @returns {Point3D} The plane point.
|
|
3864
|
+
*/
|
|
3865
|
+
getPlanePointFromPosition(point: Point): Point3D;
|
|
3866
|
+
/**
|
|
3867
|
+
* Get the cosines of this plane.
|
|
3868
|
+
*
|
|
3869
|
+
* @returns {number[]} The 2 cosines vectors (3D).
|
|
3870
|
+
*/
|
|
3871
|
+
getCosines(): number[];
|
|
3872
|
+
/**
|
|
3873
|
+
* Get a list of points that define the plane at input position,
|
|
3874
|
+
* given this classes orientation.
|
|
3875
|
+
*
|
|
3876
|
+
* @param {Point} position The position.
|
|
3877
|
+
* @returns {Point3D[]} An origin and 2 cosines vectors.
|
|
3878
|
+
*/
|
|
3879
|
+
getPlanePoints(position: Point): Point3D[];
|
|
3880
|
+
/**
|
|
3881
|
+
* Image world to index.
|
|
3882
|
+
*
|
|
3883
|
+
* @param {Point} point The input point.
|
|
3884
|
+
* @returns {Index} The corresponding index.
|
|
3885
|
+
*/
|
|
3886
|
+
worldToIndex(point: Point): Index;
|
|
3887
|
+
/**
|
|
3888
|
+
* Is this view in the same orientation as the image aquisition.
|
|
3889
|
+
*
|
|
3890
|
+
* @returns {boolean} True if in aquisition plane.
|
|
3891
|
+
*/
|
|
3892
|
+
isAquisitionOrientation(): boolean;
|
|
3549
3893
|
/**
|
|
3550
3894
|
* Reorder values to follow target orientation.
|
|
3551
3895
|
*
|
|
@@ -3571,7 +3915,7 @@ export declare class PlaneHelper {
|
|
|
3571
3915
|
/**
|
|
3572
3916
|
* Immutable point.
|
|
3573
3917
|
* Warning: the input array is NOT cloned, modifying it will
|
|
3574
|
-
* modify the
|
|
3918
|
+
* modify the point values.
|
|
3575
3919
|
*/
|
|
3576
3920
|
export declare class Point {
|
|
3577
3921
|
/**
|
|
@@ -3579,26 +3923,26 @@ export declare class Point {
|
|
|
3579
3923
|
*/
|
|
3580
3924
|
constructor(values: number[]);
|
|
3581
3925
|
/**
|
|
3582
|
-
* Get the
|
|
3926
|
+
* Get the point value at the given array index.
|
|
3583
3927
|
*
|
|
3584
3928
|
* @param {number} i The index to get.
|
|
3585
3929
|
* @returns {number} The value.
|
|
3586
3930
|
*/
|
|
3587
3931
|
get(i: number): number;
|
|
3588
3932
|
/**
|
|
3589
|
-
* Get the length of the
|
|
3933
|
+
* Get the length of the point.
|
|
3590
3934
|
*
|
|
3591
3935
|
* @returns {number} The length.
|
|
3592
3936
|
*/
|
|
3593
3937
|
length(): number;
|
|
3594
3938
|
/**
|
|
3595
|
-
* Get a string representation of the
|
|
3939
|
+
* Get a string representation of the point.
|
|
3596
3940
|
*
|
|
3597
|
-
* @returns {string} The
|
|
3941
|
+
* @returns {string} The point as a string.
|
|
3598
3942
|
*/
|
|
3599
3943
|
toString(): string;
|
|
3600
3944
|
/**
|
|
3601
|
-
* Get the values of this
|
|
3945
|
+
* Get the values of this point.
|
|
3602
3946
|
*
|
|
3603
3947
|
* @returns {number[]} The array of values.
|
|
3604
3948
|
*/
|
|
@@ -3668,6 +4012,18 @@ export declare class Point2D {
|
|
|
3668
4012
|
* @returns {number} The Y position of the point.
|
|
3669
4013
|
*/
|
|
3670
4014
|
getY(): number;
|
|
4015
|
+
/**
|
|
4016
|
+
* Get the values of this point.
|
|
4017
|
+
*
|
|
4018
|
+
* @returns {number[]} The array of values.
|
|
4019
|
+
*/
|
|
4020
|
+
getValues(): number[];
|
|
4021
|
+
/**
|
|
4022
|
+
* Get the centroid of the point, ie itself.
|
|
4023
|
+
*
|
|
4024
|
+
* @returns {Point2D} The centroid point.
|
|
4025
|
+
*/
|
|
4026
|
+
getCentroid(): Point2D;
|
|
3671
4027
|
/**
|
|
3672
4028
|
* Check for Point2D equality.
|
|
3673
4029
|
*
|
|
@@ -3719,6 +4075,12 @@ export declare class Point3D {
|
|
|
3719
4075
|
* @returns {number} The Z position of the point.
|
|
3720
4076
|
*/
|
|
3721
4077
|
getZ(): number;
|
|
4078
|
+
/**
|
|
4079
|
+
* Get the values of this point.
|
|
4080
|
+
*
|
|
4081
|
+
* @returns {number[]} The array of values.
|
|
4082
|
+
*/
|
|
4083
|
+
getValues(): number[];
|
|
3722
4084
|
/**
|
|
3723
4085
|
* Check for Point3D equality.
|
|
3724
4086
|
*
|
|
@@ -3780,6 +4142,137 @@ export declare class Point3D {
|
|
|
3780
4142
|
*/
|
|
3781
4143
|
export declare function precisionRound(number: number, precision: number): number;
|
|
3782
4144
|
|
|
4145
|
+
/**
|
|
4146
|
+
* Protractor shape: 3 points from which to calculate an angle.
|
|
4147
|
+
*/
|
|
4148
|
+
export declare class Protractor {
|
|
4149
|
+
/**
|
|
4150
|
+
* @param {Point2D[]} points The list of Point2D that make
|
|
4151
|
+
* the protractor.
|
|
4152
|
+
*/
|
|
4153
|
+
constructor(points: Point2D[]);
|
|
4154
|
+
/**
|
|
4155
|
+
* Get a point of the list.
|
|
4156
|
+
*
|
|
4157
|
+
* @param {number} index The index of the point
|
|
4158
|
+
* to get (beware, no size check).
|
|
4159
|
+
* @returns {Point2D|undefined} The Point2D at the given index.
|
|
4160
|
+
*/
|
|
4161
|
+
getPoint(index: number): Point2D | undefined;
|
|
4162
|
+
/**
|
|
4163
|
+
* Get the length of the path (should be 3).
|
|
4164
|
+
*
|
|
4165
|
+
* @returns {number} The length of the path.
|
|
4166
|
+
*/
|
|
4167
|
+
getLength(): number;
|
|
4168
|
+
/**
|
|
4169
|
+
* Get the centroid of the protractor.
|
|
4170
|
+
*
|
|
4171
|
+
* @returns {Point2D} THe centroid point.
|
|
4172
|
+
*/
|
|
4173
|
+
getCentroid(): Point2D;
|
|
4174
|
+
/**
|
|
4175
|
+
* Quantify a path according to view information.
|
|
4176
|
+
*
|
|
4177
|
+
* @param {ViewController} _viewController The associated view controller.
|
|
4178
|
+
* @param {string[]} _flags A list of stat values to calculate.
|
|
4179
|
+
* @returns {object} A quantification object.
|
|
4180
|
+
*/
|
|
4181
|
+
quantify(_viewController: ViewController, _flags: string[]): object;
|
|
4182
|
+
#private;
|
|
4183
|
+
}
|
|
4184
|
+
|
|
4185
|
+
/**
|
|
4186
|
+
* Rectangle shape.
|
|
4187
|
+
*/
|
|
4188
|
+
export declare class Rectangle {
|
|
4189
|
+
/**
|
|
4190
|
+
* @param {Point2D} begin A Point2D representing the beginning
|
|
4191
|
+
* of the rectangle.
|
|
4192
|
+
* @param {Point2D} end A Point2D representing the end
|
|
4193
|
+
* of the rectangle.
|
|
4194
|
+
*/
|
|
4195
|
+
constructor(begin: Point2D, end: Point2D);
|
|
4196
|
+
/**
|
|
4197
|
+
* Get the begin point of the rectangle.
|
|
4198
|
+
*
|
|
4199
|
+
* @returns {Point2D} The begin point of the rectangle.
|
|
4200
|
+
*/
|
|
4201
|
+
getBegin(): Point2D;
|
|
4202
|
+
/**
|
|
4203
|
+
* Get the end point of the rectangle.
|
|
4204
|
+
*
|
|
4205
|
+
* @returns {Point2D} The end point of the rectangle.
|
|
4206
|
+
*/
|
|
4207
|
+
getEnd(): Point2D;
|
|
4208
|
+
/**
|
|
4209
|
+
* Check for equality.
|
|
4210
|
+
*
|
|
4211
|
+
* @param {Rectangle} rhs The object to compare to.
|
|
4212
|
+
* @returns {boolean} True if both objects are equal.
|
|
4213
|
+
*/
|
|
4214
|
+
equals(rhs: Rectangle): boolean;
|
|
4215
|
+
/**
|
|
4216
|
+
* Get the surface of the rectangle.
|
|
4217
|
+
*
|
|
4218
|
+
* @returns {number} The surface of the rectangle.
|
|
4219
|
+
*/
|
|
4220
|
+
getSurface(): number;
|
|
4221
|
+
/**
|
|
4222
|
+
* Get the surface of the rectangle according to a spacing.
|
|
4223
|
+
*
|
|
4224
|
+
* @param {Scalar2D} spacing2D The 2D spacing.
|
|
4225
|
+
* @returns {number} The surface of the rectangle multiplied by the given
|
|
4226
|
+
* spacing or null for null spacings.
|
|
4227
|
+
*/
|
|
4228
|
+
getWorldSurface(spacing2D: Scalar2D): number;
|
|
4229
|
+
/**
|
|
4230
|
+
* Get the real width of the rectangle.
|
|
4231
|
+
*
|
|
4232
|
+
* @returns {number} The real width of the rectangle.
|
|
4233
|
+
*/
|
|
4234
|
+
getRealWidth(): number;
|
|
4235
|
+
/**
|
|
4236
|
+
* Get the real height of the rectangle.
|
|
4237
|
+
*
|
|
4238
|
+
* @returns {number} The real height of the rectangle.
|
|
4239
|
+
*/
|
|
4240
|
+
getRealHeight(): number;
|
|
4241
|
+
/**
|
|
4242
|
+
* Get the width of the rectangle.
|
|
4243
|
+
*
|
|
4244
|
+
* @returns {number} The width of the rectangle.
|
|
4245
|
+
*/
|
|
4246
|
+
getWidth(): number;
|
|
4247
|
+
/**
|
|
4248
|
+
* Get the height of the rectangle.
|
|
4249
|
+
*
|
|
4250
|
+
* @returns {number} The height of the rectangle.
|
|
4251
|
+
*/
|
|
4252
|
+
getHeight(): number;
|
|
4253
|
+
/**
|
|
4254
|
+
* Get the rounded limits of the rectangle.
|
|
4255
|
+
*
|
|
4256
|
+
* @returns {object} The rounded limits as {min, max} (Point2D).
|
|
4257
|
+
*/
|
|
4258
|
+
getRound(): object;
|
|
4259
|
+
/**
|
|
4260
|
+
* Get the centroid of the rectangle.
|
|
4261
|
+
*
|
|
4262
|
+
* @returns {Point2D} The centroid point.
|
|
4263
|
+
*/
|
|
4264
|
+
getCentroid(): Point2D;
|
|
4265
|
+
/**
|
|
4266
|
+
* Quantify a rectangle according to view information.
|
|
4267
|
+
*
|
|
4268
|
+
* @param {ViewController} viewController The associated view controller.
|
|
4269
|
+
* @param {string[]} flags A list of stat values to calculate.
|
|
4270
|
+
* @returns {object} A quantification object.
|
|
4271
|
+
*/
|
|
4272
|
+
quantify(viewController: ViewController, flags: string[]): object;
|
|
4273
|
+
#private;
|
|
4274
|
+
}
|
|
4275
|
+
|
|
3783
4276
|
/**
|
|
3784
4277
|
* Rescale Slope and Intercept.
|
|
3785
4278
|
*/
|
|
@@ -3854,6 +4347,58 @@ export declare class RGB {
|
|
|
3854
4347
|
b: number;
|
|
3855
4348
|
}
|
|
3856
4349
|
|
|
4350
|
+
/**
|
|
4351
|
+
* Region Of Interest shape.
|
|
4352
|
+
* Note: should be a closed path.
|
|
4353
|
+
*/
|
|
4354
|
+
export declare class ROI {
|
|
4355
|
+
/**
|
|
4356
|
+
* @param {Point2D[]} [points] Optional initial point list.
|
|
4357
|
+
*/
|
|
4358
|
+
constructor(points?: Point2D[]);
|
|
4359
|
+
/**
|
|
4360
|
+
* Get a point of the list at a given index.
|
|
4361
|
+
*
|
|
4362
|
+
* @param {number} index The index of the point to get
|
|
4363
|
+
* (beware, no size check).
|
|
4364
|
+
* @returns {Point2D|undefined} The Point2D at the given index.
|
|
4365
|
+
*/
|
|
4366
|
+
getPoint(index: number): Point2D | undefined;
|
|
4367
|
+
/**
|
|
4368
|
+
* Get the point list.
|
|
4369
|
+
*
|
|
4370
|
+
* @returns {Point2D[]} The list.
|
|
4371
|
+
*/
|
|
4372
|
+
getPoints(): Point2D[];
|
|
4373
|
+
/**
|
|
4374
|
+
* Get the length of the point list.
|
|
4375
|
+
*
|
|
4376
|
+
* @returns {number} The length of the point list.
|
|
4377
|
+
*/
|
|
4378
|
+
getLength(): number;
|
|
4379
|
+
/**
|
|
4380
|
+
* Add a point to the ROI.
|
|
4381
|
+
*
|
|
4382
|
+
* @param {Point2D} point The Point2D to add.
|
|
4383
|
+
*/
|
|
4384
|
+
addPoint(point: Point2D): void;
|
|
4385
|
+
/**
|
|
4386
|
+
* Add points to the ROI.
|
|
4387
|
+
*
|
|
4388
|
+
* @param {Point2D[]} rhs The array of POints2D to add.
|
|
4389
|
+
*/
|
|
4390
|
+
addPoints(rhs: Point2D[]): void;
|
|
4391
|
+
/**
|
|
4392
|
+
* Get the centroid of the roi. Only valid for
|
|
4393
|
+
* a non-self-intersecting closed polygon.
|
|
4394
|
+
* Ref: {@link https://en.wikipedia.org/wiki/Centroid#Of_a_polygon}.
|
|
4395
|
+
*
|
|
4396
|
+
* @returns {Point2D} The centroid point.
|
|
4397
|
+
*/
|
|
4398
|
+
getCentroid(): Point2D;
|
|
4399
|
+
#private;
|
|
4400
|
+
}
|
|
4401
|
+
|
|
3857
4402
|
/**
|
|
3858
4403
|
* Mutable 2D scalar ({x,y}).
|
|
3859
4404
|
*/
|
|
@@ -4269,12 +4814,109 @@ export declare class ToolConfig {
|
|
|
4269
4814
|
* List of client provided tools to be added to
|
|
4270
4815
|
* the default ones.
|
|
4271
4816
|
*
|
|
4817
|
+
* @example
|
|
4818
|
+
* // custom tool
|
|
4819
|
+
* class AlertTool {
|
|
4820
|
+
* mousedown() {alert('AlertTool mousedown');}
|
|
4821
|
+
* init() {}
|
|
4822
|
+
* activate() {}
|
|
4823
|
+
* }
|
|
4824
|
+
* // pass it to dwv tool list
|
|
4825
|
+
* dwv.toolList['Alert'] = AlertTool;
|
|
4826
|
+
* // create the dwv app
|
|
4827
|
+
* const app = new dwv.App();
|
|
4828
|
+
* // initialise
|
|
4829
|
+
* const viewConfig0 = new dwv.ViewConfig('layerGroup0');
|
|
4830
|
+
* const viewConfigs = {'*': [viewConfig0]};
|
|
4831
|
+
* const options = new dwv.AppOptions(viewConfigs);
|
|
4832
|
+
* options.tools = {Alert: {}};
|
|
4833
|
+
* app.init(options);
|
|
4834
|
+
* // activate tool
|
|
4835
|
+
* app.addEventListener('load', function () {
|
|
4836
|
+
* app.setTool('Alert');
|
|
4837
|
+
* });
|
|
4838
|
+
* // load dicom data
|
|
4839
|
+
* app.loadURLs([
|
|
4840
|
+
* 'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323851.dcm'
|
|
4841
|
+
* ]);
|
|
4842
|
+
*
|
|
4272
4843
|
* @type {Object<string, any>}
|
|
4273
4844
|
*/
|
|
4274
4845
|
export declare const toolList: {
|
|
4275
4846
|
[x: string]: any;
|
|
4276
4847
|
};
|
|
4277
4848
|
|
|
4849
|
+
/**
|
|
4850
|
+
* List of client provided tool options to be added to
|
|
4851
|
+
* the default ones.
|
|
4852
|
+
*
|
|
4853
|
+
* @example
|
|
4854
|
+
* // custom factory
|
|
4855
|
+
* class LoveFactory {
|
|
4856
|
+
* getName() {return 'love';}
|
|
4857
|
+
* static supports(mathShape) {return mathShape instanceof ROI;}
|
|
4858
|
+
* getNPoints() {return 1;}
|
|
4859
|
+
* getTimeout() {return 0;}
|
|
4860
|
+
* setAnnotationMathShape(annotation, points) {
|
|
4861
|
+
* const px = points[0].getX();
|
|
4862
|
+
* const py = points[0].getY();
|
|
4863
|
+
* annotation.mathShape = new dwv.ROI([
|
|
4864
|
+
* new dwv.Point2D(px+15,py), new dwv.Point2D(px+10,py-10),
|
|
4865
|
+
* new dwv.Point2D(px,py), new dwv.Point2D(px-10,py-10),
|
|
4866
|
+
* new dwv.Point2D(px-15,py), new dwv.Point2D(px,py+20)
|
|
4867
|
+
* ]);
|
|
4868
|
+
* annotation.getFactory = function () {return new LoveFactory();}
|
|
4869
|
+
* }
|
|
4870
|
+
* createShapeGroup(annotation, style) {
|
|
4871
|
+
* const roi = annotation.mathShape;
|
|
4872
|
+
* // konva line
|
|
4873
|
+
* const arr = [];
|
|
4874
|
+
* for (let i = 0; i < roi.getLength(); ++i) {
|
|
4875
|
+
* arr.push(roi.getPoint(i).getX());
|
|
4876
|
+
* arr.push(roi.getPoint(i).getY());
|
|
4877
|
+
* }
|
|
4878
|
+
* const shape = new Konva.Line({
|
|
4879
|
+
* name: 'shape', points: arr,
|
|
4880
|
+
* stroke: 'red', strokeWidth: 2,
|
|
4881
|
+
* closed: true
|
|
4882
|
+
* });
|
|
4883
|
+
* // konva group
|
|
4884
|
+
* const group = new Konva.Group();
|
|
4885
|
+
* group.name('love-group');
|
|
4886
|
+
* group.visible(true);
|
|
4887
|
+
* group.id(annotation.id);
|
|
4888
|
+
* group.add(shape);
|
|
4889
|
+
* return group;
|
|
4890
|
+
* }
|
|
4891
|
+
* }
|
|
4892
|
+
* // pass it to dwv option list
|
|
4893
|
+
* dwv.toolOptions['draw'] = {LoveFactory};
|
|
4894
|
+
* // create the dwv app
|
|
4895
|
+
* const app = new dwv.App();
|
|
4896
|
+
* // initialise
|
|
4897
|
+
* const viewConfig0 = new dwv.ViewConfig('layerGroup0');
|
|
4898
|
+
* const viewConfigs = {'*': [viewConfig0]};
|
|
4899
|
+
* const options = new dwv.AppOptions(viewConfigs);
|
|
4900
|
+
* options.tools = {Draw: {options: ['Love']}};
|
|
4901
|
+
* app.init(options);
|
|
4902
|
+
* // activate tool
|
|
4903
|
+
* app.addEventListener('load', function () {
|
|
4904
|
+
* app.setTool('Draw');
|
|
4905
|
+
* app.setToolFeatures({shapeName: 'Love'});
|
|
4906
|
+
* });
|
|
4907
|
+
* // load dicom data
|
|
4908
|
+
* app.loadURLs([
|
|
4909
|
+
* 'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323851.dcm'
|
|
4910
|
+
* ]);
|
|
4911
|
+
*
|
|
4912
|
+
* @type {Object<string, Object<string, any>>}
|
|
4913
|
+
*/
|
|
4914
|
+
export declare const toolOptions: {
|
|
4915
|
+
[x: string]: {
|
|
4916
|
+
[x: string]: any;
|
|
4917
|
+
};
|
|
4918
|
+
};
|
|
4919
|
+
|
|
4278
4920
|
/**
|
|
4279
4921
|
* Immutable 3D vector.
|
|
4280
4922
|
*/
|
|
@@ -4517,9 +5159,16 @@ export declare class View {
|
|
|
4517
5159
|
* Get the image origin for a image UID.
|
|
4518
5160
|
*
|
|
4519
5161
|
* @param {string} uid The UID.
|
|
4520
|
-
* @returns {
|
|
5162
|
+
* @returns {Point3D|undefined} The origin.
|
|
5163
|
+
*/
|
|
5164
|
+
getOriginForImageUid(uid: string): Point3D | undefined;
|
|
5165
|
+
/**
|
|
5166
|
+
* Check if the image includes an UID.
|
|
5167
|
+
*
|
|
5168
|
+
* @param {string} uid The UID.
|
|
5169
|
+
* @returns {boolean} True if present.
|
|
4521
5170
|
*/
|
|
4522
|
-
|
|
5171
|
+
includesImageUid(uid: string): boolean;
|
|
4523
5172
|
/**
|
|
4524
5173
|
* Check if the current position (default) or
|
|
4525
5174
|
* the provided position is in bounds.
|
|
@@ -4539,11 +5188,11 @@ export declare class View {
|
|
|
4539
5188
|
* Set the current position.
|
|
4540
5189
|
*
|
|
4541
5190
|
* @param {Point} position The new position.
|
|
4542
|
-
* @param {boolean} silent Flag to fire event or not.
|
|
5191
|
+
* @param {boolean} [silent] Flag to fire event or not.
|
|
4543
5192
|
* @returns {boolean} False if not in bounds.
|
|
4544
5193
|
* @fires View#positionchange
|
|
4545
5194
|
*/
|
|
4546
|
-
setCurrentPosition(position: Point, silent
|
|
5195
|
+
setCurrentPosition(position: Point, silent?: boolean): boolean;
|
|
4547
5196
|
/**
|
|
4548
5197
|
* Set the current index.
|
|
4549
5198
|
*
|
|
@@ -4625,6 +5274,12 @@ export declare class View {
|
|
|
4625
5274
|
* @returns {number} The index.
|
|
4626
5275
|
*/
|
|
4627
5276
|
getScrollIndex(): number;
|
|
5277
|
+
/**
|
|
5278
|
+
* Is this view in the same orientation as the image aquisition.
|
|
5279
|
+
*
|
|
5280
|
+
* @returns {boolean} True if in aquisition plane.
|
|
5281
|
+
*/
|
|
5282
|
+
isAquisitionOrientation(): boolean;
|
|
4628
5283
|
#private;
|
|
4629
5284
|
}
|
|
4630
5285
|
|
|
@@ -4764,12 +5419,19 @@ export declare class ViewController {
|
|
|
4764
5419
|
*/
|
|
4765
5420
|
getCurrentImageUid(): string;
|
|
4766
5421
|
/**
|
|
4767
|
-
* Get the image origin
|
|
5422
|
+
* Get the image origin for a image UID.
|
|
4768
5423
|
*
|
|
4769
5424
|
* @param {string} uid The UID.
|
|
4770
|
-
* @returns {
|
|
5425
|
+
* @returns {Point3D|undefined} The origin.
|
|
4771
5426
|
*/
|
|
4772
|
-
|
|
5427
|
+
getOriginForImageUid(uid: string): Point3D | undefined;
|
|
5428
|
+
/**
|
|
5429
|
+
* Check if the image includes an UID.
|
|
5430
|
+
*
|
|
5431
|
+
* @param {string} uid The UID.
|
|
5432
|
+
* @returns {boolean} True if present.
|
|
5433
|
+
*/
|
|
5434
|
+
includesImageUid(uid: string): boolean;
|
|
4773
5435
|
/**
|
|
4774
5436
|
* Get the current oriented index.
|
|
4775
5437
|
*
|
|
@@ -4791,16 +5453,30 @@ export declare class ViewController {
|
|
|
4791
5453
|
/**
|
|
4792
5454
|
* Get the first origin or at a given position.
|
|
4793
5455
|
*
|
|
4794
|
-
* @param {Point} [position]
|
|
5456
|
+
* @param {Point} [position] Optional position.
|
|
4795
5457
|
* @returns {Point3D} The origin.
|
|
4796
5458
|
*/
|
|
4797
5459
|
getOrigin(position?: Point): Point3D;
|
|
5460
|
+
/**
|
|
5461
|
+
* Is this view in the same orientation as the image aquisition.
|
|
5462
|
+
*
|
|
5463
|
+
* @returns {boolean} True if in aquisition plane.
|
|
5464
|
+
*/
|
|
5465
|
+
isAquisitionOrientation(): boolean;
|
|
5466
|
+
/**
|
|
5467
|
+
* Get a list of points that define the plane at input position,
|
|
5468
|
+
* given this classes orientation.
|
|
5469
|
+
*
|
|
5470
|
+
* @param {Point} position The position.
|
|
5471
|
+
* @returns {Point3D[]} An origin and 2 cosines vectors.
|
|
5472
|
+
*/
|
|
5473
|
+
getPlanePoints(position: Point): Point3D[];
|
|
4798
5474
|
/**
|
|
4799
5475
|
* Get the current scroll position value.
|
|
4800
5476
|
*
|
|
4801
|
-
* @returns {
|
|
5477
|
+
* @returns {number} The value.
|
|
4802
5478
|
*/
|
|
4803
|
-
getCurrentScrollPosition():
|
|
5479
|
+
getCurrentScrollPosition(): number;
|
|
4804
5480
|
/**
|
|
4805
5481
|
* Generate display image data to be given to a canvas.
|
|
4806
5482
|
*
|
|
@@ -4860,7 +5536,7 @@ export declare class ViewController {
|
|
|
4860
5536
|
* Can window and level be applied to the data?
|
|
4861
5537
|
*
|
|
4862
5538
|
* @returns {boolean} True if possible.
|
|
4863
|
-
* @deprecated
|
|
5539
|
+
* @deprecated Since v0.33, please use isMonochrome instead.
|
|
4864
5540
|
*/
|
|
4865
5541
|
canWindowLevel(): boolean;
|
|
4866
5542
|
/**
|
|
@@ -4930,9 +5606,11 @@ export declare class ViewController {
|
|
|
4930
5606
|
* Get a world position from a 2D plane position.
|
|
4931
5607
|
*
|
|
4932
5608
|
* @param {Point2D} point2D The input point.
|
|
5609
|
+
* @param {number} [k] Optional slice index,
|
|
5610
|
+
* if undefined, uses the current one.
|
|
4933
5611
|
* @returns {Point} The associated position.
|
|
4934
5612
|
*/
|
|
4935
|
-
getPositionFromPlanePoint(point2D: Point2D): Point;
|
|
5613
|
+
getPositionFromPlanePoint(point2D: Point2D, k?: number): Point;
|
|
4936
5614
|
/**
|
|
4937
5615
|
* Get a 2D plane position from a world position.
|
|
4938
5616
|
*
|
|
@@ -4940,6 +5618,13 @@ export declare class ViewController {
|
|
|
4940
5618
|
* @returns {Point2D} The 2D position.
|
|
4941
5619
|
*/
|
|
4942
5620
|
getPlanePositionFromPosition(point: Point): Point2D;
|
|
5621
|
+
/**
|
|
5622
|
+
* Get the index of a world position.
|
|
5623
|
+
*
|
|
5624
|
+
* @param {Point} point The 3D position.
|
|
5625
|
+
* @returns {Index} The index.
|
|
5626
|
+
*/
|
|
5627
|
+
getIndexFromPosition(point: Point): Index;
|
|
4943
5628
|
/**
|
|
4944
5629
|
* Set the current index.
|
|
4945
5630
|
*
|