TileServer

class TileServer(title, layers)[source]

A Flask app to display Zoomify tiles as a slippery map.

Examples

>>> from tiatoolbox.wsiscore.wsireader import WSIReader
>>> from tiatoolbox.visualization.tileserver import TileServer
>>> wsi = WSIReader.open("CMU-1.svs")
>>> app = TileServer(
...     title="Testing TileServer",
...     layers={
...         "My SVS": wsi,
...     },
... )
>>> app.run()

Methods

index

Serve the index page.

zoomify

Serve a zoomify tile for a particular layer.

Attributes

Parameters
Return type

None

index()[source]

Serve the index page.

Returns

The index page.

Return type

Response

zoomify(layer, tile_group, z, x, y)[source]

Serve a zoomify tile for a particular layer.

Note that this should not be called directly, but will be called automatically by the Flask framework when a client requests a tile at the registered URL.

Parameters
  • layer (str) – The layer name.

  • tile_group (int) – The tile group. Currently unused.

  • z (int) – The zoom level.

  • x (int) – The x coordinate.

  • y (int) – The y coordinate.

Returns

The tile image response.

Return type

Response