Package qupath.lib.images.servers
Class WrappedBufferedImageServer
java.lang.Object
qupath.lib.images.servers.AbstractImageServer<BufferedImage>
qupath.lib.images.servers.AbstractTileableImageServer
qupath.lib.images.servers.WrappedBufferedImageServer
- All Implemented Interfaces:
- AutoCloseable,- ImageServer<BufferedImage>
Implementation of an 
ImageServer that simply wraps an existing BufferedImage.
 
 This may help whenever requiring a server, but only having a BufferedImage.
- 
Constructor SummaryConstructorsConstructorDescriptionWrappedBufferedImageServer(String imageName, BufferedImage img) Create anImageServer<BufferedImage>using an image that has been provided directly.WrappedBufferedImageServer(String imageName, BufferedImage img, List<ImageChannel> channels) Create anImageServer<BufferedImage>using an image that has been provided directly.
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringcreateID()Returns a UUID.protected ImageServerBuilder.ServerBuilder<BufferedImage> Returns null (does not support ServerBuilders).Get the original metadata read during creation of the server.A string describing the type of server, for example the name of the library used (Openslide, Bioformats...)getURIs()Get the URIs for images required for this server.protected BufferedImagereadTile(TileRequest tileRequest) Read a single image tile.Methods inherited from class qupath.lib.images.servers.AbstractTileableImageServerallowSmoothInterpolation, createDefaultRGBImage, getDefaultColorModel, getEmptyTile, getEmptyTile, getTile, readRegionMethods inherited from class qupath.lib.images.servers.AbstractImageServerclose, getAssociatedImage, getAssociatedImageList, getBuilder, getCache, getCachedTile, getChannel, getDefaultThumbnail, getDownsampleForResolution, getHeight, getImageClass, getMetadata, getPath, getPixelType, getPreferredDownsamples, getThumbnailDownsampleFactor, getTileRequestManager, getWidth, isEmptyRegion, isRGB, nChannels, nResolutions, nTimepoints, nZSlices, setMetadata, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface qupath.lib.images.servers.ImageServergetPixelCalibration, readBufferedImage, readRegion, readRegion
- 
Constructor Details- 
WrappedBufferedImageServerCreate anImageServer<BufferedImage>using an image that has been provided directly.- Parameters:
- imageName- a name to display (may be null)
- img- the BufferedImage to wrap
 
- 
WrappedBufferedImageServerCreate anImageServer<BufferedImage>using an image that has been provided directly.- Parameters:
- imageName- a name to display (may be null)
- img- the BufferedImage to wrap
- channels- the ImageChannels, required in case the preferred channel colors cannot be obtained from the image itself
 
 
- 
- 
Method Details- 
getURIsDescription copied from interface:ImageServerGet the URIs for images required for this server. In the simplest case, this is a singleton list returning a URI representing a local file. However, some ImageServers may not have an associated URI at all, whereas others may depend upon multiple URIs (e.g. if concatenating images).Note: A URI alone may not be sufficient to recreate even a simple ImageServer; see ImageServer.getBuilder().- Returns:
 
- 
createIDReturns a UUID.- Specified by:
- createIDin class- AbstractImageServer<BufferedImage>
- Returns:
 
- 
getServerTypeDescription copied from interface:ImageServerA string describing the type of server, for example the name of the library used (Openslide, Bioformats...)- Returns:
 
- 
getOriginalMetadataDescription copied from interface:ImageServerGet the original metadata read during creation of the server. This may or may not be correct.- Returns:
- See Also:
 
- 
createServerBuilderReturns null (does not support ServerBuilders).- Specified by:
- createServerBuilderin class- AbstractImageServer<BufferedImage>
- Returns:
 
- 
readTileDescription copied from class:AbstractTileableImageServerRead a single image tile.- Specified by:
- readTilein class- AbstractTileableImageServer
- Parameters:
- tileRequest-
- Returns:
- Throws:
- IOException
 
 
-