pub struct SliceImageHDU { /* private fields */ }Expand description
An image HDU backed by a buffer rather than a file.
Implementations§
Source§impl SliceImageHDU
impl SliceImageHDU
Trait Implementations§
Source§impl Clone for SliceImageHDU
impl Clone for SliceImageHDU
Source§fn clone(&self) -> SliceImageHDU
fn clone(&self) -> SliceImageHDU
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SliceImageHDU
impl Debug for SliceImageHDU
Source§impl HDU for SliceImageHDU
impl HDU for SliceImageHDU
Source§impl ImageHDU for SliceImageHDU
impl ImageHDU for SliceImageHDU
Source§fn group_count(&self) -> usize
fn group_count(&self) -> usize
How many groups this HDU holds, under the random-groups convention.
Source§fn image_count(&self) -> usize
fn image_count(&self) -> usize
How many images this HDU holds.
Source§fn images_width(&self) -> u32
fn images_width(&self) -> u32
The width of every image here, from NAXIS1.
Source§fn images_height(&self) -> u32
fn images_height(&self) -> u32
The height of every image here, from NAXIS2.
Source§fn images_bayer_pattern(&self) -> Option<BayerPattern>
fn images_bayer_pattern(&self) -> Option<BayerPattern>
The colour filter layout over the sensor, or
None if it was monochrome.Source§fn images_type(&self) -> Option<&ImageType>
fn images_type(&self) -> Option<&ImageType>
Whether these are light, dark, flat or bias frames.
Source§fn images_exposure_time(&self) -> Option<Duration>
fn images_exposure_time(&self) -> Option<Duration>
How long the exposure lasted.
Source§fn read_image(
&self,
index: usize,
) -> Result<Option<Image>, Box<dyn Error + Send + Sync>>
fn read_image( &self, index: usize, ) -> Result<Option<Image>, Box<dyn Error + Send + Sync>>
Reads one image, or
None past the last one.Source§fn read_group(
&self,
index: usize,
) -> Result<Option<Group>, Box<dyn Error + Send + Sync>>
fn read_group( &self, index: usize, ) -> Result<Option<Group>, Box<dyn Error + Send + Sync>>
Reads one group, or
None past the last one.Source§fn clear_images(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
fn clear_images(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
Removes every image, leaving a header-only HDU.
Source§fn set_raw_array_u8(
&mut self,
shape: &[u32],
values: &[u8],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_array_u8( &mut self, shape: &[u32], values: &[u8], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the data with an array of
shape, given as raw 8-bit samples. Read moreSource§fn set_raw_array_i16(
&mut self,
shape: &[u32],
values: &[i16],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_array_i16( &mut self, shape: &[u32], values: &[i16], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the data with an array of
shape, given as raw signed 16-bit
samples.Source§fn set_raw_array_i32(
&mut self,
shape: &[u32],
values: &[i32],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_array_i32( &mut self, shape: &[u32], values: &[i32], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the data with an array of
shape, given as raw signed 32-bit
samples.Source§fn set_raw_array_f32(
&mut self,
shape: &[u32],
values: &[f32],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_array_f32( &mut self, shape: &[u32], values: &[f32], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the data with an array of
shape, given as raw single precision
samples.Source§fn set_raw_array_f64(
&mut self,
shape: &[u32],
values: &[f64],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_array_f64( &mut self, shape: &[u32], values: &[f64], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the data with an array of
shape, given as raw double precision
samples.Source§fn stream_normalised_image(
&self,
index: usize,
) -> Result<Option<NormalisedImageStream<'_>>, Box<dyn Error + Send + Sync>>
fn stream_normalised_image( &self, index: usize, ) -> Result<Option<NormalisedImageStream<'_>>, Box<dyn Error + Send + Sync>>
Available on crate feature
tokio only.Streams one image as
(x, y, value) triples, normalised to 0.0..=1.0.Source§fn image_data_size(&self) -> u64
fn image_data_size(&self) -> u64
How many bytes one image occupies.
Source§fn compress(
&mut self,
options: &CompressionOptions,
) -> Result<(), Box<dyn Error + Send + Sync>>
fn compress( &mut self, options: &CompressionOptions, ) -> Result<(), Box<dyn Error + Send + Sync>>
Stores this HDU’s image tile-compressed, as
fpack would. Read moreSource§fn decompress(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
fn decompress(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
Stores this HDU’s image plainly again, undoing
ImageHDU::compress. Read moreSource§fn set_images_u8(
&mut self,
images: &[&ImageBuffer<Luma<u8>, Vec<u8>>],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_images_u8( &mut self, images: &[&ImageBuffer<Luma<u8>, Vec<u8>>], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the images with 8-bit ones, taking their size from the first.
Source§fn set_images_i16(
&mut self,
images: &[&ImageBuffer<Luma<i16>, Vec<i16>>],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_images_i16( &mut self, images: &[&ImageBuffer<Luma<i16>, Vec<i16>>], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the images with signed 16-bit ones.
Source§fn set_images_i32(
&mut self,
images: &[&ImageBuffer<Luma<i32>, Vec<i32>>],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_images_i32( &mut self, images: &[&ImageBuffer<Luma<i32>, Vec<i32>>], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the images with signed 32-bit ones.
Source§fn set_images_f32(
&mut self,
images: &[&ImageBuffer<Luma<f32>, Vec<f32>>],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_images_f32( &mut self, images: &[&ImageBuffer<Luma<f32>, Vec<f32>>], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the images with single precision floating point ones.
Source§fn set_images_f64(
&mut self,
images: &[&ImageBuffer<Luma<f64>, Vec<f64>>],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_images_f64( &mut self, images: &[&ImageBuffer<Luma<f64>, Vec<f64>>], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the images with double precision floating point ones.
Source§fn set_raw_images_u8(
&mut self,
width: u32,
height: u32,
images: &[&[u8]],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_images_u8( &mut self, width: u32, height: u32, images: &[&[u8]], ) -> Result<(), Box<dyn Error + Send + Sync>>
Source§fn set_raw_images_i16(
&mut self,
width: u32,
height: u32,
images: &[&[i16]],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_images_i16( &mut self, width: u32, height: u32, images: &[&[i16]], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the images with raw signed 16-bit samples.
Source§fn set_raw_images_i32(
&mut self,
width: u32,
height: u32,
images: &[&[i32]],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_images_i32( &mut self, width: u32, height: u32, images: &[&[i32]], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the images with raw signed 32-bit samples.
Source§fn set_raw_images_f32(
&mut self,
width: u32,
height: u32,
images: &[&[f32]],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_images_f32( &mut self, width: u32, height: u32, images: &[&[f32]], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the images with raw single precision samples.
Source§fn set_raw_images_f64(
&mut self,
width: u32,
height: u32,
images: &[&[f64]],
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_raw_images_f64( &mut self, width: u32, height: u32, images: &[&[f64]], ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces the images with raw double precision samples.
Source§fn is_compressed(&self) -> bool
fn is_compressed(&self) -> bool
Whether this HDU’s image is stored tile-compressed inside a table.
Auto Trait Implementations§
impl Freeze for SliceImageHDU
impl RefUnwindSafe for SliceImageHDU
impl Send for SliceImageHDU
impl Sync for SliceImageHDU
impl Unpin for SliceImageHDU
impl UnsafeUnpin for SliceImageHDU
impl UnwindSafe for SliceImageHDU
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 more