pub struct Region {
pub label: usize,
pub area: usize,
pub bbox: (usize, usize, usize, usize),
pub centroid: (f64, f64),
pub sum: Option<f64>,
pub mean: Option<f64>,
pub minimum: Option<f64>,
pub maximum: Option<f64>,
pub center_of_mass: Option<(f64, f64)>,
}Expand description
The measurements of one labelled region.
Fields§
§label: usizeThe label, 1..=n.
area: usizeThe number of pixels.
bbox: (usize, usize, usize, usize)The bounding box as half-open ranges: rows top..bottom, columns left..right (SciPy’s
find_objects slices).
centroid: (f64, f64)The mean (row, column) of the region’s pixels.
sum: Option<f64>With an intensity image: the sum, mean, minimum and maximum of its values over the region,
and the intensity-weighted centre (SciPy’s center_of_mass).
mean: Option<f64>§minimum: Option<f64>§maximum: Option<f64>§center_of_mass: Option<(f64, f64)>Trait Implementations§
impl StructuralPartialEq for Region
Auto Trait Implementations§
impl Freeze for Region
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnsafeUnpin for Region
impl UnwindSafe for Region
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more