Package qupath.lib.gui.images.servers
Class PathHierarchyImageServer
java.lang.Object
qupath.lib.images.servers.AbstractImageServer<BufferedImage>
qupath.lib.images.servers.AbstractTileableImageServer
qupath.lib.gui.images.servers.PathHierarchyImageServer
- All Implemented Interfaces:
AutoCloseable,qupath.lib.images.servers.GeneratingImageServer<BufferedImage>,qupath.lib.images.servers.ImageServer<BufferedImage>
public class PathHierarchyImageServer
extends qupath.lib.images.servers.AbstractTileableImageServer
implements qupath.lib.images.servers.GeneratingImageServer<BufferedImage>
A special
ImageServer implementation that doesn't have a backing image, but rather
constructs tiles on request from a PathObjectHierarchy and its detection objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringPrefix used for the path of all instances of this class. -
Constructor Summary
ConstructorsConstructorDescriptionPathHierarchyImageServer(qupath.lib.images.ImageData<BufferedImage> imageData, OverlayOptions options) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected BufferedImagecreateDefaultRGBImage(int width, int height) protected StringcreateID()Returns a UUID.protected qupath.lib.images.servers.ImageServerBuilder.ServerBuilder<BufferedImage> Returns null (does not support ServerBuilders).qupath.lib.images.servers.ImageServerMetadatagetURIs()booleanisEmptyRegion(qupath.lib.regions.RegionRequest request) Returns true if there are no objects to be painted within the requested region.protected BufferedImagereadTile(qupath.lib.images.servers.TileRequest tileRequest) voidsetMetadata(qupath.lib.images.servers.ImageServerMetadata metadata) Throws an exception - metadata should not be set for a hierarchy image server directly.Methods inherited from class qupath.lib.images.servers.AbstractTileableImageServer
allowSmoothInterpolation, getDefaultColorModel, getEmptyTile, getEmptyTile, getTile, readRegionMethods inherited from class qupath.lib.images.servers.AbstractImageServer
close, getAssociatedImage, getAssociatedImageList, getBuilder, getCache, getCachedTile, getChannel, getDefaultThumbnail, getDownsampleForResolution, getHeight, getImageClass, getMetadata, getPath, getPixelType, getPreferredDownsamples, getThumbnailDownsampleFactor, getTileRequestManager, getWidth, isRGB, nChannels, nResolutions, nTimepoints, nZSlices, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface qupath.lib.images.servers.ImageServer
getAssociatedImage, getAssociatedImageList, getBuilder, getCachedTile, getChannel, getDefaultThumbnail, getDownsampleForResolution, getHeight, getImageClass, getMetadata, getPath, getPixelCalibration, getPixelType, getPreferredDownsamples, getTileRequestManager, getWidth, isRGB, nChannels, nResolutions, nTimepoints, nZSlices, readBufferedImage, readRegion, readRegion, readRegion
-
Field Details
-
DEFAULT_PREFIX
Prefix used for the path of all instances of this class. This can be used to help with caching (and in particular with clearing caches selectively).
-
-
Constructor Details
-
PathHierarchyImageServer
public PathHierarchyImageServer(qupath.lib.images.ImageData<BufferedImage> imageData, OverlayOptions options) Constructor.- Parameters:
imageData- the image dataoptions- options defining how objects will be painted
-
-
Method Details
-
createServerBuilder
protected qupath.lib.images.servers.ImageServerBuilder.ServerBuilder<BufferedImage> createServerBuilder()Returns null (does not support ServerBuilders).- Specified by:
createServerBuilderin classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
getURIs
- Specified by:
getURIsin interfacequpath.lib.images.servers.ImageServer<BufferedImage>
-
createID
Returns a UUID.- Specified by:
createIDin classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
isEmptyRegion
public boolean isEmptyRegion(qupath.lib.regions.RegionRequest request) Returns true if there are no objects to be painted within the requested region.- Specified by:
isEmptyRegionin interfacequpath.lib.images.servers.ImageServer<BufferedImage>- Overrides:
isEmptyRegionin classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
getServerType
- Specified by:
getServerTypein interfacequpath.lib.images.servers.ImageServer<BufferedImage>
-
getOriginalMetadata
public qupath.lib.images.servers.ImageServerMetadata getOriginalMetadata()- Specified by:
getOriginalMetadatain interfacequpath.lib.images.servers.ImageServer<BufferedImage>
-
setMetadata
public void setMetadata(qupath.lib.images.servers.ImageServerMetadata metadata) Throws an exception - metadata should not be set for a hierarchy image server directly. Any changes should be made to the underlying image server for which this server represents an object hierarchy.- Specified by:
setMetadatain interfacequpath.lib.images.servers.ImageServer<BufferedImage>- Overrides:
setMetadatain classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
createDefaultRGBImage
- Overrides:
createDefaultRGBImagein classqupath.lib.images.servers.AbstractTileableImageServer
-
readTile
protected BufferedImage readTile(qupath.lib.images.servers.TileRequest tileRequest) throws IOException - Specified by:
readTilein classqupath.lib.images.servers.AbstractTileableImageServer- Throws:
IOException
-