pub trait ExtractionObserver: Send + Sync {
// Provided methods
fn on_extraction_start(&self, _level_idx: usize, _total_tiles: usize) { ... }
fn on_tile_dropped(
&self,
_level_idx: usize,
_tile_x: u32,
_tile_y: u32,
_tissue_fraction: f32,
_min_fraction: f32,
) { ... }
fn on_extraction_complete(&self, _level_idx: usize, _stats: ExtractionStats) { ... }
fn on_tile_extraction(&self, _level_idx: usize, _tile: &Tile) { ... }
}Expand description
Receives events emitted during Slide::extract.
All methods have no-op default implementations, so implementors only need to override the events they care about.
Provided Methods§
Sourcefn on_extraction_start(&self, _level_idx: usize, _total_tiles: usize)
fn on_extraction_start(&self, _level_idx: usize, _total_tiles: usize)
Called once before any tiles are processed, with the total number
of tiles that will be considered at level_idx.
Sourcefn on_tile_dropped(
&self,
_level_idx: usize,
_tile_x: u32,
_tile_y: u32,
_tissue_fraction: f32,
_min_fraction: f32,
)
fn on_tile_dropped( &self, _level_idx: usize, _tile_x: u32, _tile_y: u32, _tissue_fraction: f32, _min_fraction: f32, )
Called when a tile is skipped because its tissue fraction fell below the configured minimum.
Sourcefn on_extraction_complete(&self, _level_idx: usize, _stats: ExtractionStats)
fn on_extraction_complete(&self, _level_idx: usize, _stats: ExtractionStats)
Called once tissue-filtered extraction finishes.
Sourcefn on_tile_extraction(&self, _level_idx: usize, _tile: &Tile)
fn on_tile_extraction(&self, _level_idx: usize, _tile: &Tile)
Called for every extracted tile
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".