Package omero.gateway.facility
Class RenderFacility
- java.lang.Object
-
- omero.gateway.facility.Facility
-
- omero.gateway.facility.RenderFacility
-
public class RenderFacility extends Facility
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description omero.api.RenderingEnginePrxgetRenderingEngine(SecurityContext ctx, long imageId, boolean initDefaultSettings)Get a RenderingEngine for an image.omero.api.RenderingEnginePrxgetRenderingEngine(SecurityContext ctx, long imageId, boolean initDefaultSettings, boolean closeRE)Gets a RenderingEngine for an image.booleanisRGB(SecurityContext ctx, long imageId)Tries to determine if an image is an RGB(A) image.int[]renderPlane(SecurityContext ctx, long imageId, int z, int t)Renders the selected z, t plane of the given image as RGB image.int[]renderPlane(SecurityContext ctx, long imageId, int z, int t, boolean closeRE)Renders the selected z, t plane of the given image as RGB image.java.awt.image.BufferedImagerenderPlaneAsBufferedImage(SecurityContext ctx, long imageId, int z, int t)Renders the selected z, t plane of the given image as BufferedImage.java.awt.image.BufferedImagerenderPlaneAsBufferedImage(SecurityContext ctx, long imageId, int z, int t, boolean closeRE)Renders the selected z, t plane of the given image as BufferedImage.-
Methods inherited from class omero.gateway.facility.Facility
addPropertyChangeListener, clear, firePropertyChanged, firePropertyChanged, getFacility, logDebug, logError, logInfo, logWarn, removePropertyChangeListener
-
-
-
-
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 IDinitDefaultSettings- 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 inDSAccessException- 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 IDinitDefaultSettings- 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 inDSAccessException- 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 inDSAccessException- 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 IDz- The z planet- The time point- Returns:
- An RGB image ready to be displayed on screen.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- 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 IDz- The z planet- The time pointcloseRE- 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 inDSAccessException- 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 IDz- The z planet- The time point- Returns:
- A BufferedImage ready to be displayed on screen.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- 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 IDz- The z planet- The time pointcloseRE- Close the rendering engine again- Returns:
- A BufferedImage ready to be displayed on screen.
- Throws:
DSOutOfServiceException- If the connection is broken, or not logged inDSAccessException- If an error occurred while trying to retrieve data from OMERO service.
-
-