Package qupath.lib.gui.images.stores
Class ImageRegionStoreHelpers
java.lang.Object
qupath.lib.gui.images.stores.ImageRegionStoreHelpers
Helper methods related to image region storage.
Provides a standard method of tiling an image, which are used by the viewer.
In cases where viewing tiles are cached, this makes it possible to find out
what the tile boundaries are... and perhaps adjust requests accordingly to match with cached tiles.
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RegionRequest
getTileRequest
(ImageServer<BufferedImage> server, double x, double y, double downsampleFactor, int zPosition, int tPosition) Given anImageServer
, determine the boundaries of the image tile that contains specified x, y coordinates.static List
<RegionRequest> getTilesToRequest
(ImageServer<?> server, Shape clipShape, double downsampleFactor, int zPosition, int tPosition, List<RegionRequest> regions) Given ImageServer, determine the boundaries of the image tiles that would be needed to paint a specified shape (defined by coordinates in the full-resolution image space).
-
Constructor Details
-
ImageRegionStoreHelpers
public ImageRegionStoreHelpers()
-
-
Method Details
-
getTilesToRequest
public static List<RegionRequest> getTilesToRequest(ImageServer<?> server, Shape clipShape, double downsampleFactor, int zPosition, int tPosition, List<RegionRequest> regions) Given ImageServer, determine the boundaries of the image tiles that would be needed to paint a specified shape (defined by coordinates in the full-resolution image space). The downsampleFactor is used to determine the resolution at which to request the tiles.- Parameters:
server
- The ImageServer from which the tiles would be requestedclipShape
- The requested shape, defined in the full-resolution image spacedownsampleFactor
- The downsampleFactor determining the resolution at which tiles should be requestedzPosition
- The zPosition from which to request tilestPosition
- The tPosition from which to request tilesregions
- regions The list to which requests should be added, or null if a new list should be created- Returns:
- The list of requests - identical to the one provided as an input parameter, unless this was null
-
getTileRequest
public static RegionRequest getTileRequest(ImageServer<BufferedImage> server, double x, double y, double downsampleFactor, int zPosition, int tPosition) Given anImageServer
, determine the boundaries of the image tile that contains specified x, y coordinates. The downsampleFactor is used to determine the resolution at which to request the tiles.- Parameters:
server
- theImageServer
from which the tiles would be requestedx
-y
-downsampleFactor
- the downsampleFactor determining the resolution at which tiles should be requestedzPosition
-tPosition
-- Returns:
-