Class SparseImageServer.SparseImageServerManager

java.lang.Object
qupath.lib.images.servers.SparseImageServer.SparseImageServerManager
All Implemented Interfaces:
AutoCloseable
Enclosing class:
SparseImageServer

public static class SparseImageServer.SparseImageServerManager extends Object implements AutoCloseable
Helper class for SparseImageServers, capable of returning the appropriate ImageServer for different ImageRegions and different resolutions.

This also allows serialization/deserialization with JSON.

  • Constructor Details

    • SparseImageServerManager

      public SparseImageServerManager()
  • Method Details

    • getRegions

      public Collection<ImageRegion> getRegions()
      Get an unmodifiable collection for all available regions.

      This can be used to iterate through regions to check which overlap a request.

      Returns:
    • getServer

      public ImageServer<BufferedImage> getServer(ImageRegion region, double downsample) throws IOException
      Request the server for a specific downsample.

      Note that this does not aim to return a server for any arbitrary region; rather, a server must exist for the specified region and downsample, otherwise this will return null.

      Parameters:
      region - specified region to which the server should correspond (must be found within getRegions())
      downsample - specified downsample for the server (must be found within getDownsamples())
      Returns:
      Throws:
      IOException
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception