Skip to main content

ExtractionObserver

Trait ExtractionObserver 

Source
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§

Source

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.

Source

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.

Source

fn on_extraction_complete(&self, _level_idx: usize, _stats: ExtractionStats)

Called once tissue-filtered extraction finishes.

Source

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".

Implementors§