Class RenderFacility


  • public class RenderFacility
    extends Facility
    • Method Detail

      • getRenderingEngine

        public omero.api.RenderingEnginePrx getRenderingEngine​(SecurityContext ctx,
                                                               long imageId,
                                                               boolean initDefaultSettings)
                                                        throws DSOutOfServiceException,
                                                               DSAccessException,
                                                               omero.ServerError
        Get a RenderingEngine for an image.
        Parameters:
        ctx - The security context.
        imageId - The image ID
        initDefaultSettings - Flag to create default rendering settings if the image doesn't have any for the current user.
        Returns:
        A RenderingEngine for the image
        Throws:
        DSOutOfServiceException - If the connection is broken, or not logged in
        DSAccessException - If an error occurred while trying to retrieve data from OMERO service.
        omero.ServerError
      • getRenderingEngine

        public omero.api.RenderingEnginePrx getRenderingEngine​(SecurityContext ctx,
                                                               long imageId,
                                                               boolean initDefaultSettings,
                                                               boolean closeRE)
                                                        throws DSOutOfServiceException,
                                                               DSAccessException
        Gets a RenderingEngine for an image.
        Parameters:
        ctx - The security context.
        imageId - The image ID
        initDefaultSettings - Flag to create default rendering settings if the image doesn't have any for the current user (if set to false and the image doesn't have any rendering settings, null is returned)
        closeRE - Close the rendering engine again
        Returns:
        A RenderingEngine for the image or null if RenderingEngine couldn't be initialised.
        Throws:
        DSOutOfServiceException - If the connection is broken, or not logged in
        DSAccessException - If an error occurred while trying to retrieve data from OMERO service.
      • isRGB

        public boolean isRGB​(SecurityContext ctx,
                             long imageId)
                      throws DSOutOfServiceException,
                             DSAccessException
        Tries to determine if an image is an RGB(A) image. (Note: This does not necessarily give the same results as Bioformats isRGB()! FormatReader.isRGB() only checks if the image has more than one channel)
        Parameters:
        ctx - The security context.
        imageId - The image ID
        Returns:
        True if the image is RGB(A)
        Throws:
        DSOutOfServiceException - If the connection is broken, or not logged in
        DSAccessException - If an error occurred while trying to retrieve data from OMERO service.
      • renderPlane

        public int[] renderPlane​(SecurityContext ctx,
                                 long imageId,
                                 int z,
                                 int t)
                          throws DSOutOfServiceException,
                                 DSAccessException
        Renders the selected z, t plane of the given image as RGB image.
        Parameters:
        ctx - The security context.
        imageId - The image ID
        z - The z plane
        t - The time point
        Returns:
        An RGB image ready to be displayed on screen.
        Throws:
        DSOutOfServiceException - If the connection is broken, or not logged in
        DSAccessException - If an error occurred while trying to retrieve data from OMERO service.
      • renderPlane

        public int[] renderPlane​(SecurityContext ctx,
                                 long imageId,
                                 int z,
                                 int t,
                                 boolean closeRE)
                          throws DSOutOfServiceException,
                                 DSAccessException
        Renders the selected z, t plane of the given image as RGB image.
        Parameters:
        ctx - The security context.
        imageId - The image ID
        z - The z plane
        t - The time point
        closeRE - Close the rendering engine again
        Returns:
        An RGB image ready to be displayed on screen.
        Throws:
        DSOutOfServiceException - If the connection is broken, or not logged in
        DSAccessException - If an error occurred while trying to retrieve data from OMERO service.
      • renderPlaneAsBufferedImage

        public java.awt.image.BufferedImage renderPlaneAsBufferedImage​(SecurityContext ctx,
                                                                       long imageId,
                                                                       int z,
                                                                       int t)
                                                                throws DSOutOfServiceException,
                                                                       DSAccessException
        Renders the selected z, t plane of the given image as BufferedImage.
        Parameters:
        ctx - The security context.
        imageId - The image ID
        z - The z plane
        t - The time point
        Returns:
        A BufferedImage ready to be displayed on screen.
        Throws:
        DSOutOfServiceException - If the connection is broken, or not logged in
        DSAccessException - If an error occurred while trying to retrieve data from OMERO service.
      • renderPlaneAsBufferedImage

        public java.awt.image.BufferedImage renderPlaneAsBufferedImage​(SecurityContext ctx,
                                                                       long imageId,
                                                                       int z,
                                                                       int t,
                                                                       boolean closeRE)
                                                                throws DSOutOfServiceException,
                                                                       DSAccessException
        Renders the selected z, t plane of the given image as BufferedImage.
        Parameters:
        ctx - The security context.
        imageId - The image ID
        z - The z plane
        t - The time point
        closeRE - Close the rendering engine again
        Returns:
        A BufferedImage ready to be displayed on screen.
        Throws:
        DSOutOfServiceException - If the connection is broken, or not logged in
        DSAccessException - If an error occurred while trying to retrieve data from OMERO service.