Package qupath.lib.gui.images.stores
Interface TileListener<T>
- Type Parameters:
T
-
- All Known Implementing Classes:
QuPathViewer
,QuPathViewerPlus
public interface TileListener<T>
Interface for anything that needs to know when image tiles become available.
- Author:
- Pete Bankhead
-
Method Summary
Modifier and TypeMethodDescriptionboolean
requiresTileRegion
(String serverPath, ImageRegion region) Check if the listener requires a particular tile.void
tileAvailable
(String serverPath, ImageRegion region, T tile) Notify a listener that an image tile has been received read & is available.
-
Method Details
-
tileAvailable
Notify a listener that an image tile has been received read & is available.- Parameters:
serverPath
-region
-tile
-
-
requiresTileRegion
Check if the listener requires a particular tile. This is primarily designed to deal with asynchronous tile requests; by the time the server is ready to process the the request, it might be out of date (e.g. if the user has panned to a different part of the image). A server *may* make use of this function to do a last minute poll of all listeners to check if the region is required. Any implementation should return quickly (erring conservatively on the side of 'true' if the calculations would be prohibitively expensive), since otherwise it doesn't save time in seeking the tile itself.- Parameters:
serverPath
-region
-- Returns:
-