Struct ImageF64

Source
pub struct ImageF64 { /* private fields */ }
Expand description

Buffer storing the image. All pixel values are expected to be f64.

Implementations§

Source§

impl ImageF64

Source

pub fn new_empty(channels: u8, width: u32, height: u32) -> Self

Creates new empty buffer with the specified number of channels, width and heights. All pixel values will be initialized as 0.0

Source

pub fn new(buffer: Vec<f64>, channels: u8, width: u32, height: u32) -> Self

Creates a new image from pre-defined buffer.

Source

pub fn channels(&self) -> u8

Returns number of channels in the image

Source

pub fn width(&self) -> u32

Returns width of an image

Source

pub fn height(&self) -> u32

Returns height of an image

Trait Implementations§

Source§

impl From<ImageF64> for Vec<f64>

Source§

fn from(value: ImageF64) -> Self

Converts to this type from the input type.
Source§

impl Index<(u8, u32, u32)> for ImageF64

Source§

type Output = f64

The returned type after indexing.
Source§

fn index(&self, index: (u8, u32, u32)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<(u8, u32, u32)> for ImageF64

Source§

fn index_mut(&mut self, index: (u8, u32, u32)) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.