pub trait ReadChannels<'s> {
type Reader: ChannelsReader;
// Required method
fn create_channels_reader(&'s self, header: &Header) -> Result<Self::Reader>;
// Provided methods
fn first_valid_layer(self) -> ReadFirstValidLayer<Self>
where Self: Sized { ... }
fn all_layers(self) -> ReadAllLayers<Self>
where Self: Sized { ... }
}
Expand description
A template that creates a ChannelsReader
once for all channels per layer.
Required Associated Types§
sourcetype Reader: ChannelsReader
type Reader: ChannelsReader
The type of the temporary channels reader
Required Methods§
sourcefn create_channels_reader(&'s self, header: &Header) -> Result<Self::Reader>
fn create_channels_reader(&'s self, header: &Header) -> Result<Self::Reader>
Create a single reader for all channels of a specific layer
Provided Methods§
sourcefn first_valid_layer(self) -> ReadFirstValidLayer<Self>where
Self: Sized,
fn first_valid_layer(self) -> ReadFirstValidLayer<Self>where
Self: Sized,
Read only the first layer which meets the previously specified requirements For example, skips layers with deep data, if specified earlier. Aborts if the image contains no layers.
sourcefn all_layers(self) -> ReadAllLayers<Self>where
Self: Sized,
fn all_layers(self) -> ReadAllLayers<Self>where
Self: Sized,
Reads all layers, including an empty list. Aborts if any of the layers are invalid, even if only one of the layers contains unexpected data.