Class OmeroRawImageServer
java.lang.Object
qupath.lib.images.servers.AbstractImageServer<BufferedImage>
qupath.lib.images.servers.AbstractTileableImageServer
qupath.ext.biop.servers.omero.raw.OmeroRawImageServer
- All Implemented Interfaces:
AutoCloseable,qupath.lib.images.servers.ImageServer<BufferedImage>,qupath.lib.objects.PathObjectReader
public class OmeroRawImageServer
extends qupath.lib.images.servers.AbstractTileableImageServer
implements qupath.lib.objects.PathObjectReader
ImageServer that reads pixels using the OMERO-JAVA gateway
Note that this ImageServer provides access to the raw data (not JPEG rendered).
Fluorescence and bright-field images from OMERO can be open with it.
Thanks to the code written by Peter Bankhead and the QuPath team for the BioFormatsImageServer,
we were able to adapt the reader pooling and the parallelization to our OmeroRawImageServer, to make
it faster and more efficient.
-
Method Summary
Modifier and TypeMethodDescriptionprotected voidread image metadata and build a QuPath ImageServerMetadata object.voidclose()protected StringcreateID()protected qupath.lib.images.servers.ImageServerBuilder.ServerBuilder<BufferedImage>booleanReturn the raw client used for this image server.getDefaultThumbnail(int z, int t) Overridden method to generate a thumbnail even if it cannot be read from OMERO Code adapted fromAbstractImageServergetHost()Return the URI host used by this image servergetId()Return the OMERO ID of the imagefr.igred.omero.repository.ImageWrapperqupath.lib.images.servers.ImageServerMetadataintgetPort()Return the URI port used by this image serverintReturn the preferred tile height of thisImageServer.intReturn the preferred tile width of thisImageServer.Return the URI scheme used by this image servergetURIs()inthashCode()Collection<qupath.lib.objects.PathObject>See belowCollection<qupath.lib.objects.PathObject>readPathObjects(String owner) Deprecated.protected BufferedImagereadTile(qupath.lib.images.servers.TileRequest request) Methods inherited from class qupath.lib.images.servers.AbstractTileableImageServer
allowSmoothInterpolation, createDefaultRGBImage, getDefaultColorModel, getEmptyTile, getEmptyTile, getTile, readRegionMethods inherited from class qupath.lib.images.servers.AbstractImageServer
finalize, getAssociatedImage, getAssociatedImageList, getBuilder, getCache, getCachedTile, getChannel, getDownsampleForResolution, getHeight, getImageClass, getMetadata, getPath, getPixelType, getPreferredDownsamples, getThumbnailDownsampleFactor, getTileRequestManager, getWidth, isEmptyRegion, isRGB, nChannels, nResolutions, nTimepoints, nZSlices, setMetadata, toStringMethods inherited from interface qupath.lib.images.servers.ImageServer
getPixelCalibration, readBufferedImage, readRegion, readRegion
-
Method Details
-
buildMetadata
protected void buildMetadata() throws omero.ServerError, omero.gateway.exception.DSOutOfServiceException, ExecutionException, omero.gateway.exception.DSAccessException, IOExceptionread image metadata and build a QuPath ImageServerMetadata object.- Throws:
omero.ServerErroromero.gateway.exception.DSOutOfServiceExceptionExecutionExceptionomero.gateway.exception.DSAccessExceptionIOException
-
createID
- Specified by:
createIDin classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
getURIs
- Specified by:
getURIsin interfacequpath.lib.images.servers.ImageServer<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>
-
readTile
- Specified by:
readTilein classqupath.lib.images.servers.AbstractTileableImageServer- Throws:
IOException
-
createServerBuilder
protected qupath.lib.images.servers.ImageServerBuilder.ServerBuilder<BufferedImage> createServerBuilder()- Specified by:
createServerBuilderin classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
getDefaultThumbnail
Overridden method to generate a thumbnail even if it cannot be read from OMERO Code adapted fromAbstractImageServer- Specified by:
getDefaultThumbnailin interfacequpath.lib.images.servers.ImageServer<BufferedImage>- Overrides:
getDefaultThumbnailin classqupath.lib.images.servers.AbstractImageServer<BufferedImage>- Parameters:
z-t-- Returns:
- Throws:
IOException
-
getPreferredTileWidth
public int getPreferredTileWidth()Return the preferred tile width of thisImageServer.- Returns:
- preferredTileWidth
-
getPreferredTileHeight
public int getPreferredTileHeight()Return the preferred tile height of thisImageServer.- Returns:
- preferredTileHeight
-
getClient
Return the raw client used for this image server.- Returns:
- client
-
getId
Return the OMERO ID of the image- Returns:
- id
-
getImageWrapper
public fr.igred.omero.repository.ImageWrapper getImageWrapper() -
getHost
Return the URI host used by this image server- Returns:
- host
-
getScheme
Return the URI scheme used by this image server- Returns:
- scheme
-
getPort
public int getPort()Return the URI port used by this image server- Returns:
- port
-
hashCode
public int hashCode() -
equals
-
close
- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classqupath.lib.images.servers.AbstractImageServer<BufferedImage>- Throws:
Exception
-
readPathObjects
See below- Specified by:
readPathObjectsin interfacequpath.lib.objects.PathObjectReader- Returns:
- list of path objects
-
readPathObjects
Deprecated.Retrieve any ROIs created by a certain user stored with this image as annotation objects. If the user is null, then all ROIs are imported, independently of who creates the ROIs. ROIs can be made of single or multiple rois. rois can be contained inside ROIs (ex. holes) but should not intersect. It is also possible to import a set of physically separated ROIs as one geometry ROI.
***********************BE CAREFUL****************************
For the z and t in the ImagePlane, if z < 0 and t < 0 (meaning that roi should be present on all the slices/frames), only the first slice/frame is taken into account (meaning that roi are only visible on the first slice/frame)
****************************************************************- Parameters:
owner-- Returns:
- list of path objects
-
OmeroRawScripting.getROIs(OmeroRawImageServer, String, boolean)instead