Class ImageRegionStoreHelpers

java.lang.Object
qupath.lib.gui.images.stores.ImageRegionStoreHelpers

public class ImageRegionStoreHelpers extends Object
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 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 requested
      clipShape - The requested shape, defined in the full-resolution image space
      downsampleFactor - The downsampleFactor determining the resolution at which tiles should be requested
      zPosition - The zPosition from which to request tiles
      tPosition - The tPosition from which to request tiles
      regions - 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 an ImageServer, 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 - the ImageServer from which the tiles would be requested
      x -
      y -
      downsampleFactor - the downsampleFactor determining the resolution at which tiles should be requested
      zPosition -
      tPosition -
      Returns: