Skip to main content

SliceImageHDU

Struct SliceImageHDU 

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

An image HDU backed by a buffer rather than a file.

Implementations§

Source§

impl SliceImageHDU

Source

pub fn empty() -> Self

An HDU holding nothing yet, for a FITS file being built from nothing.

Trait Implementations§

Source§

impl Clone for SliceImageHDU

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for SliceImageHDU

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl HDU for SliceImageHDU

Source§

fn header(&self) -> &Header

This HDU’s header.
Source§

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

This HDU’s header, to be changed.
Source§

fn byte_size(&self) -> u64

Total size of this HDU in bytes. Including both header and data, and aligned to the Fits blocks.
Source§

impl ImageHDU for SliceImageHDU

Source§

fn group_count(&self) -> usize

How many groups this HDU holds, under the random-groups convention.

Source§

fn image_count(&self) -> usize

How many images this HDU holds.
Source§

fn images_width(&self) -> u32

The width of every image here, from NAXIS1.
Source§

fn images_height(&self) -> u32

The height of every image here, from NAXIS2.
Source§

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>

Whether these are light, dark, flat or bias frames.
Source§

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>>

Reads one image, or None past the last one.
Source§

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>>

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>>

Replaces the data with an array of shape, given as raw 8-bit samples. Read more
Source§

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>>

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>>

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>>

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>>

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

How many bytes one image occupies.
Source§

fn compress( &mut self, options: &CompressionOptions, ) -> Result<(), Box<dyn Error + Send + Sync>>

Stores this HDU’s image tile-compressed, as fpack would. Read more
Source§

fn decompress(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>

Stores this HDU’s image plainly again, undoing ImageHDU::compress. Read more
Source§

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>>

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>>

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>>

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>>

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>>

Replaces the images with raw 8-bit samples, width by height each. Read more
Source§

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>>

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>>

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>>

Replaces the images with raw double precision samples.
Source§

fn is_compressed(&self) -> bool

Whether this HDU’s image is stored tile-compressed inside a table.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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.