TileSpec, a pure data structure describing tile geometry (size, stride, resolution, measurement unit). This module lives in the data layer so it can be imported by both bioptimus.extraction and bioptimus.models without creating circular dependencies.
For backward compatibility, TileSpec is re-exported from types.
TileSpec
The size of the tile as
(width, height) or a single integer for both dimensions.The stride of the tile as
(stride_width, stride_height) or a single integer for both dimensions.The resolution at which the tile is defined.
The unit of measurement for the tile dimensions.
size
(width, height)stride
(stride_width, stride_height)width
height
stride_width
stride_height
scale_to_reference
float
required
Ratio of the reference-level downsample to the target-resolution downsample.
MPP
required
Microns-per-pixel at the target resolution.
TileSpec
A new
TileSpec in reference-level pixels.ValueError— Ifunitis notPIXELSorUM.

