Struct visioncortex::color_clusters::ClustersView
source · pub struct ClustersView<'a> {
pub width: u32,
pub height: u32,
pub pixels: &'a [u8],
pub clusters: &'a [Cluster],
pub cluster_indices: &'a [ClusterIndex],
pub clusters_output: &'a [ClusterIndex],
}
Fields§
§width: u32
§height: u32
§pixels: &'a [u8]
§clusters: &'a [Cluster]
§cluster_indices: &'a [ClusterIndex]
§clusters_output: &'a [ClusterIndex]
Implementations§
source§impl ClustersView<'_>
impl ClustersView<'_>
pub fn iter(&self) -> impl Iterator<Item = &Cluster>
pub fn get_cluster(&self, index: ClusterIndex) -> &Cluster
pub fn get_cluster_at_point(&self, point: PointI32) -> ClusterIndex
pub fn get_cluster_at(&self, index: u32) -> ClusterIndex
pub fn get_pixel(&self, x: i32, y: i32) -> Option<Color>
pub fn get_pixel_at_index(&self, index: u32) -> Option<Color>
pub fn to_color_image(&self) -> ColorImage
Auto Trait Implementations§
impl<'a> Freeze for ClustersView<'a>
impl<'a> RefUnwindSafe for ClustersView<'a>
impl<'a> Send for ClustersView<'a>
impl<'a> Sync for ClustersView<'a>
impl<'a> Unpin for ClustersView<'a>
impl<'a> UnwindSafe for ClustersView<'a>
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