Struct cameraunit::ImageMetaData
source · pub struct ImageMetaData {
pub bin_x: u32,
pub bin_y: u32,
pub img_top: u32,
pub img_left: u32,
pub temperature: f32,
pub exposure: Duration,
pub timestamp: SystemTime,
pub camera_name: String,
pub gain: i64,
pub offset: i64,
pub min_gain: i32,
pub max_gain: i32,
/* private fields */
}
Expand description
Image metadata structure.
This structure implements the std::fmt::Display
and std::clone::Clone
traits.
Fields§
§bin_x: u32
Binning in X direction
bin_y: u32
Binning in Y direction
img_top: u32
Top of image (pixels, binned coordinates)
img_left: u32
Left of image (pixels, binned coordinates)
temperature: f32
Camera temperature (C)
exposure: Duration
Exposure time
timestamp: SystemTime
Timestamp of the image
camera_name: String
Name of the camera
gain: i64
Gain (raw)
offset: i64
Offset (raw)
min_gain: i32
Minimum gain (raw)
max_gain: i32
Maximum gain (raw)
Implementations§
source§impl ImageMetaData
impl ImageMetaData
sourcepub fn new(
timestamp: SystemTime,
exposure: Duration,
temperature: f32,
bin_x: u32,
bin_y: u32,
camera_name: &str,
gain: i64,
offset: i64
) -> ImageMetaData
pub fn new( timestamp: SystemTime, exposure: Duration, temperature: f32, bin_x: u32, bin_y: u32, camera_name: &str, gain: i64, offset: i64 ) -> ImageMetaData
Create a new image metadata structure.
sourcepub fn full_builder(
bin_x: u32,
bin_y: u32,
img_top: u32,
img_left: u32,
temperature: f32,
exposure: Duration,
timestamp: SystemTime,
camera_name: &str,
gain: i64,
offset: i64,
min_gain: i32,
max_gain: i32
) -> ImageMetaData
pub fn full_builder( bin_x: u32, bin_y: u32, img_top: u32, img_left: u32, temperature: f32, exposure: Duration, timestamp: SystemTime, camera_name: &str, gain: i64, offset: i64, min_gain: i32, max_gain: i32 ) -> ImageMetaData
Create a new image metadata structure with full parameters.
source§impl ImageMetaData
impl ImageMetaData
sourcepub fn add_extended_attrib(&mut self, key: &str, val: &str)
pub fn add_extended_attrib(&mut self, key: &str, val: &str)
Add an extended attribute to the image metadata using vec::push()
.
§Panics
If the new capacity exceeds isize::MAX
bytes.
sourcepub fn get_extended_data(&self) -> &Vec<(String, String)>
pub fn get_extended_data(&self) -> &Vec<(String, String)>
Get the extended attributes of the image metadata.
Trait Implementations§
source§impl Clone for ImageMetaData
impl Clone for ImageMetaData
source§fn clone(&self) -> ImageMetaData
fn clone(&self) -> ImageMetaData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ImageMetaData
impl Debug for ImageMetaData
source§impl Default for ImageMetaData
impl Default for ImageMetaData
source§fn default() -> ImageMetaData
fn default() -> ImageMetaData
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ImageMetaData
impl<'de> Deserialize<'de> for ImageMetaData
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ImageMetaData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ImageMetaData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ImageMetaData
impl Display for ImageMetaData
source§impl PartialEq for ImageMetaData
impl PartialEq for ImageMetaData
source§fn eq(&self, other: &ImageMetaData) -> bool
fn eq(&self, other: &ImageMetaData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ImageMetaData
impl Serialize for ImageMetaData
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ImageMetaData
Auto Trait Implementations§
impl Freeze for ImageMetaData
impl RefUnwindSafe for ImageMetaData
impl Send for ImageMetaData
impl Sync for ImageMetaData
impl Unpin for ImageMetaData
impl UnwindSafe for ImageMetaData
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<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.