lucem_hist::area
Areas: of each class of a class map, and of positive staining, inside a region.
ClassArea
Section titled “ClassArea”pub struct ClassAreaFields
class: Stringarea_um2: f64percent: f64: Of the classified area inside the region (unclassified pixels left out).
Implements Clone, Debug, Deserialize, PartialEq, Serialize.
Functions
Section titled “Functions”class_areas
Section titled “class_areas”pub fn class_areas( class_map: &[u8], classes: &[String], within: Option<&[u8]>, pixel_area_um2: f64,) -> Vec<ClassArea>The area of each class of class_map (0: none, k: classes[k − 1]), only where within
is non-zero when given; pixel_area_um2 is the area of one map pixel.
positive_area
Section titled “positive_area”pub fn positive_area( values: &[f32], threshold: f32, within: Option<&[u8]>, pixel_area_um2: f64,) -> (f64, f64, f64)Positive area: pixels of values (a stain’s optical density, say) above threshold inside
within; (positive µm², region µm², percent).