dwv 0.36.0-beta.13 → 0.36.0-beta.15

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
@@ -338,7 +338,6 @@ export declare class AnnotationGroupFactory {
338
338
  *
339
339
  * @param {Object<string, DataElement>} dataElements The DICOM data elements.
340
340
  * @returns {string|undefined} A possible warning.
341
- * @throws Error for missing or wrong data.
342
341
  */
343
342
  checkElements(dataElements: {
344
343
  [x: string]: DataElement;
@@ -348,7 +347,7 @@ export declare class AnnotationGroupFactory {
348
347
  *
349
348
  * @param {Object<string, DataElement>} dataElements The DICOM tags.
350
349
  * @returns {AnnotationGroup} A new annotation group.
351
- * @throws Error for missing or wrong data.
350
+ * @throws {Error} Error for missing or wrong data.
352
351
  */
353
352
  create(dataElements: {
354
353
  [x: string]: DataElement;
@@ -1408,6 +1407,26 @@ export declare class DataElement {
1408
1407
  items: any[];
1409
1408
  }
1410
1409
 
1410
+ /**
1411
+ * Default tool list.
1412
+ *
1413
+ * @type {Object<string, any>}
1414
+ */
1415
+ export declare const defaultToolList: {
1416
+ [x: string]: any;
1417
+ };
1418
+
1419
+ /**
1420
+ * Default tool options.
1421
+ *
1422
+ * @type {Object<string, Object<string, any>>}
1423
+ */
1424
+ export declare const defaultToolOptions: {
1425
+ [x: string]: {
1426
+ [x: string]: any;
1427
+ };
1428
+ };
1429
+
1411
1430
  /**
1412
1431
  * Delete segment command.
1413
1432
  */
@@ -1457,6 +1476,50 @@ export declare class DeleteSegmentCommand {
1457
1476
  #private;
1458
1477
  }
1459
1478
 
1479
+ /**
1480
+ * Diameter type.
1481
+ */
1482
+ export declare class Diameter {
1483
+ /**
1484
+ * The scaled diameter value.
1485
+ *
1486
+ * @type {UnitValue}
1487
+ */
1488
+ diameter: UnitValue;
1489
+ /**
1490
+ * The offset of the pixel at the start
1491
+ * of the line used to calculate this diameter.
1492
+ *
1493
+ * @type {number}
1494
+ */
1495
+ offset1: number;
1496
+ /**
1497
+ * The offset of the pixel at the end
1498
+ * of the line used to calculate this diameter.
1499
+ *
1500
+ * @type {number}
1501
+ */
1502
+ offset2: number;
1503
+ }
1504
+
1505
+ /**
1506
+ * Diameters type.
1507
+ */
1508
+ export declare class Diameters {
1509
+ /**
1510
+ * The major (longest) diameter of the segment.
1511
+ *
1512
+ * @type {Diameter}
1513
+ */
1514
+ major: Diameter;
1515
+ /**
1516
+ * The minor (longest perpendicular to the major) diameter of the segment.
1517
+ *
1518
+ * @type {Diameter}
1519
+ */
1520
+ minor: Diameter;
1521
+ }
1522
+
1460
1523
  /**
1461
1524
  * DICOM code: item of a basic code sequence.
1462
1525
  *
@@ -3403,6 +3466,60 @@ export declare class Index {
3403
3466
  */
3404
3467
  export declare function isEqualRgb(c1: RGB, c2: RGB): boolean;
3405
3468
 
3469
+ /**
3470
+ * Label type.
3471
+ */
3472
+ export declare class Label {
3473
+ /**
3474
+ * The world coordinates of the centroid.
3475
+ *
3476
+ * @type {Point}
3477
+ */
3478
+ centroid: Point;
3479
+ /**
3480
+ * The closest voxel Index to the centroid.
3481
+ *
3482
+ * @type {number[]}
3483
+ */
3484
+ centroidIndex: number[];
3485
+ /**
3486
+ * The volume of the labeled segment.
3487
+ *
3488
+ * @type {UnitValue}
3489
+ */
3490
+ volume: UnitValue;
3491
+ /**
3492
+ * The voxel count of the labeled segment.
3493
+ *
3494
+ * @type {number}
3495
+ */
3496
+ count: number;
3497
+ /**
3498
+ * The diameters of the segment.
3499
+ *
3500
+ * @type {Diameters}
3501
+ */
3502
+ diameters: Diameters;
3503
+ /**
3504
+ * The scaled height of the segment.
3505
+ *
3506
+ * @type {UnitValue}
3507
+ */
3508
+ height: UnitValue;
3509
+ /**
3510
+ * The segment label id.
3511
+ *
3512
+ * @type {number}
3513
+ */
3514
+ id: number;
3515
+ /**
3516
+ * The Z index of the largest slice of the segment.
3517
+ *
3518
+ * @type {number}
3519
+ */
3520
+ largestSliceZ: number;
3521
+ }
3522
+
3406
3523
  /**
3407
3524
  * CIE LAB value (L: [0, 100], a: [-128, 127], b: [-128, 127]) to
3408
3525
  * unsigned int CIE LAB ([0, 65535]).
@@ -3707,6 +3824,12 @@ export declare class LayerGroup {
3707
3824
  * @returns {boolean} True if one view layer has more than one slice.
3708
3825
  */
3709
3826
  moreThanOne(dim: number): boolean;
3827
+ /**
3828
+ * Check if any layer has a valid position.
3829
+ *
3830
+ * @returns {boolean} True if any layer has a valid position.
3831
+ */
3832
+ hasAnyLayerWithValidPosition(): boolean;
3710
3833
  /**
3711
3834
  * Update layers (but not the event source layer) to a position change.
3712
3835
  *
@@ -3849,7 +3972,6 @@ export declare class MaskFactory {
3849
3972
  *
3850
3973
  * @param {Object<string, DataElement>} _dicomElements The DICOM tags.
3851
3974
  * @returns {string|undefined} A possible warning.
3852
- * @throws Error for missing or wrong data.
3853
3975
  */
3854
3976
  checkElements(_dicomElements: {
3855
3977
  [x: string]: DataElement;
@@ -3864,7 +3986,7 @@ export declare class MaskFactory {
3864
3986
  * @param {Image} [refImage] Reference image, code will use its
3865
3987
  * origins if present (best) or try to calculate them.
3866
3988
  * @returns {Image} A new Image.
3867
- * @throws Error for missing or wrong data.
3989
+ * @throws {Error} Error for missing or wrong data.
3868
3990
  */
3869
3991
  create(dataElements: {
3870
3992
  [x: string]: DataElement;
@@ -5693,6 +5815,24 @@ export declare const toolOptions: {
5693
5815
  };
5694
5816
  };
5695
5817
 
5818
+ /**
5819
+ * Unit value.
5820
+ */
5821
+ export declare class UnitValue {
5822
+ /**
5823
+ * The value.
5824
+ *
5825
+ * @type {number}
5826
+ */
5827
+ value: number;
5828
+ /**
5829
+ * The unit of the value.
5830
+ *
5831
+ * @type {string}
5832
+ */
5833
+ unit: string;
5834
+ }
5835
+
5696
5836
  /**
5697
5837
  * Immutable 3D vector.
5698
5838
  */
@@ -6903,6 +7043,12 @@ export declare class ViewLayer {
6903
7043
  * event type.
6904
7044
  */
6905
7045
  removeEventListener(type: string, callback: Function): void;
7046
+ /**
7047
+ * Check if the position is valid.
7048
+ *
7049
+ * @returns {boolean} True if the position is valid.
7050
+ */
7051
+ isValidPosition(): boolean;
6906
7052
  /**
6907
7053
  * Set the current position.
6908
7054
  *