pub struct OwnedImage<T> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<'a, T> Crop for OwnedImage<T>
impl<'a, T> Crop for OwnedImage<T>
fn take_rows(&mut self, n: usize) -> Result<(), ()>
fn drop_rows(&mut self, n: usize) -> Result<(), ()>
fn take_cols(&mut self, n: usize) -> Result<(), ()>
fn drop_cols(&mut self, n: usize) -> Result<(), ()>
fn central_col_crop(&mut self, n: usize) -> Result<(), ()>
fn central_row_crop(&mut self, n_rows: usize) -> Result<(), ()>
fn central_crop(&mut self, n_rows: usize, n_cols: usize) -> Result<(), ()>
Source§impl<T> Debug for OwnedImage<T>where
T: Debug,
impl<T> Debug for OwnedImage<T>where
T: Debug,
Source§impl<T> FromIterator<T> for OwnedImage<T>
impl<T> FromIterator<T> for OwnedImage<T>
Source§fn from_iter<I>(iter: I) -> OwnedImage<T>where
I: IntoIterator<Item = T>,
fn from_iter<I>(iter: I) -> OwnedImage<T>where
I: IntoIterator<Item = T>,
Creates a value from an iterator. Read more
Source§impl<'a, T> Image for OwnedImage<T>
impl<'a, T> Image for OwnedImage<T>
type Data = T
fn n_rows(&self) -> usize
fn n_cols(&self) -> usize
fn data(&self) -> &[<OwnedImage<T> as Image>::Data]
fn width(&self) -> usize
fn height(&self) -> usize
fn is_square(&self) -> bool
Source§fn centre_index(&self) -> usize
fn centre_index(&self) -> usize
get data index for centre of the image
Source§fn centre_row(&self) -> usize
fn centre_row(&self) -> usize
get central row
Source§fn centre_col(&self) -> usize
fn centre_col(&self) -> usize
get central column
Source§fn centre_position(&self) -> (usize, usize)
fn centre_position(&self) -> (usize, usize)
get row and column for central pixel
Source§fn square_centre(&self) -> bool
fn square_centre(&self) -> bool
determine if image has a sqaure centre
ie 4 pixels make up central part
Source§fn perimimeter_indicies_using<P>(&self, radius: usize) -> Vec<usize>
fn perimimeter_indicies_using<P>(&self, radius: usize) -> Vec<usize>
indices for perimenter fo circle with specified radius using custom method
Source§fn perimimeter_indicies_with(&self, method: Method, radius: usize) -> Vec<usize>where
Self: Sized,
fn perimimeter_indicies_with(&self, method: Method, radius: usize) -> Vec<usize>where
Self: Sized,
indices for perimenter fo circle with specified radius using known method
Source§fn perimimeter_indicies(&self, radius: usize) -> Vec<usize>where
Self: Sized,
fn perimimeter_indicies(&self, radius: usize) -> Vec<usize>where
Self: Sized,
indices for perimenter fo circle with specified radious
defaults to angle carve
Source§fn perimimeter_pixels(&self, radius: usize) -> Vec<&Self::Data>where
Self: Sized,
fn perimimeter_pixels(&self, radius: usize) -> Vec<&Self::Data>where
Self: Sized,
pixels on the perimeter of a cirlce with specified radius
fn apply_index_mask(&self, indicies: &[usize]) -> Vec<Self::Data>
fn apply_mask<I>(&self, mask_image: I) -> Vec<Self::Data>
fn mul<I>(&self, rhs: I) -> OwnedImage<Self::Data>
fn div<I>(&self, rhs: I) -> OwnedImage<Self::Data>
fn map<T, F>(&self, f: F) -> OwnedImage<T>
fn write_tiff<P>(&self, path: P) -> Result<(), String>
fn write_big_tiff<P>(&self, path: P) -> Result<(), String>
fn get_tiff_writer_shape(&self) -> Result<(u32, u32), String>
Source§impl<T> ImageMut for OwnedImage<T>
impl<T> ImageMut for OwnedImage<T>
Source§impl<'a, T> Pad for OwnedImage<T>
impl<'a, T> Pad for OwnedImage<T>
fn pad_rows_start(&mut self, n: usize) -> Result<(), ()>
fn pad_rows_end(&mut self, n: usize) -> Result<(), ()>
fn pad_cols_start(&mut self, n: usize) -> Result<(), ()>
fn pad_cols_end(&mut self, n: usize) -> Result<(), ()>
fn central_row_pad(&mut self, n_rows: usize) -> Result<(), ()>
fn central_col_pad(&mut self, n_cols: usize) -> Result<(), ()>
fn central_pad(&mut self, n_rows: usize, n_cols: usize) -> Result<(), ()>
fn pad_to(&mut self, rows: usize, cols: usize) -> Result<(), ()>
Auto Trait Implementations§
impl<T> Forget for OwnedImage<T>
impl<T> Freeze for OwnedImage<T>
impl<T> Move for OwnedImage<T>
impl<T> RefUnwindSafe for OwnedImage<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for OwnedImage<T>
impl<T> Sync for OwnedImage<T>
impl<T> Unpin for OwnedImage<T>
impl<T> UnsafeUnpin for OwnedImage<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for OwnedImage<T>where
Vec<T>: UnwindSafe,
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.