API Reference
eozin.Eozin
Bases: object
A high-performance digital pathology (WSI) image decoder implemented in Rust.
Initializes the decoder from the specified file path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to the whole-slide image file. |
required |
dimensions
property
The (width, height) of the level 0 (highest resolution) image.
level_dimensions
property
A list of (width, height) for each pyramid level.
level_tile_sizes
property
The nominal (width, height) of tiles for each level.
read_region
Reads and combines tiles to return a specific region of the slide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
tuple[int, int]
|
(x, y) coordinates of the top-left corner (Level 0). |
required |
level
|
int
|
The pyramid level to read from. |
required |
size
|
tuple[int, int]
|
(width, height) of the region to extract. |
required |
Returns:
| Type | Description |
|---|---|
Image
|
A combined RGB Image object representing the region. |
read_tile
Reads a single tile at the specified level and coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lv
|
int
|
The pyramid level index. |
required |
x
|
int
|
The horizontal tile index. |
required |
y
|
int
|
The vertical tile index. |
required |
Returns:
| Type | Description |
|---|---|
Image
|
The decoded tile as a Pillow Image object. |