RegionThresholdShare
public readonly struct RegionThresholdShare
How much of a region has crossed a limit, for one frame.
An operator watching a process usually cares less about the single hottest pixel in a region than about how much of it has crossed a line: what fraction of a brake disc is over 200 C, how much of a pane is still below its setpoint. The share moves smoothly where a maximum jumps around.
Both numbers are over the region's measurable pixels, which is RegionStats.PixelCount: an unmeasurable pixel is in neither the numerator nor the denominator. That keeps this separable from RegionStats.Coverage, which says how much of the region had data at all.
RegionThresholdShare: properties
public bool IsValid { get; init; }
Whether the two values above mean anything. False -- with both of them zero rather than a plausible share -- unless the region was given a threshold and produced a measurement.
public uint PixelCount { get; init; }
Measurable pixels on the counted side of the threshold.
public float Share { get; init; }
RegionThresholdShare.PixelCount divided by RegionStats.PixelCount, 0 to 1. A fraction, not a percentage.