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 Type
    Method
    Description
    protected void
    read image metadata and build a QuPath ImageServerMetadata object.
    void
     
    protected String
     
    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 from AbstractImageServer
    Return the URI host used by this image server
    Return the OMERO ID of the image
    fr.igred.omero.repository.ImageWrapper
     
    qupath.lib.images.servers.ImageServerMetadata
     
    int
    Return the URI port used by this image server
    int
    Return the preferred tile height of this ImageServer.
    int
    Return the preferred tile width of this ImageServer.
    Return the URI scheme used by this image server
     
     
    int
     
    Collection<qupath.lib.objects.PathObject>
    See below
    Collection<qupath.lib.objects.PathObject>
    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 class java.lang.Object

    clone, getClass, notify, notifyAll, wait, wait, wait

    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, IOException
      read image metadata and build a QuPath ImageServerMetadata object.
      Throws:
      omero.ServerError
      omero.gateway.exception.DSOutOfServiceException
      ExecutionException
      omero.gateway.exception.DSAccessException
      IOException
    • createID

      protected String createID()
      Specified by:
      createID in class qupath.lib.images.servers.AbstractImageServer<BufferedImage>
    • getURIs

      public Collection<URI> getURIs()
      Specified by:
      getURIs in interface qupath.lib.images.servers.ImageServer<BufferedImage>
    • getServerType

      public String getServerType()
      Specified by:
      getServerType in interface qupath.lib.images.servers.ImageServer<BufferedImage>
    • getOriginalMetadata

      public qupath.lib.images.servers.ImageServerMetadata getOriginalMetadata()
      Specified by:
      getOriginalMetadata in interface qupath.lib.images.servers.ImageServer<BufferedImage>
    • readTile

      protected BufferedImage readTile(qupath.lib.images.servers.TileRequest request) throws IOException
      Specified by:
      readTile in class qupath.lib.images.servers.AbstractTileableImageServer
      Throws:
      IOException
    • createServerBuilder

      protected qupath.lib.images.servers.ImageServerBuilder.ServerBuilder<BufferedImage> createServerBuilder()
      Specified by:
      createServerBuilder in class qupath.lib.images.servers.AbstractImageServer<BufferedImage>
    • getDefaultThumbnail

      public BufferedImage getDefaultThumbnail(int z, int t) throws IOException
      Overridden method to generate a thumbnail even if it cannot be read from OMERO Code adapted from AbstractImageServer
      Specified by:
      getDefaultThumbnail in interface qupath.lib.images.servers.ImageServer<BufferedImage>
      Overrides:
      getDefaultThumbnail in class qupath.lib.images.servers.AbstractImageServer<BufferedImage>
      Parameters:
      z -
      t -
      Returns:
      Throws:
      IOException
    • getPreferredTileWidth

      public int getPreferredTileWidth()
      Return the preferred tile width of this ImageServer.
      Returns:
      preferredTileWidth
    • getPreferredTileHeight

      public int getPreferredTileHeight()
      Return the preferred tile height of this ImageServer.
      Returns:
      preferredTileHeight
    • getClient

      public OmeroRawClient getClient()
      Return the raw client used for this image server.
      Returns:
      client
    • getId

      public Long getId()
      Return the OMERO ID of the image
      Returns:
      id
    • getImageWrapper

      public fr.igred.omero.repository.ImageWrapper getImageWrapper()
    • getHost

      public String getHost()
      Return the URI host used by this image server
      Returns:
      host
    • getScheme

      public String 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()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class qupath.lib.images.servers.AbstractImageServer<BufferedImage>
      Throws:
      Exception
    • readPathObjects

      public Collection<qupath.lib.objects.PathObject> readPathObjects()
      See below
      Specified by:
      readPathObjects in interface qupath.lib.objects.PathObjectReader
      Returns:
      list of path objects
    • readPathObjects

      @Deprecated public Collection<qupath.lib.objects.PathObject> readPathObjects(String owner)
      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