Class BioFormatsImageServer
java.lang.Object
qupath.lib.images.servers.AbstractImageServer<BufferedImage>
qupath.lib.images.servers.AbstractTileableImageServer
qupath.lib.images.servers.bioformats.BioFormatsImageServer
- All Implemented Interfaces:
AutoCloseable,qupath.lib.images.servers.ImageServer<BufferedImage>,qupath.lib.objects.PathObjectReader
public class BioFormatsImageServer
extends qupath.lib.images.servers.AbstractTileableImageServer
implements qupath.lib.objects.PathObjectReader
QuPath ImageServer that uses the Bio-Formats library to read image data.
See http://www.openmicroscopy.org/site/products/bio-formats
See also https://docs.openmicroscopy.org/bio-formats/6.5.1/developers/matlab-dev.html#improving-reading-performance
-
Constructor Summary
ConstructorsConstructorDescriptionBioFormatsImageServer(URI uri, String... args) Create an ImageServer using the Bio-Formats library. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createID()protected qupath.lib.images.servers.ImageServerBuilder.ServerBuilder<BufferedImage> Returns a builder capable of creating a server like this one.Retrieve a string representation of the metadata OME-XML.getAssociatedImage(String name) getFile()Get the underlying file.Get the format String, as returned by Bio-FormatsIFormatReader.getFormat().Get the MetadataStore, as used by Bio-Formats.qupath.lib.images.servers.ImageServerMetadataintGet the series index, as used by Bio-Formats.getURIs()Collection<qupath.lib.objects.PathObject> readTile(qupath.lib.images.servers.TileRequest tileRequest) voidsetMetadata(qupath.lib.images.servers.ImageServerMetadata metadata) Methods inherited from class qupath.lib.images.servers.AbstractTileableImageServer
allowSmoothInterpolation, createDefaultRGBImage, getDefaultColorModel, getEmptyTile, getEmptyTile, getTile, readRegionMethods inherited from class qupath.lib.images.servers.AbstractImageServer
getBuilder, getCache, getCachedTile, getChannel, getDefaultThumbnail, getDownsampleForResolution, getHeight, getImageClass, getMetadata, getPath, getPixelType, getPreferredDownsamples, getThumbnailDownsampleFactor, getTileRequestManager, getWidth, isEmptyRegion, 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 qupath.lib.images.servers.ImageServer
getPixelCalibration, readBufferedImage, readRegion, readRegion
-
Constructor Details
-
BioFormatsImageServer
public BioFormatsImageServer(URI uri, String... args) throws FormatException, IOException, loci.common.services.DependencyException, loci.common.services.ServiceException, URISyntaxException Create an ImageServer using the Bio-Formats library.This requires an absolute URI, where an integer fragment can be used to define the series number.
- Parameters:
uri- for the image that should be opened; this might include a sub-image as a query or fragment.args- optional arguments- Throws:
FormatExceptionIOExceptionloci.common.services.DependencyExceptionloci.common.services.ServiceExceptionURISyntaxException
-
-
Method Details
-
getFormat
Get the format String, as returned by Bio-FormatsIFormatReader.getFormat().- Returns:
-
getURIs
- Specified by:
getURIsin interfacequpath.lib.images.servers.ImageServer<BufferedImage>
-
createID
- Specified by:
createIDin classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
setMetadata
public void setMetadata(qupath.lib.images.servers.ImageServerMetadata metadata) - Specified by:
setMetadatain interfacequpath.lib.images.servers.ImageServer<BufferedImage>- Overrides:
setMetadatain classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
createServerBuilder
protected qupath.lib.images.servers.ImageServerBuilder.ServerBuilder<BufferedImage> createServerBuilder()Returns a builder capable of creating a server like this one.- Specified by:
createServerBuilderin classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
getSeries
public int getSeries()Get the series index, as used by Bio-Formats.- Returns:
-
readTile
- Specified by:
readTilein classqupath.lib.images.servers.AbstractTileableImageServer- Throws:
IOException
-
getServerType
- Specified by:
getServerTypein interfacequpath.lib.images.servers.ImageServer<BufferedImage>
-
close
- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classqupath.lib.images.servers.AbstractImageServer<BufferedImage>- Throws:
Exception
-
getMetadataStore
Get the MetadataStore, as used by Bio-Formats. This can be used to query metadata values not otherwise accessible.- Returns:
-
dumpMetadata
Retrieve a string representation of the metadata OME-XML.- Returns:
-
getAssociatedImageList
- Specified by:
getAssociatedImageListin interfacequpath.lib.images.servers.ImageServer<BufferedImage>- Overrides:
getAssociatedImageListin classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
getAssociatedImage
- Specified by:
getAssociatedImagein interfacequpath.lib.images.servers.ImageServer<BufferedImage>- Overrides:
getAssociatedImagein classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
getFile
Get the underlying file.- Returns:
-
getOriginalMetadata
public qupath.lib.images.servers.ImageServerMetadata getOriginalMetadata()- Specified by:
getOriginalMetadatain interfacequpath.lib.images.servers.ImageServer<BufferedImage>
-
readPathObjects
- Specified by:
readPathObjectsin interfacequpath.lib.objects.PathObjectReader
-