ZoomifyGenerator#
- class ZoomifyGenerator(wsi, tile_size=256, downsample=2, overlap=0)[source]#
Pyramid tile generator with extra Zoomify specific methods.
Zoomify splits tiles into groups of 256 (due to old file system limitations). The extra tile_group method here is for calculating these tile groups when generating tile paths.
An old description of the Zoomify format can be found here.
- Parameters:
wsi (WSIReader) – The WSI reader object. Must implement tiatoolbox.wsicore.wsi_Reader.WSIReader.read_rect.
tile_size (int) – The size of tiles to generate. Default is 256. Note that the output tile size will be \(\text{tile size} + 2 \times\text{overlap}\).
downsample (int) – The downsample factor between levels. Default is 2.
tile_overlap (int) – The number of extra pixel to add to each edge of the tile. Default is 0.
overlap (int) –
Methods
Find the tile group for a tile index.
Generate the Zoomify path for a specified tile.
Attributes
- tile_group(level, x, y)[source]#
Find the tile group for a tile index.
Tile groups are numbered from level 0 (tile 0-0-0) and increment every 256 tiles in ZXY axis order.
- Parameters:
- Raises:
IndexError – If the level, x, y tile index is out of bounds.
- Returns:
The tile group for the specified tile.
- Return type: