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: u32Binning in X direction
bin_y: u32Binning in Y direction
img_top: u32Top of image (pixels, binned coordinates)
img_left: u32Left of image (pixels, binned coordinates)
temperature: f32Camera temperature (C)
exposure: DurationExposure time
timestamp: SystemTimeTimestamp of the image
camera_name: StringName of the camera
gain: i64Gain (raw)
offset: i64Offset (raw)
min_gain: i32Minimum gain (raw)
max_gain: i32Maximum 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 duplicate 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§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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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().