pub struct DatasetSubsetBuilder<'a> { /* private fields */ }Expand description
Borrowing builder for deterministic dataset frame and spatial subsets.
Implementations§
Source§impl<'a> DatasetSubsetBuilder<'a>
impl<'a> DatasetSubsetBuilder<'a>
Sourcepub fn frames(self, selector: FrameSelector) -> Self
pub fn frames(self, selector: FrameSelector) -> Self
Selects acquisition frames; validation occurs in Self::build.
Sourcepub fn every_nth_frame(self, step: usize) -> Self
pub fn every_nth_frame(self, step: usize) -> Self
Selects acquisition indices 0, step, 2*step, ....
Sourcepub fn crop(self, crop: Rect) -> Self
pub fn crop(self, crop: Rect) -> Self
Selects a low-resolution detector rectangle; corresponding object/model grids are updated.
Sourcepub fn crop_pixels(
self,
row: usize,
column: usize,
height: usize,
width: usize,
) -> Result<Self>
pub fn crop_pixels( self, row: usize, column: usize, height: usize, width: usize, ) -> Result<Self>
Creates and selects a detector crop from zero-based row/column and positive size.
Sourcepub fn build(self) -> Result<DatasetSubset>
pub fn build(self) -> Result<DatasetSubset>
Validates selection and crop bounds, then owns subsetted measurements, models, optional ground truth/mask, and provenance.
Trait Implementations§
Source§impl<'a> Clone for DatasetSubsetBuilder<'a>
impl<'a> Clone for DatasetSubsetBuilder<'a>
Source§fn clone(&self) -> DatasetSubsetBuilder<'a>
fn clone(&self) -> DatasetSubsetBuilder<'a>
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<'a> Freeze for DatasetSubsetBuilder<'a>
impl<'a> RefUnwindSafe for DatasetSubsetBuilder<'a>
impl<'a> Send for DatasetSubsetBuilder<'a>
impl<'a> Sync for DatasetSubsetBuilder<'a>
impl<'a> Unpin for DatasetSubsetBuilder<'a>
impl<'a> UnsafeUnpin for DatasetSubsetBuilder<'a>
impl<'a> UnwindSafe for DatasetSubsetBuilder<'a>
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