pub struct DecodedBandSet { /* private fields */ }Expand description
Native-typed bands, per-band masks, and shared band-set metadata.
Implementations§
Source§impl DecodedBandSet
impl DecodedBandSet
Sourcepub fn info(&self) -> &BandSetInfo
pub fn info(&self) -> &BandSetInfo
Returns validated metadata for the decoded bands.
Sourcepub fn band_masks(&self) -> &[Option<Vec<u8>>]
pub fn band_masks(&self) -> &[Option<Vec<u8>>]
Returns logical per-band masks, including inherited masks.
Sourcepub fn into_parts(self) -> (BandSetInfo, Vec<PixelData>, Vec<Option<Vec<u8>>>)
pub fn into_parts(self) -> (BandSetInfo, Vec<PixelData>, Vec<Option<Vec<u8>>>)
Consumes the result and returns its validated metadata, bands, and masks.
Sourcepub fn to_ndarray<T: BandElement>(&self) -> Result<ArrayD<T>>
pub fn to_ndarray<T: BandElement>(&self) -> Result<ArrayD<T>>
Copies the band set into an interleaved ndarray.
§Errors
Returns an error for incompatible types or inconsistent shapes.
Sourcepub fn into_ndarray<T: BandElement>(self) -> Result<ArrayD<T>>
pub fn into_ndarray<T: BandElement>(self) -> Result<ArrayD<T>>
Moves the band set into an interleaved ndarray.
§Errors
Returns an error for incompatible types or inconsistent shapes.
Sourcepub fn into_ndarray_with_layout<T: BandElement>(
self,
layout: BandLayout,
) -> Result<ArrayD<T>>
pub fn into_ndarray_with_layout<T: BandElement>( self, layout: BandLayout, ) -> Result<ArrayD<T>>
Moves the band set into an ndarray using the requested layout.
§Errors
Returns an error for incompatible types or inconsistent shapes.
Sourcepub fn into_vec_with_layout<T: BandElement>(
self,
layout: BandLayout,
) -> Result<Vec<T>>
pub fn into_vec_with_layout<T: BandElement>( self, layout: BandLayout, ) -> Result<Vec<T>>
Materializes every band as one homogeneous vector in layout.
§Errors
Returns an error when band types cannot convert to T or metadata is inconsistent.
Sourcepub fn copy_into_slice<T: BandElement>(
self,
layout: BandLayout,
out: &mut [T],
) -> Result<()>
pub fn copy_into_slice<T: BandElement>( self, layout: BandLayout, out: &mut [T], ) -> Result<()>
Copies every band into an exactly sized caller-provided slice.
§Errors
Returns an error for the wrong output length, incompatible types, or bad metadata.
Trait Implementations§
Source§impl Clone for DecodedBandSet
impl Clone for DecodedBandSet
Source§fn clone(&self) -> DecodedBandSet
fn clone(&self) -> DecodedBandSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more