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 void
read image metadata and build a QuPath ImageServerMetadata object.void
close()
protected String
createID()
protected qupath.lib.images.servers.ImageServerBuilder.ServerBuilder<BufferedImage>
boolean
Return 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 fromAbstractImageServer
getHost()
Return the URI host used by this image servergetId()
Return the OMERO ID of the imagefr.igred.omero.repository.ImageWrapper
qupath.lib.images.servers.ImageServerMetadata
int
getPort()
Return the URI port used by this image serverint
Return the preferred tile height of thisImageServer
.int
Return the preferred tile width of thisImageServer
.Return the URI scheme used by this image servergetURIs()
int
hashCode()
Collection<qupath.lib.objects.PathObject>
See belowCollection<qupath.lib.objects.PathObject>
readPathObjects
(String owner) Deprecated.protected BufferedImage
readTile
(qupath.lib.images.servers.TileRequest request) Methods inherited from class qupath.lib.images.servers.AbstractTileableImageServer
allowSmoothInterpolation, createDefaultRGBImage, getDefaultColorModel, getEmptyTile, getEmptyTile, getTile, readRegion
Methods 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, toString
Methods 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.ServerError
omero.gateway.exception.DSOutOfServiceException
ExecutionException
omero.gateway.exception.DSAccessException
IOException
-
createID
- Specified by:
createID
in classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
-
getURIs
- Specified by:
getURIs
in interfacequpath.lib.images.servers.ImageServer<BufferedImage>
-
getServerType
- Specified by:
getServerType
in interfacequpath.lib.images.servers.ImageServer<BufferedImage>
-
getOriginalMetadata
public qupath.lib.images.servers.ImageServerMetadata getOriginalMetadata()- Specified by:
getOriginalMetadata
in interfacequpath.lib.images.servers.ImageServer<BufferedImage>
-
readTile
- Specified by:
readTile
in classqupath.lib.images.servers.AbstractTileableImageServer
- Throws:
IOException
-
createServerBuilder
protected qupath.lib.images.servers.ImageServerBuilder.ServerBuilder<BufferedImage> createServerBuilder()- Specified by:
createServerBuilder
in 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:
getDefaultThumbnail
in interfacequpath.lib.images.servers.ImageServer<BufferedImage>
- Overrides:
getDefaultThumbnail
in 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:
close
in interfaceAutoCloseable
- Overrides:
close
in classqupath.lib.images.servers.AbstractImageServer<BufferedImage>
- Throws:
Exception
-
readPathObjects
See below- Specified by:
readPathObjects
in 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