pub struct SingleFileLoader { /* private fields */ }Expand description
Image loader for single-file captures (RGB images, etc.)
This loader handles standard image files where each capture consists of a single file containing all bands. Common for RGB cameras and some single-band or composite multispectral formats.
Implementations§
Source§impl SingleFileLoader
impl SingleFileLoader
Sourcepub fn new(
extensions: Vec<String>,
band_count: usize,
bit_depth: u8,
) -> Result<Self>
pub fn new( extensions: Vec<String>, band_count: usize, bit_depth: u8, ) -> Result<Self>
Create a new single-file loader
§Arguments
extensions- Supported file extensions (without dots, e.g., [“jpg”, “png”])band_count- Expected number of bands/channels in each imagebit_depth- Bit depth of the sensor (8, 16, or 32)
Sourcepub fn tiff_16bit(band_count: usize) -> Result<Self>
pub fn tiff_16bit(band_count: usize) -> Result<Self>
Create a loader for 16-bit TIFF images
Trait Implementations§
Source§impl Clone for SingleFileLoader
impl Clone for SingleFileLoader
Source§fn clone(&self) -> SingleFileLoader
fn clone(&self) -> SingleFileLoader
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 SingleFileLoader
impl Debug for SingleFileLoader
Source§impl ImageLoader for SingleFileLoader
impl ImageLoader for SingleFileLoader
Source§fn discover_captures(
&self,
input_dir: &Path,
output_dir: &Path,
) -> Result<Vec<ImageCapture>>
fn discover_captures( &self, input_dir: &Path, output_dir: &Path, ) -> Result<Vec<ImageCapture>>
Discover all image captures in the given directory Read more
Source§fn load_image(&self, capture: &ImageCapture) -> Result<Array3<f64>>
fn load_image(&self, capture: &ImageCapture) -> Result<Array3<f64>>
Load a single image capture into a 3D array (height, width, channels) Read more
Source§fn band_count(&self) -> usize
fn band_count(&self) -> usize
Get the expected number of bands/channels for this loader
Source§fn supported_extensions(&self) -> Vec<String>
fn supported_extensions(&self) -> Vec<String>
Get supported file extensions for this loader
Source§fn expected_file_count(&self) -> usize
fn expected_file_count(&self) -> usize
Get the expected number of files per capture for this sensor
Source§fn validate_capture(&self, capture: &ImageCapture) -> Result<()>
fn validate_capture(&self, capture: &ImageCapture) -> Result<()>
Validate that a capture has the expected file structure
Source§fn save_mask(&self, mask: &Array2<u8>, path: &Path) -> Result<()>
fn save_mask(&self, mask: &Array2<u8>, path: &Path) -> Result<()>
Save a mask image to the specified path
Source§fn save_masks(&self, mask: &Array2<u8>, capture: &ImageCapture) -> Result<()>
fn save_masks(&self, mask: &Array2<u8>, capture: &ImageCapture) -> Result<()>
Save masks to multiple paths (one per input file for compatibility with Agisoft Metashape)
Source§fn generate_mask_path(
&self,
capture: &ImageCapture,
output_dir: &Path,
) -> PathBuf
fn generate_mask_path( &self, capture: &ImageCapture, output_dir: &Path, ) -> PathBuf
Generate the output mask path for a given capture
Source§fn generate_mask_paths(
&self,
capture: &ImageCapture,
output_dir: &Path,
) -> Vec<PathBuf>
fn generate_mask_paths( &self, capture: &ImageCapture, output_dir: &Path, ) -> Vec<PathBuf>
Generate output mask paths for a capture (one per input file for Agisoft Metashape compatibility)
Auto Trait Implementations§
impl Freeze for SingleFileLoader
impl RefUnwindSafe for SingleFileLoader
impl Send for SingleFileLoader
impl Sync for SingleFileLoader
impl Unpin for SingleFileLoader
impl UnsafeUnpin for SingleFileLoader
impl UnwindSafe for SingleFileLoader
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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