pub struct DatasetLoader { /* private fields */ }Expand description
Loads an already-converted dataset bundle from a local directory.
Implementations§
Source§impl DatasetLoader
impl DatasetLoader
Source§impl DatasetLoader
impl DatasetLoader
Sourcepub fn load_spectral(&self) -> Result<SpectralDataset>
pub fn load_spectral(&self) -> Result<SpectralDataset>
Loads a version-two spectral profile entirely offline.
Requires explicit wavelength/channel metadata and response provenance; validates
common grids, sparse references, scalar frames, truth/masks and safe contained paths.
Ordinary version-one data must use load instead. No registration or RGB demixing occurs.
§Example
use fpm_rs::{Result, datasets::DatasetLoader,
algorithms::{SpectralAlternatingProjection, SpectralReconstructionAlgorithm}};
fn main() -> Result<()> {
let dataset = DatasetLoader::new("converted-spectral")?.load_spectral()?;
let result = SpectralAlternatingProjection::default().run(&dataset.reconstruction_problem()?)?;
assert_eq!(result.channels.len(), dataset.model().channels().len());
Ok(())
}Sourcepub fn format_version(&self) -> Result<u32>
pub fn format_version(&self) -> Result<u32>
Reads the profile version without interpreting the rest of the manifest.
Trait Implementations§
Source§impl Clone for DatasetLoader
impl Clone for DatasetLoader
Source§fn clone(&self) -> DatasetLoader
fn clone(&self) -> DatasetLoader
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 moreAuto Trait Implementations§
impl Freeze for DatasetLoader
impl RefUnwindSafe for DatasetLoader
impl Send for DatasetLoader
impl Sync for DatasetLoader
impl Unpin for DatasetLoader
impl UnsafeUnpin for DatasetLoader
impl UnwindSafe for DatasetLoader
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