Tif

Struct Tif 

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

Main exported struct.

Implementations§

Source§

impl Tif

Source

pub fn read_file<P: AsRef<Path>>(path: P) -> Result<Tif, FrameError>

Reads a Tif frame from a file.

Trait Implementations§

Source§

impl Frame for Tif

Source§

fn array(&self) -> &Array

Reimplemented method returning a reference of the Array.
Source§

fn header(&self) -> &Header

Reimplemented method returning a reference of the Header.
Source§

fn header_mut(&mut self) -> &mut Header

Reimplemented method returning a mutable reference of the Header.
Source§

fn array_mut(&mut self) -> &mut Array

Reimplemented method returning a mutable reference of the Array.
Source§

fn set_array(&mut self, array: Array)

Reimplemented method which changes Array in the Frame.
Source§

fn consume_array(self: Box<Self>) -> Array

Reimplemented method which returns Array consuming the Frame.
Source§

fn take_array(&mut self) -> Array

Reimplemented method which returns Array consuming the Frame.
Source§

fn next_frame(&mut self) -> FrameResult<usize>

Switches Frame to the next sub-frame.
Source§

fn total_frames(&self) -> usize

Returns total number of sub-frames.
Source§

fn current_frame(&self) -> usize

Returns the current frame number.
Source§

fn is_multi(&self) -> bool

Checks whether this Frame contains sub-frames.
Source§

fn sum(&self) -> f64

Returns the sum of the Frame’s Array.
Source§

fn min(&self) -> f64

Returns the minimum value of the Frame’s Array.
Source§

fn max(&self) -> f64

Returns the maximum value of the Frame’s Array.
Source§

fn dim1(&self) -> usize

Returns the first dimension of the Frame’s Array.
Source§

fn dim2(&self) -> usize

Returns the second dimension of the Frame’s Array.
Source§

fn get_header_i64(&self, key: &str) -> FrameResult<i64>

Returns an i64 value from the Frame’s Header.
Source§

fn get_header_str_or_empty(&self, key: &str) -> &str

Returns an &str value from the Frame’s Header or empty &str if the key does not exist.
Source§

fn get_header_float(&self, key: &str) -> f64

Returns an f64 value from the Frame’s Header or zero if the key does not exist.
Source§

fn get_header_str(&self, key: &str) -> FrameResult<&str>

Returns an &str value from the Frame’s Header.
Source§

fn get_header_float_as_string_or_empty(&self, key: &str, exp: bool) -> String

Returns a String value from the Frame’s Header. The String is empty if the key does not exist.
Source§

fn get_header_int_as_string_or_empty(&self, key: &str) -> String

Source§

fn get_header_str_as_i64(&self, key: &str) -> FrameResult<i64>

Source§

fn insert(&mut self, key: String, value: HeaderEntry)

Inserts a HeaderEntry value into the Frame’s Header with a String as key.
Source§

fn swap_dims(&mut self)

Swaps dims of the Frame’s Array.

Auto Trait Implementations§

§

impl Freeze for Tif

§

impl RefUnwindSafe for Tif

§

impl Send for Tif

§

impl Sync for Tif

§

impl Unpin for Tif

§

impl UnwindSafe for Tif

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.