pub struct CachedSlide<R: RangeReader + 'static> { /* private fields */ }Expand description
A slide that has been opened and cached.
This holds both the parsed slide structure and the underlying reader (wrapped in a BlockCache for efficient I/O).
Implementations§
Source§impl<R: RangeReader + 'static> CachedSlide<R>
impl<R: RangeReader + 'static> CachedSlide<R>
Sourcepub fn format(&self) -> SlideFormat
pub fn format(&self) -> SlideFormat
Get the detected format of this slide.
Sourcepub fn level_count(&self) -> usize
pub fn level_count(&self) -> usize
Get the number of pyramid levels.
Sourcepub fn dimensions(&self) -> Option<(u32, u32)>
pub fn dimensions(&self) -> Option<(u32, u32)>
Get dimensions of the full-resolution (level 0) image.
Sourcepub fn level_dimensions(&self, level: usize) -> Option<(u32, u32)>
pub fn level_dimensions(&self, level: usize) -> Option<(u32, u32)>
Get dimensions of a specific level.
Sourcepub fn level_downsample(&self, level: usize) -> Option<f64>
pub fn level_downsample(&self, level: usize) -> Option<f64>
Get the downsample factor for a level.
Sourcepub fn tile_count(&self, level: usize) -> Option<(u32, u32)>
pub fn tile_count(&self, level: usize) -> Option<(u32, u32)>
Get the number of tiles in X and Y directions for a level.
Sourcepub fn level_info(&self, level: usize) -> Option<LevelInfo>
pub fn level_info(&self, level: usize) -> Option<LevelInfo>
Get complete information about a level.
Sourcepub fn best_level_for_downsample(&self, downsample: f64) -> Option<usize>
pub fn best_level_for_downsample(&self, downsample: f64) -> Option<usize>
Find the best level for a given downsample factor.
Auto Trait Implementations§
impl<R> Freeze for CachedSlide<R>
impl<R> !RefUnwindSafe for CachedSlide<R>
impl<R> Send for CachedSlide<R>
impl<R> Sync for CachedSlide<R>
impl<R> Unpin for CachedSlide<R>
impl<R> !UnwindSafe for CachedSlide<R>
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> 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 moreCreates a shared type from an unshared type.