Struct visioncortex::color_clusters::Cluster[][src]

pub struct Cluster {
    pub indices: Vec<u32>,
    pub holes: Vec<u32>,
    pub num_holes: u32,
    pub depth: u32,
    pub sum: ColorSum,
    pub residue_sum: ColorSum,
    pub rect: BoundingRect,
    pub merged_into: ClusterIndex,
}

Fields

indices: Vec<u32>holes: Vec<u32>num_holes: u32depth: u32sum: ColorSumresidue_sum: ColorSumrect: BoundingRectmerged_into: ClusterIndex

Implementations

impl Cluster[src]

pub fn new() -> Self[src]

pub fn add(&mut self, i: u32, color: &Color, x: i32, y: i32)[src]

pub fn area(&self) -> usize[src]

pub fn iter(&self) -> impl Iterator<Item = &u32>[src]

pub fn color(&self) -> Color[src]

pub fn residue_color(&self) -> Color[src]

pub fn perimeter(&self, parent: &ClustersView<'_>) -> u32[src]

pub fn to_image(&self, parent: &ClustersView<'_>) -> BinaryImage[src]

pub fn to_image_with_hole(
    &self,
    parent: &ClustersView<'_>,
    hole: bool
) -> BinaryImage
[src]

pub fn render_to_binary_image(
    &self,
    parent: &ClustersView<'_>,
    image: &mut BinaryImage
)
[src]

pub fn render_to_color_image(
    &self,
    parent: &ClustersView<'_>,
    image: &mut ColorImage
)
[src]

pub fn render_to_color_image_with_color(
    &self,
    parent: &ClustersView<'_>,
    image: &mut ColorImage,
    color: &Color
)
[src]

pub fn to_shape(&self, parent: &ClustersView<'_>) -> Shape[src]

pub fn to_compound_path(
    &self,
    parent: &ClustersView<'_>,
    hole: bool,
    mode: PathSimplifyMode,
    corner_threshold: f64,
    length_threshold: f64,
    max_iterations: usize,
    splice_threshold: f64
) -> CompoundPath
[src]

pub fn neighbours(&self, parent: &ClustersView<'_>) -> Vec<ClusterIndex>[src]

Trait Implementations

impl Clone for Cluster[src]

impl Default for Cluster[src]

Auto Trait Implementations

impl RefUnwindSafe for Cluster

impl Send for Cluster

impl Sync for Cluster

impl Unpin for Cluster

impl UnwindSafe for Cluster

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.