dwv 0.36.0-beta.7 → 0.36.0-beta.8

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
@@ -3995,6 +3995,65 @@ export declare class MaskSegmentHelper {
3995
3995
  * @param {MaskSegment} segment The segment to update.
3996
3996
  */
3997
3997
  updateSegment(segment: MaskSegment): void;
3998
+ /**
3999
+ * The overlap count of a signle segment with another segment.
4000
+ *
4001
+ * @typedef OverlapCount@typedef OverlapCount
4002
+ * @property {number} count The number of overlapping voxels.
4003
+ * @property {number} percentage The overlap percentage between 0 and 1.
4004
+ */
4005
+ /**
4006
+ * The count of overlapping voxels of a single segment with a set of
4007
+ * different segments.
4008
+ *
4009
+ * @typedef Overlap@typedef Overlap
4010
+ * @property {Object.<number, OverlapCount>} overlap A Dictionary
4011
+ * containing the counts. The key is the segment number of the overlapping
4012
+ * segment.
4013
+ * @property {number} count The voxel volume of this segment.
4014
+ */
4015
+ /**
4016
+ * An Dictionary containing the count of overlapping voxels between two
4017
+ * sets of segments.
4018
+ * The key is the segment number of a segment in the first set.
4019
+ * The value is a Dictionary of all of the segments in the second set
4020
+ * that overlap with the key segment.
4021
+ *
4022
+ * @typedef {Object.<number, Overlap>} OverlapMap
4023
+ */
4024
+ /**
4025
+ * Find the overlap for each segment between two segmentation masks.
4026
+ * It is assumed these images have the same orientation.
4027
+ *
4028
+ * @param {Image} compare The segmentation image to find overlap with.
4029
+ * @returns {OverlapMap} The overlapping voxel counts. First level is the
4030
+ * segments from this image, second level is the compare image segments.
4031
+ */
4032
+ findOverlap(compare: Image_2): {
4033
+ [x: number]: {
4034
+ /**
4035
+ * A Dictionary
4036
+ * containing the counts. The key is the segment number of the overlapping
4037
+ * segment.
4038
+ */
4039
+ overlap: {
4040
+ [x: number]: {
4041
+ /**
4042
+ * The number of overlapping voxels.
4043
+ */
4044
+ count: number;
4045
+ /**
4046
+ * The overlap percentage between 0 and 1.
4047
+ */
4048
+ percentage: number;
4049
+ };
4050
+ };
4051
+ /**
4052
+ * The voxel volume of this segment.
4053
+ */
4054
+ count: number;
4055
+ };
4056
+ };
3998
4057
  #private;
3999
4058
  }
4000
4059