dwv 0.36.0-beta.1 → 0.36.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/assets/workers/labeling.worker.min.js +1 -1
- package/dist/assets/workers/labeling.worker.min.js.map +1 -1
- package/dist/dwv.d.ts +393 -37
- package/dist/dwv.min.js +1 -1
- package/dist/dwv.min.js.map +1 -1
- package/dist/dwv.node.min.js +1 -1
- package/dist/dwv.node.min.js.map +1 -1
- package/package.json +11 -11
package/dist/dwv.d.ts
CHANGED
|
@@ -436,13 +436,20 @@ export declare class App {
|
|
|
436
436
|
* @param {Image} img The associated image.
|
|
437
437
|
*/
|
|
438
438
|
setImage(dataId: string, img: Image_2): void;
|
|
439
|
+
/**
|
|
440
|
+
* Get the next data id.
|
|
441
|
+
*
|
|
442
|
+
* @returns {string} The data id.
|
|
443
|
+
*/
|
|
444
|
+
getNextDataId(): string;
|
|
439
445
|
/**
|
|
440
446
|
* Add a new DicomData.
|
|
441
447
|
*
|
|
448
|
+
* @param {string} dataId The data id.
|
|
442
449
|
* @param {DicomData} data The new data.
|
|
443
|
-
* @returns {
|
|
450
|
+
* @returns {boolean} False if the data cannot be added.
|
|
444
451
|
*/
|
|
445
|
-
addData(data: DicomData):
|
|
452
|
+
addData(dataId: string, data: DicomData): boolean;
|
|
446
453
|
/**
|
|
447
454
|
* Get the meta data.
|
|
448
455
|
*
|
|
@@ -465,6 +472,13 @@ export declare class App {
|
|
|
465
472
|
* @returns {string[]} The list of dataIds that contain the UIDs.
|
|
466
473
|
*/
|
|
467
474
|
getDataIdsFromSopUids(uids: string[]): string[];
|
|
475
|
+
/**
|
|
476
|
+
* Get the first data id with the given SeriesInstanceUID.
|
|
477
|
+
*
|
|
478
|
+
* @param {string} uid The SeriesInstanceUID.
|
|
479
|
+
* @returns {string} The data id.
|
|
480
|
+
*/
|
|
481
|
+
getDataIdFromSeriesUid(uid: string): string;
|
|
468
482
|
/**
|
|
469
483
|
* Can the data (of the active view of the active layer) be scrolled?
|
|
470
484
|
*
|
|
@@ -697,6 +711,8 @@ export declare class App {
|
|
|
697
711
|
*
|
|
698
712
|
* @param {string} uri The input uri, for example: 'window.location.href'.
|
|
699
713
|
* @param {object} [options] Optional url request options.
|
|
714
|
+
* @deprecated Since v0.36, please extract the file list and
|
|
715
|
+
* pass it to loadURLs. State from uri is no longer supported.
|
|
700
716
|
* @function
|
|
701
717
|
*/
|
|
702
718
|
loadFromUri: (uri: string, options?: object) => void;
|
|
@@ -787,8 +803,10 @@ export declare class App {
|
|
|
787
803
|
*
|
|
788
804
|
* @param {string} dataId The data id.
|
|
789
805
|
* @param {ViewConfig} config The view configuration.
|
|
806
|
+
* @param {boolean} [doRender] Render data after configuration
|
|
807
|
+
* add. Defaults to true.
|
|
790
808
|
*/
|
|
791
|
-
addDataViewConfig(dataId: string, config: ViewConfig): void;
|
|
809
|
+
addDataViewConfig(dataId: string, config: ViewConfig, doRender?: boolean): void;
|
|
792
810
|
/**
|
|
793
811
|
* Remove a data view config.
|
|
794
812
|
* Removes the associated layer if found, removes
|
|
@@ -1077,6 +1095,24 @@ export declare class AppOptions {
|
|
|
1077
1095
|
rootDocument: DocumentFragment;
|
|
1078
1096
|
}
|
|
1079
1097
|
|
|
1098
|
+
/**
|
|
1099
|
+
* Class to store a boolean result and a message.
|
|
1100
|
+
*/
|
|
1101
|
+
export declare class BooleanResult {
|
|
1102
|
+
/**
|
|
1103
|
+
* @param {boolean} success The success flag.
|
|
1104
|
+
*/
|
|
1105
|
+
constructor(success: boolean);
|
|
1106
|
+
/**
|
|
1107
|
+
* @type {boolean}
|
|
1108
|
+
*/
|
|
1109
|
+
success: boolean;
|
|
1110
|
+
/**
|
|
1111
|
+
* @type {string|undefined}
|
|
1112
|
+
*/
|
|
1113
|
+
message: string | undefined;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1080
1116
|
/**
|
|
1081
1117
|
* Build a multipart message.
|
|
1082
1118
|
*
|
|
@@ -1307,8 +1343,10 @@ export declare namespace custom {
|
|
|
1307
1343
|
[x: string]: string;
|
|
1308
1344
|
};
|
|
1309
1345
|
};
|
|
1346
|
+
let privateBValueRules: object[];
|
|
1310
1347
|
let openRoiDialog: any;
|
|
1311
|
-
let
|
|
1348
|
+
let getVolumeIdTagValue: any;
|
|
1349
|
+
let getPostLoadVolumeIdTagValue: any;
|
|
1312
1350
|
let getTagPixelUnit: any;
|
|
1313
1351
|
}
|
|
1314
1352
|
|
|
@@ -1504,17 +1542,42 @@ export declare class DicomData {
|
|
|
1504
1542
|
*/
|
|
1505
1543
|
buffer: any | undefined;
|
|
1506
1544
|
/**
|
|
1507
|
-
*
|
|
1545
|
+
* Number of files/urls associated to the data.
|
|
1508
1546
|
*
|
|
1509
|
-
* @
|
|
1547
|
+
* @type {number}
|
|
1510
1548
|
*/
|
|
1511
|
-
|
|
1549
|
+
numberOfFiles: number;
|
|
1550
|
+
/**
|
|
1551
|
+
* List of data creation warning.
|
|
1552
|
+
*
|
|
1553
|
+
* @type {string[]}
|
|
1554
|
+
*/
|
|
1555
|
+
warn: string[];
|
|
1512
1556
|
/**
|
|
1513
1557
|
* Get the image complete flag (for image data).
|
|
1514
1558
|
*
|
|
1515
1559
|
* @returns {boolean|undefined} True if the image is complete.
|
|
1516
1560
|
*/
|
|
1517
1561
|
getComplete(): boolean | undefined;
|
|
1562
|
+
/**
|
|
1563
|
+
* Set the image complete flag (for image data).
|
|
1564
|
+
*
|
|
1565
|
+
* @param {boolean} flag True if the image is complete.
|
|
1566
|
+
*/
|
|
1567
|
+
setComplete(flag: boolean): void;
|
|
1568
|
+
/**
|
|
1569
|
+
* Get the duplicate origin flag.
|
|
1570
|
+
*
|
|
1571
|
+
* @returns {boolean} The flag.
|
|
1572
|
+
*/
|
|
1573
|
+
hasDuplicateOrigin(): boolean;
|
|
1574
|
+
/**
|
|
1575
|
+
* Append slice and update meta data.
|
|
1576
|
+
*
|
|
1577
|
+
* @param {DicomData} data The data to append.
|
|
1578
|
+
*/
|
|
1579
|
+
appendData(data: DicomData): void;
|
|
1580
|
+
#private;
|
|
1518
1581
|
}
|
|
1519
1582
|
|
|
1520
1583
|
/**
|
|
@@ -2243,6 +2306,15 @@ export declare class Ellipse {
|
|
|
2243
2306
|
#private;
|
|
2244
2307
|
}
|
|
2245
2308
|
|
|
2309
|
+
/**
|
|
2310
|
+
* Check for window level equality.
|
|
2311
|
+
*
|
|
2312
|
+
* @param {WindowLevel} wl0 The first window level.
|
|
2313
|
+
* @param {WindowLevel} wl1 The second window level.
|
|
2314
|
+
* @returns {boolean} True if both objects are equal.
|
|
2315
|
+
*/
|
|
2316
|
+
export declare function equalWl(wl0: WindowLevel, wl1: WindowLevel): boolean;
|
|
2317
|
+
|
|
2246
2318
|
/**
|
|
2247
2319
|
* 2D/3D Geometry class.
|
|
2248
2320
|
*/
|
|
@@ -2256,12 +2328,24 @@ export declare class Geometry {
|
|
|
2256
2328
|
* @param {number} [time] Optional time index.
|
|
2257
2329
|
*/
|
|
2258
2330
|
constructor(origins: Point3D[], size: Size, spacing: Spacing, orientation?: Matrix33, time?: number);
|
|
2331
|
+
/**
|
|
2332
|
+
* Clone the geometry.
|
|
2333
|
+
*
|
|
2334
|
+
* @returns {Geometry} A clone of this geometry.
|
|
2335
|
+
*/
|
|
2336
|
+
clone(): Geometry;
|
|
2259
2337
|
/**
|
|
2260
2338
|
* Get the time value that was passed at construction.
|
|
2261
2339
|
*
|
|
2262
2340
|
* @returns {number} The time value.
|
|
2263
2341
|
*/
|
|
2264
2342
|
getInitialTime(): number;
|
|
2343
|
+
/**
|
|
2344
|
+
* Set the initial time.
|
|
2345
|
+
*
|
|
2346
|
+
* @param {number} time The new time.
|
|
2347
|
+
*/
|
|
2348
|
+
setInitialTime(time: number): void;
|
|
2265
2349
|
/**
|
|
2266
2350
|
* Get the total number of slices.
|
|
2267
2351
|
* Can be different from what is stored in the size object
|
|
@@ -2356,6 +2440,24 @@ export declare class Geometry {
|
|
|
2356
2440
|
* @returns {number} The slice index.
|
|
2357
2441
|
*/
|
|
2358
2442
|
getSliceIndex(point: Point3D, time?: number): number;
|
|
2443
|
+
/**
|
|
2444
|
+
* Check if another geometry is compatible with this one, ie that
|
|
2445
|
+
* slices with these geometries can be merged into one volume.
|
|
2446
|
+
*
|
|
2447
|
+
* @param {Geometry} rhs The geometry to check.
|
|
2448
|
+
* @returns {BooleanResult} Result with success set to true if
|
|
2449
|
+
* the geometry is compatible.
|
|
2450
|
+
*/
|
|
2451
|
+
canAppend(rhs: Geometry): BooleanResult;
|
|
2452
|
+
/**
|
|
2453
|
+
* Check if an origin can be appended to this geometry.
|
|
2454
|
+
*
|
|
2455
|
+
* @param {Point3D} origin The origin to append.
|
|
2456
|
+
* @param {number} [time] Optional time index.
|
|
2457
|
+
* @returns {BooleanResult} Result with success set to true if
|
|
2458
|
+
* the origin is compatible.
|
|
2459
|
+
*/
|
|
2460
|
+
canAppendOrigin(origin: Point3D, time?: number): BooleanResult;
|
|
2359
2461
|
/**
|
|
2360
2462
|
* Append an origin to the geometry.
|
|
2361
2463
|
*
|
|
@@ -2518,6 +2620,16 @@ export declare function getEllipseIndices(center: Index, radius: number[], dir:
|
|
|
2518
2620
|
*/
|
|
2519
2621
|
export declare function getLayerDetailsFromEvent(event: object): object;
|
|
2520
2622
|
|
|
2623
|
+
/**
|
|
2624
|
+
* Get the manufacturer.
|
|
2625
|
+
*
|
|
2626
|
+
* @param {Object<string, DataElement>} elements The DICOM tags.
|
|
2627
|
+
* @returns {string|undefined} The manufacturer.
|
|
2628
|
+
*/
|
|
2629
|
+
export declare function getManufacturer(elements: {
|
|
2630
|
+
[x: string]: DataElement;
|
|
2631
|
+
}): string | undefined;
|
|
2632
|
+
|
|
2521
2633
|
/**
|
|
2522
2634
|
* Get the offset of an input mouse event.
|
|
2523
2635
|
*
|
|
@@ -2526,6 +2638,17 @@ export declare function getLayerDetailsFromEvent(event: object): object;
|
|
|
2526
2638
|
*/
|
|
2527
2639
|
export declare function getMousePoint(event: object): Point2D;
|
|
2528
2640
|
|
|
2641
|
+
/**
|
|
2642
|
+
* Get the normalised manufacturer.
|
|
2643
|
+
*
|
|
2644
|
+
* @param {Object<string, DataElement>} elements The DICOM tags.
|
|
2645
|
+
* @returns {string|undefined} The manufacturer as a unique
|
|
2646
|
+
* all lower case string.
|
|
2647
|
+
*/
|
|
2648
|
+
export declare function getNormalisedManufacturer(elements: {
|
|
2649
|
+
[x: string]: DataElement;
|
|
2650
|
+
}): string | undefined;
|
|
2651
|
+
|
|
2529
2652
|
/**
|
|
2530
2653
|
* Get the name of an image orientation patient.
|
|
2531
2654
|
*
|
|
@@ -2553,6 +2676,16 @@ export declare function getPixelDataTag(): Tag;
|
|
|
2553
2676
|
*/
|
|
2554
2677
|
export declare function getRectangleIndices(center: Index, size: number[], dir: number[]): Index[];
|
|
2555
2678
|
|
|
2679
|
+
/**
|
|
2680
|
+
* Get the referenced series UID from the data elements.
|
|
2681
|
+
*
|
|
2682
|
+
* @param {Object<string, DataElement>} dataElements The data elements.
|
|
2683
|
+
* @returns {string|undefined} The referenced series UID.
|
|
2684
|
+
*/
|
|
2685
|
+
export declare function getReferencedSeriesUID(dataElements: {
|
|
2686
|
+
[x: string]: DataElement;
|
|
2687
|
+
}): string | undefined;
|
|
2688
|
+
|
|
2556
2689
|
/**
|
|
2557
2690
|
* Get patient orientation label in the reverse direction.
|
|
2558
2691
|
*
|
|
@@ -2622,6 +2755,25 @@ export declare function getTypedArray(bitsAllocated: number, pixelRepresentation
|
|
|
2622
2755
|
*/
|
|
2623
2756
|
export declare function getUID(tagName: string): string;
|
|
2624
2757
|
|
|
2758
|
+
/**
|
|
2759
|
+
* Get a list of URLs from a uri containing key-value pairs as in:
|
|
2760
|
+
* `[dwv root]?input=encodeURIComponent([root]?key0=value0&key1=value1)`.
|
|
2761
|
+
*
|
|
2762
|
+
* @param {string} uri The input URI.
|
|
2763
|
+
* @returns {string[]|undefined} The list of URLs.
|
|
2764
|
+
*/
|
|
2765
|
+
export declare function getURLsFromKeyValueUri(uri: string): string[] | undefined;
|
|
2766
|
+
|
|
2767
|
+
/**
|
|
2768
|
+
* Handle (ie call callback) with the list of urls contained in
|
|
2769
|
+
* a WEASIS XML manifest provided via a uri as in:
|
|
2770
|
+
* `[dwv root]?input=encodeURIComponent('[manifest file]')&type=manifest`.
|
|
2771
|
+
*
|
|
2772
|
+
* @param {string} uri The input URI.
|
|
2773
|
+
* @param {Function} callback The function to call with the decoded file urls.
|
|
2774
|
+
*/
|
|
2775
|
+
export declare function handleURLsFromWeasisXMLManifest(uri: string, callback: Function): void;
|
|
2776
|
+
|
|
2625
2777
|
/**
|
|
2626
2778
|
* Check that an input buffer includes the DICOM prefix 'DICM'
|
|
2627
2779
|
* after the 128 bytes preamble.
|
|
@@ -2907,6 +3059,14 @@ declare class Image_2 {
|
|
|
2907
3059
|
* @returns {Image} A clone of this image.
|
|
2908
3060
|
*/
|
|
2909
3061
|
clone(): Image_2;
|
|
3062
|
+
/**
|
|
3063
|
+
* Check if another image can be appended to this one.
|
|
3064
|
+
*
|
|
3065
|
+
* @param {Image} rhs The image to check.
|
|
3066
|
+
* @returns {BooleanResult} Result with success set to true if
|
|
3067
|
+
* the image can be appended.
|
|
3068
|
+
*/
|
|
3069
|
+
canAppend(rhs: Image_2): BooleanResult;
|
|
2910
3070
|
/**
|
|
2911
3071
|
* Append a slice to the image.
|
|
2912
3072
|
*
|
|
@@ -3094,6 +3254,27 @@ declare class Image_2 {
|
|
|
3094
3254
|
* Note: Uses the raw buffer values.
|
|
3095
3255
|
*/
|
|
3096
3256
|
compose(rhs: Image_2, operator: Function): Image_2;
|
|
3257
|
+
/**
|
|
3258
|
+
* Initialize the contour buffer.
|
|
3259
|
+
* Should be called on every segmentation image, or any image where
|
|
3260
|
+
* contour rendering needs to be supported.
|
|
3261
|
+
*/
|
|
3262
|
+
initializeContour(): void;
|
|
3263
|
+
/**
|
|
3264
|
+
* Get whether or not the contour buffer has been initialized.
|
|
3265
|
+
*
|
|
3266
|
+
* @returns {boolean} True if buffer has been initialized.
|
|
3267
|
+
*/
|
|
3268
|
+
countourIsInitialized(): boolean;
|
|
3269
|
+
/**
|
|
3270
|
+
* Calculate the distance to the nearest border pixel.
|
|
3271
|
+
* (or return the cached distance).
|
|
3272
|
+
*
|
|
3273
|
+
* @param {number} index Index/offset of the pixel to check.
|
|
3274
|
+
* @param {Matrix33} viewOrientation The orientation of the view.
|
|
3275
|
+
* @returns {number} The distance to the nearest border pixel or 0.
|
|
3276
|
+
*/
|
|
3277
|
+
getContourDistance(index: number, viewOrientation: Matrix33): number;
|
|
3097
3278
|
/**
|
|
3098
3279
|
* Recalculate labels.
|
|
3099
3280
|
*/
|
|
@@ -3790,6 +3971,12 @@ export declare class MaskSegmentHelper {
|
|
|
3790
3971
|
* @param {Image} mask The associated mask image.
|
|
3791
3972
|
*/
|
|
3792
3973
|
constructor(mask: Image_2);
|
|
3974
|
+
/**
|
|
3975
|
+
* Get the associated mask image.
|
|
3976
|
+
*
|
|
3977
|
+
* @returns {Image} The mask image.
|
|
3978
|
+
*/
|
|
3979
|
+
getMask(): Image_2;
|
|
3793
3980
|
/**
|
|
3794
3981
|
* Check if a segment is part of the segments list.
|
|
3795
3982
|
*
|
|
@@ -3836,6 +4023,76 @@ export declare class MaskSegmentHelper {
|
|
|
3836
4023
|
* @param {MaskSegment} segment The segment to update.
|
|
3837
4024
|
*/
|
|
3838
4025
|
updateSegment(segment: MaskSegment): void;
|
|
4026
|
+
/**
|
|
4027
|
+
* The overlap count of a single segment with another segment.
|
|
4028
|
+
*
|
|
4029
|
+
* @typedef OverlapCount@typedef OverlapCount
|
|
4030
|
+
* @property {string} label The segment label.
|
|
4031
|
+
* @property {number} count The number of overlapping voxels.
|
|
4032
|
+
* @property {number} percentage The overlap percentage between 0 and 1.
|
|
4033
|
+
*/
|
|
4034
|
+
/**
|
|
4035
|
+
* The count of overlapping voxels of a single segment with a set of
|
|
4036
|
+
* different segments.
|
|
4037
|
+
*
|
|
4038
|
+
* @typedef Overlap@typedef Overlap
|
|
4039
|
+
* @property {string} label The segment label.
|
|
4040
|
+
* @property {Object.<number, OverlapCount>} overlap A Dictionary
|
|
4041
|
+
* containing the counts. The key is the segment number of the overlapping
|
|
4042
|
+
* segment.
|
|
4043
|
+
* @property {number} count The voxel volume of this segment.
|
|
4044
|
+
*/
|
|
4045
|
+
/**
|
|
4046
|
+
* An Dictionary containing the count of overlapping voxels between two
|
|
4047
|
+
* sets of segments.
|
|
4048
|
+
* The key is the segment number of a segment in the first set.
|
|
4049
|
+
* The value is a Dictionary of all of the segments in the second set
|
|
4050
|
+
* that overlap with the key segment.
|
|
4051
|
+
*
|
|
4052
|
+
* @typedef {Object.<number, Overlap>} OverlapMap
|
|
4053
|
+
*/
|
|
4054
|
+
/**
|
|
4055
|
+
* Find the overlap for each segment between two segmentation masks.
|
|
4056
|
+
* It is assumed these images have the same orientation.
|
|
4057
|
+
*
|
|
4058
|
+
* @param {MaskSegmentHelper} rhs The helper of the
|
|
4059
|
+
* segmentation image to find overlap with.
|
|
4060
|
+
* @returns {OverlapMap} The overlapping voxel counts. First level is the
|
|
4061
|
+
* segments from this image, second level is the compare image segments.
|
|
4062
|
+
*/
|
|
4063
|
+
findOverlap(rhs: MaskSegmentHelper): {
|
|
4064
|
+
[x: number]: {
|
|
4065
|
+
/**
|
|
4066
|
+
* The segment label.
|
|
4067
|
+
*/
|
|
4068
|
+
label: string;
|
|
4069
|
+
/**
|
|
4070
|
+
* A Dictionary
|
|
4071
|
+
* containing the counts. The key is the segment number of the overlapping
|
|
4072
|
+
* segment.
|
|
4073
|
+
*/
|
|
4074
|
+
overlap: {
|
|
4075
|
+
[x: number]: {
|
|
4076
|
+
/**
|
|
4077
|
+
* The segment label.
|
|
4078
|
+
*/
|
|
4079
|
+
label: string;
|
|
4080
|
+
/**
|
|
4081
|
+
* The number of overlapping voxels.
|
|
4082
|
+
*/
|
|
4083
|
+
count: number;
|
|
4084
|
+
/**
|
|
4085
|
+
* The overlap percentage between 0 and 1.
|
|
4086
|
+
*/
|
|
4087
|
+
percentage: number;
|
|
4088
|
+
};
|
|
4089
|
+
};
|
|
4090
|
+
/**
|
|
4091
|
+
* The voxel volume of this segment.
|
|
4092
|
+
*/
|
|
4093
|
+
count: number;
|
|
4094
|
+
};
|
|
4095
|
+
};
|
|
3839
4096
|
#private;
|
|
3840
4097
|
}
|
|
3841
4098
|
|
|
@@ -3862,18 +4119,6 @@ export declare class MaskSegmentViewHelper {
|
|
|
3862
4119
|
* @param {number} segmentNumber The segment number.
|
|
3863
4120
|
*/
|
|
3864
4121
|
removeFromHidden(segmentNumber: number): void;
|
|
3865
|
-
/**
|
|
3866
|
-
* @callback alphaFn@callback alphaFn
|
|
3867
|
-
* @param {number|number[]} value The pixel value.
|
|
3868
|
-
* @param {number} index The values' index.
|
|
3869
|
-
* @returns {number} The opacity of the input value.
|
|
3870
|
-
*/
|
|
3871
|
-
/**
|
|
3872
|
-
* Get the alpha function to apply hidden colors.
|
|
3873
|
-
*
|
|
3874
|
-
* @returns {alphaFn} The corresponding alpha function.
|
|
3875
|
-
*/
|
|
3876
|
-
getAlphaFunc(): (value: number | number[], index: number) => number;
|
|
3877
4122
|
#private;
|
|
3878
4123
|
}
|
|
3879
4124
|
|
|
@@ -4011,6 +4256,13 @@ export declare class Matrix33 {
|
|
|
4011
4256
|
#private;
|
|
4012
4257
|
}
|
|
4013
4258
|
|
|
4259
|
+
export declare namespace NormalisedManufacturers {
|
|
4260
|
+
let GE: string;
|
|
4261
|
+
let SIEMENS: string;
|
|
4262
|
+
let PHILIPS: string;
|
|
4263
|
+
let HITASHI: string;
|
|
4264
|
+
}
|
|
4265
|
+
|
|
4014
4266
|
/**
|
|
4015
4267
|
* Number range.
|
|
4016
4268
|
*/
|
|
@@ -4516,7 +4768,7 @@ export declare class PositionHelper {
|
|
|
4516
4768
|
* with the input value.
|
|
4517
4769
|
*
|
|
4518
4770
|
* @param {number} dim The dimension.
|
|
4519
|
-
* @param {number} value The value to
|
|
4771
|
+
* @param {number} value The value to use at dimension index.
|
|
4520
4772
|
* @returns {Point} The position.
|
|
4521
4773
|
*/
|
|
4522
4774
|
getCurrentPositionAtDimValue(dim: number, value: number): Point;
|
|
@@ -5553,9 +5805,22 @@ export declare class View {
|
|
|
5553
5805
|
/**
|
|
5554
5806
|
* Set the associated image.
|
|
5555
5807
|
*
|
|
5556
|
-
* @param {Image}
|
|
5808
|
+
* @param {Image} image The associated image.
|
|
5557
5809
|
*/
|
|
5558
|
-
setImage(
|
|
5810
|
+
setImage(image: Image_2): void;
|
|
5811
|
+
/**
|
|
5812
|
+
* Check is the associated image is a mask.
|
|
5813
|
+
*
|
|
5814
|
+
* @returns {boolean} True if the associated image is a mask.
|
|
5815
|
+
*/
|
|
5816
|
+
isMask(): boolean;
|
|
5817
|
+
/**
|
|
5818
|
+
* Set the mask segment view helper to handle
|
|
5819
|
+
* hidden segments.
|
|
5820
|
+
*
|
|
5821
|
+
* @param {MaskSegmentViewHelper} helper The helper.
|
|
5822
|
+
*/
|
|
5823
|
+
setMaskViewHelper(helper: MaskSegmentViewHelper): void;
|
|
5559
5824
|
/**
|
|
5560
5825
|
* Get the view orientation.
|
|
5561
5826
|
*
|
|
@@ -5568,6 +5833,35 @@ export declare class View {
|
|
|
5568
5833
|
* @param {Matrix33} mat33 The orientation matrix.
|
|
5569
5834
|
*/
|
|
5570
5835
|
setOrientation(mat33: Matrix33): void;
|
|
5836
|
+
/**
|
|
5837
|
+
* Get the fill opacity relative to the global opacity.
|
|
5838
|
+
*
|
|
5839
|
+
* @returns {number} The fill opacity (between 0 and 1).
|
|
5840
|
+
*/
|
|
5841
|
+
getFillOpacity(): number;
|
|
5842
|
+
/**
|
|
5843
|
+
* Set the fill opacity relative to the global opacity.
|
|
5844
|
+
* This only has an effect on segmentation views, or any other alpha
|
|
5845
|
+
* function that makes use of it.
|
|
5846
|
+
*
|
|
5847
|
+
* @param {number} opacity The fill opacity (between 0 and 1).
|
|
5848
|
+
*/
|
|
5849
|
+
setFillOpacity(opacity: number): void;
|
|
5850
|
+
/**
|
|
5851
|
+
* Get the thickness of the contour in pixels.
|
|
5852
|
+
*
|
|
5853
|
+
* @returns {number} The contour thickness (0 <= integer <= MAX_CONTOUR_SIZE).
|
|
5854
|
+
*/
|
|
5855
|
+
getContourThickness(): number;
|
|
5856
|
+
/**
|
|
5857
|
+
* Set the thickness of the contour in pixels.
|
|
5858
|
+
* This only has an effect on segmentation views, or any other alpha
|
|
5859
|
+
* function that makes use of it.
|
|
5860
|
+
*
|
|
5861
|
+
* @param {number} thickness The contour thickness
|
|
5862
|
+
* (0 <= integer <= MAX_CONTOUR_SIZE).
|
|
5863
|
+
*/
|
|
5864
|
+
setContourThickness(thickness: number): void;
|
|
5571
5865
|
/**
|
|
5572
5866
|
* Initialise the view: set initial index.
|
|
5573
5867
|
*/
|
|
@@ -5583,12 +5877,6 @@ export declare class View {
|
|
|
5583
5877
|
* @returns {number} The milliseconds per frame.
|
|
5584
5878
|
*/
|
|
5585
5879
|
getPlaybackMilliseconds(recommendedDisplayFrameRate: number): number;
|
|
5586
|
-
/**
|
|
5587
|
-
* @callback alphaFn@callback alphaFn
|
|
5588
|
-
* @param {number[]|number} value The pixel value.
|
|
5589
|
-
* @param {number} index The values' index.
|
|
5590
|
-
* @returns {number} The opacity of the input value.
|
|
5591
|
-
*/
|
|
5592
5880
|
/**
|
|
5593
5881
|
* Get the alpha function.
|
|
5594
5882
|
*
|
|
@@ -5825,6 +6113,18 @@ export declare class ViewConfig {
|
|
|
5825
6113
|
* @type {number|undefined}
|
|
5826
6114
|
*/
|
|
5827
6115
|
opacity: number | undefined;
|
|
6116
|
+
/**
|
|
6117
|
+
* Optional segmentation layer fill opacity; in [0, 1] range.
|
|
6118
|
+
*
|
|
6119
|
+
* @type {number|undefined}
|
|
6120
|
+
*/
|
|
6121
|
+
fillOpacity: number | undefined;
|
|
6122
|
+
/**
|
|
6123
|
+
* Optional segmentation contour thickness; in [0, 10] range.
|
|
6124
|
+
*
|
|
6125
|
+
* @type {number|undefined}
|
|
6126
|
+
*/
|
|
6127
|
+
contourThickness: number | undefined;
|
|
5828
6128
|
/**
|
|
5829
6129
|
* Optional layer window level preset name.
|
|
5830
6130
|
* If present, the preset name will be used and
|
|
@@ -6252,6 +6552,41 @@ export declare class ViewController {
|
|
|
6252
6552
|
* @param {alphaFn} func The function.
|
|
6253
6553
|
*/
|
|
6254
6554
|
setViewAlphaFunction(func: (value: number[] | number, index: number) => number): void;
|
|
6555
|
+
/**
|
|
6556
|
+
* Set the mask segment view helper to handle
|
|
6557
|
+
* hidden segments.
|
|
6558
|
+
*
|
|
6559
|
+
* @param {MaskSegmentViewHelper} helper The helper.
|
|
6560
|
+
*/
|
|
6561
|
+
setMaskViewHelper(helper: MaskSegmentViewHelper): void;
|
|
6562
|
+
/**
|
|
6563
|
+
* Get the fill opacity relative to the global opacity.
|
|
6564
|
+
*
|
|
6565
|
+
* @returns {number} The fill opacity (between 0 and 1).
|
|
6566
|
+
*/
|
|
6567
|
+
getFillOpacity(): number;
|
|
6568
|
+
/**
|
|
6569
|
+
* Set the fill opacity relative to the global opacity.
|
|
6570
|
+
* This only has an effect on segmentation views, or any other alpha
|
|
6571
|
+
* function that makes use of it.
|
|
6572
|
+
*
|
|
6573
|
+
* @param {number} opacity The fill opacity (between 0 and 1).
|
|
6574
|
+
*/
|
|
6575
|
+
setFillOpacity(opacity: number): void;
|
|
6576
|
+
/**
|
|
6577
|
+
* Get the thickness of the contour in pixels.
|
|
6578
|
+
*
|
|
6579
|
+
* @returns {number} The contour thickness (integer >= 1).
|
|
6580
|
+
*/
|
|
6581
|
+
getContourThickness(): number;
|
|
6582
|
+
/**
|
|
6583
|
+
* Set the thickness of the contour in pixels.
|
|
6584
|
+
* This only has an effect on segmentation views, or any other alpha
|
|
6585
|
+
* function that makes use of it.
|
|
6586
|
+
*
|
|
6587
|
+
* @param {number} thickness The contour thickness (integer >= 1).
|
|
6588
|
+
*/
|
|
6589
|
+
setContourThickness(thickness: number): void;
|
|
6255
6590
|
/**
|
|
6256
6591
|
* Bind the view image to the provided layer.
|
|
6257
6592
|
*
|
|
@@ -6389,6 +6724,34 @@ export declare class ViewLayer {
|
|
|
6389
6724
|
* @param {number} alpha The opacity ([0:1] range).
|
|
6390
6725
|
*/
|
|
6391
6726
|
setOpacity(alpha: number): void;
|
|
6727
|
+
/**
|
|
6728
|
+
* Get the fill opacity relative to the global opacity.
|
|
6729
|
+
*
|
|
6730
|
+
* @returns {number} The fill opacity (between 0 and 1).
|
|
6731
|
+
*/
|
|
6732
|
+
getFillOpacity(): number;
|
|
6733
|
+
/**
|
|
6734
|
+
* Set the fill opacity relative to the global opacity.
|
|
6735
|
+
* This only has an effect on segmentation views, or any other alpha
|
|
6736
|
+
* function that makes use of it.
|
|
6737
|
+
*
|
|
6738
|
+
* @param {number} opacity The fill opacity (between 0 and 1).
|
|
6739
|
+
*/
|
|
6740
|
+
setFillOpacity(opacity: number): void;
|
|
6741
|
+
/**
|
|
6742
|
+
* Get the thickness of the contour in pixels.
|
|
6743
|
+
*
|
|
6744
|
+
* @returns {number} The contour thickness (integer >= 1).
|
|
6745
|
+
*/
|
|
6746
|
+
getContourThickness(): number;
|
|
6747
|
+
/**
|
|
6748
|
+
* Set the thickness of the contour in pixels.
|
|
6749
|
+
* This only has an effect on segmentation views, or any other alpha
|
|
6750
|
+
* function that makes use of it.
|
|
6751
|
+
*
|
|
6752
|
+
* @param {number} thickness The contour thickness (integer >= 1).
|
|
6753
|
+
*/
|
|
6754
|
+
setContourThickness(thickness: number): void;
|
|
6392
6755
|
/**
|
|
6393
6756
|
* Add a flip offset along the layer X axis.
|
|
6394
6757
|
*/
|
|
@@ -6540,10 +6903,10 @@ export declare class ViewLayer {
|
|
|
6540
6903
|
* Set the current position.
|
|
6541
6904
|
*
|
|
6542
6905
|
* @param {Point} position The new position.
|
|
6543
|
-
* @param {Index} _index The new index.
|
|
6906
|
+
* @param {Index} [_index] The new index (not used).
|
|
6544
6907
|
* @returns {boolean} True if the position was updated.
|
|
6545
6908
|
*/
|
|
6546
|
-
setCurrentPosition(position: Point, _index
|
|
6909
|
+
setCurrentPosition(position: Point, _index?: Index): boolean;
|
|
6547
6910
|
/**
|
|
6548
6911
|
* Clear the context.
|
|
6549
6912
|
*/
|
|
@@ -6572,13 +6935,6 @@ export declare class WindowLevel {
|
|
|
6572
6935
|
* @type {number}
|
|
6573
6936
|
*/
|
|
6574
6937
|
width: number;
|
|
6575
|
-
/**
|
|
6576
|
-
* Check for equality.
|
|
6577
|
-
*
|
|
6578
|
-
* @param {WindowLevel} rhs The other object to compare to.
|
|
6579
|
-
* @returns {boolean} True if both objects are equal.
|
|
6580
|
-
*/
|
|
6581
|
-
equals(rhs: WindowLevel): boolean;
|
|
6582
6938
|
}
|
|
6583
6939
|
|
|
6584
6940
|
/**
|