ome.services.blitz.gateway
Class OmeroGateway

java.lang.Object
  extended by ome.services.blitz.impl.AbstractAmdServant
      extended by ome.services.blitz.gateway.OmeroGateway
All Implemented Interfaces:
CloseableServant, BlitzOnly, ServiceFactoryAware, omero.api._GatewayOperations, omero.api._ServiceInterfaceOperations, omero.api._StatefulServiceInterfaceOperations, org.springframework.context.ApplicationContextAware

public class OmeroGateway
extends AbstractAmdServant
implements ServiceFactoryAware, omero.api._GatewayOperations, BlitzOnly

Since:
OME3.0
Version:
3.0 (Internal version: $Revision: $Date: $)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk, Donald MacDonald      donald@lifesci.dundee.ac.uk

Field Summary
 
Fields inherited from class ome.services.blitz.impl.AbstractAmdServant
be, ctx, invoker, log, service
 
Constructor Summary
OmeroGateway(BlitzExecutor be)
           
 
Method Summary
 void attachImageToDataset(omero.model.Dataset dataset, omero.model.Image image, Ice.Current __current)
           
 long copyImage(long imageId, int x, int y, int t, int z, List<Integer> channelList, String imageName, Ice.Current __current)
           
 long copyPixels(long pixelsID, List<Integer> channelList, String methodology, Ice.Current __current)
           
 long copyPixelsXYTZ(long pixelsID, int x, int y, int t, int z, List<Integer> channelList, String methodology, Ice.Current __current)
           
 long createImage(int sizeX, int sizeY, int sizeZ, int sizeT, List<Integer> channelList, omero.model.PixelsType pixelsType, String name, String description, Ice.Current __current)
           
 void deleteObject(omero.model.IObject row, Ice.Current __current)
           
 List<omero.model.IObject> findAllByQuery(String myQuery, Ice.Current __current)
           
 omero.model.IObject findByQuery(String myQuery, Ice.Current __current)
           
 omero.model.Dataset getDataset(long datasetId, boolean leaves, Ice.Current __current)
           
 List<omero.model.Dataset> getDatasets(List<Long> ids, boolean withLeaves, Ice.Current __current)
           
 omero.model.Image getImage(long id, Ice.Current __current)
           
 List<omero.model.Image> getImageByName(String imageName, Ice.Current __current)
           
 List<omero.model.Image> getImageFromDatasetByName(long datasetId, String imageName, Ice.Current __current)
           
 List<omero.model.Image> getImages(omero.api.ContainerClass parentType, List<Long> ids, Ice.Current __current)
           
 omero.model.Pixels getPixels(long pixelsId, Ice.Current __current)
           
 List<omero.model.Pixels> getPixelsFromImage(long imageId, Ice.Current __current)
           
 omero.model.PixelsType getPixelType(String type, Ice.Current __current)
           
 List<omero.model.PixelsType> getPixelTypes(Ice.Current __current)
           
 byte[] getPlane(long pixelsId, int z, int c, int t, Ice.Current current)
          Get the raw plane for the pixels pixelsId, this returns a 2d array representing the plane, it returns doubles but will not lose data.
 List<omero.model.Project> getProjects(List<Long> ids, boolean withLeaves, Ice.Current __current)
           
 int[] getRenderedImage(long pixelsId, int z, int t, Ice.Current __current)
           
 int[][][] getRenderedImageMatrix(long pixelsId, int z, int t, Ice.Current __current)
           
 byte[] getThumbnail(long pixelsId, omero.RInt sizeX, omero.RInt sizeY, Ice.Current __current)
           
 Map<Long,byte[]> getThumbnailSet(omero.RInt sizeX, omero.RInt sizeY, List<Long> pixelsIds, Ice.Current __current)
           
 void keepAlive(Ice.Current current)
          Keep service alive.
protected  void preClose()
           
 int[] renderAsPackedIntAsRGBA(long pixelsId, int z, int t, Ice.Current __current)
           
 List<omero.model.IObject> saveAndReturnArray(List<omero.model.IObject> graph, Ice.Current __current)
           
 omero.model.IObject saveAndReturnObject(omero.model.IObject obj, Ice.Current __current)
           
 void saveArray(List<omero.model.IObject> graph, Ice.Current __current)
           
 void saveObject(omero.model.IObject obj, Ice.Current __current)
           
 void setActive(long pixelsId, int w, boolean active, Ice.Current __current)
           
 void setServiceFactory(ServiceFactoryI sf)
          Initialize the service factory which creates the gateway and services and links the different services together.
 omero.model.Pixels updatePixels(omero.model.Pixels pixels, Ice.Current __current)
           
 void uploadPlane(long pixelsId, int z, int c, int t, byte[] data, Ice.Current __current)
           
 
Methods inherited from class ome.services.blitz.impl.AbstractAmdServant
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, close_async, close, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface omero.api._StatefulServiceInterfaceOperations
activate_async, close_async, getCurrentEventContext_async, passivate_async
 

Constructor Detail

OmeroGateway

public OmeroGateway(BlitzExecutor be)
Method Detail

setServiceFactory

public void setServiceFactory(ServiceFactoryI sf)
                       throws omero.ServerError
Initialize the service factory which creates the gateway and services and links the different services together.

Specified by:
setServiceFactory in interface ServiceFactoryAware
Parameters:
client - an already existing client object.
Throws:
DSOutOfServiceException
omero.ServerError

attachImageToDataset

public void attachImageToDataset(omero.model.Dataset dataset,
                                 omero.model.Image image,
                                 Ice.Current __current)
                          throws omero.ServerError
Specified by:
attachImageToDataset in interface omero.api._GatewayOperations
Throws:
omero.ServerError

copyPixels

public long copyPixels(long pixelsID,
                       List<Integer> channelList,
                       String methodology,
                       Ice.Current __current)
                throws omero.ServerError
Specified by:
copyPixels in interface omero.api._GatewayOperations
Throws:
omero.ServerError

copyPixelsXYTZ

public long copyPixelsXYTZ(long pixelsID,
                           int x,
                           int y,
                           int t,
                           int z,
                           List<Integer> channelList,
                           String methodology,
                           Ice.Current __current)
                    throws omero.ServerError
Specified by:
copyPixelsXYTZ in interface omero.api._GatewayOperations
Throws:
omero.ServerError

createImage

public long createImage(int sizeX,
                        int sizeY,
                        int sizeZ,
                        int sizeT,
                        List<Integer> channelList,
                        omero.model.PixelsType pixelsType,
                        String name,
                        String description,
                        Ice.Current __current)
                 throws omero.ServerError
Specified by:
createImage in interface omero.api._GatewayOperations
Throws:
omero.ServerError

deleteObject

public void deleteObject(omero.model.IObject row,
                         Ice.Current __current)
                  throws omero.ServerError
Specified by:
deleteObject in interface omero.api._GatewayOperations
Throws:
omero.ServerError

findAllByQuery

public List<omero.model.IObject> findAllByQuery(String myQuery,
                                                Ice.Current __current)
                                         throws omero.ServerError
Specified by:
findAllByQuery in interface omero.api._GatewayOperations
Throws:
omero.ServerError

findByQuery

public omero.model.IObject findByQuery(String myQuery,
                                       Ice.Current __current)
                                throws omero.ServerError
Specified by:
findByQuery in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getDataset

public omero.model.Dataset getDataset(long datasetId,
                                      boolean leaves,
                                      Ice.Current __current)
                               throws omero.ServerError
Specified by:
getDataset in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getDatasets

public List<omero.model.Dataset> getDatasets(List<Long> ids,
                                             boolean withLeaves,
                                             Ice.Current __current)
                                      throws omero.ServerError
Specified by:
getDatasets in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getImage

public omero.model.Image getImage(long id,
                                  Ice.Current __current)
                           throws omero.ServerError
Specified by:
getImage in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getImageByName

public List<omero.model.Image> getImageByName(String imageName,
                                              Ice.Current __current)
                                       throws omero.ServerError
Specified by:
getImageByName in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getImageFromDatasetByName

public List<omero.model.Image> getImageFromDatasetByName(long datasetId,
                                                         String imageName,
                                                         Ice.Current __current)
                                                  throws omero.ServerError
Specified by:
getImageFromDatasetByName in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getImages

public List<omero.model.Image> getImages(omero.api.ContainerClass parentType,
                                         List<Long> ids,
                                         Ice.Current __current)
                                  throws omero.ServerError
Specified by:
getImages in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getPixelType

public omero.model.PixelsType getPixelType(String type,
                                           Ice.Current __current)
                                    throws omero.ServerError
Specified by:
getPixelType in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getPixelTypes

public List<omero.model.PixelsType> getPixelTypes(Ice.Current __current)
                                           throws omero.ServerError
Specified by:
getPixelTypes in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getPixels

public omero.model.Pixels getPixels(long pixelsId,
                                    Ice.Current __current)
                             throws omero.ServerError
Specified by:
getPixels in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getPixelsFromImage

public List<omero.model.Pixels> getPixelsFromImage(long imageId,
                                                   Ice.Current __current)
                                            throws omero.ServerError
Specified by:
getPixelsFromImage in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getProjects

public List<omero.model.Project> getProjects(List<Long> ids,
                                             boolean withLeaves,
                                             Ice.Current __current)
                                      throws omero.ServerError
Specified by:
getProjects in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getRenderedImage

public int[] getRenderedImage(long pixelsId,
                              int z,
                              int t,
                              Ice.Current __current)
                       throws omero.ServerError
Specified by:
getRenderedImage in interface omero.api._GatewayOperations
Throws:
omero.ServerError

renderAsPackedIntAsRGBA

public int[] renderAsPackedIntAsRGBA(long pixelsId,
                                     int z,
                                     int t,
                                     Ice.Current __current)
                              throws omero.ServerError
Specified by:
renderAsPackedIntAsRGBA in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getRenderedImageMatrix

public int[][][] getRenderedImageMatrix(long pixelsId,
                                        int z,
                                        int t,
                                        Ice.Current __current)
                                 throws omero.ServerError
Specified by:
getRenderedImageMatrix in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getThumbnail

public byte[] getThumbnail(long pixelsId,
                           omero.RInt sizeX,
                           omero.RInt sizeY,
                           Ice.Current __current)
                    throws omero.ServerError
Specified by:
getThumbnail in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getThumbnailSet

public Map<Long,byte[]> getThumbnailSet(omero.RInt sizeX,
                                        omero.RInt sizeY,
                                        List<Long> pixelsIds,
                                        Ice.Current __current)
                                 throws omero.ServerError
Specified by:
getThumbnailSet in interface omero.api._GatewayOperations
Throws:
omero.ServerError

saveAndReturnArray

public List<omero.model.IObject> saveAndReturnArray(List<omero.model.IObject> graph,
                                                    Ice.Current __current)
                                             throws omero.ServerError
Specified by:
saveAndReturnArray in interface omero.api._GatewayOperations
Throws:
omero.ServerError

saveAndReturnObject

public omero.model.IObject saveAndReturnObject(omero.model.IObject obj,
                                               Ice.Current __current)
                                        throws omero.ServerError
Specified by:
saveAndReturnObject in interface omero.api._GatewayOperations
Throws:
omero.ServerError

saveArray

public void saveArray(List<omero.model.IObject> graph,
                      Ice.Current __current)
               throws omero.ServerError
Specified by:
saveArray in interface omero.api._GatewayOperations
Throws:
omero.ServerError

saveObject

public void saveObject(omero.model.IObject obj,
                       Ice.Current __current)
                throws omero.ServerError
Specified by:
saveObject in interface omero.api._GatewayOperations
Throws:
omero.ServerError

setActive

public void setActive(long pixelsId,
                      int w,
                      boolean active,
                      Ice.Current __current)
               throws omero.ServerError
Specified by:
setActive in interface omero.api._GatewayOperations
Throws:
omero.ServerError

copyImage

public long copyImage(long imageId,
                      int x,
                      int y,
                      int t,
                      int z,
                      List<Integer> channelList,
                      String imageName,
                      Ice.Current __current)
               throws omero.ServerError
Specified by:
copyImage in interface omero.api._GatewayOperations
Throws:
omero.ServerError

keepAlive

public void keepAlive(Ice.Current current)
               throws omero.ServerError
Keep service alive.

Specified by:
keepAlive in interface omero.api._GatewayOperations
Throws:
DSOutOfServiceException
omero.ServerError

uploadPlane

public void uploadPlane(long pixelsId,
                        int z,
                        int c,
                        int t,
                        byte[] data,
                        Ice.Current __current)
                 throws omero.ServerError
Specified by:
uploadPlane in interface omero.api._GatewayOperations
Throws:
omero.ServerError

updatePixels

public omero.model.Pixels updatePixels(omero.model.Pixels pixels,
                                       Ice.Current __current)
                                throws omero.ServerError
Specified by:
updatePixels in interface omero.api._GatewayOperations
Throws:
omero.ServerError

getPlane

public byte[] getPlane(long pixelsId,
                       int z,
                       int c,
                       int t,
                       Ice.Current current)
                throws omero.ServerError
Get the raw plane for the pixels pixelsId, this returns a 2d array representing the plane, it returns doubles but will not lose data.

Specified by:
getPlane in interface omero.api._GatewayOperations
Parameters:
pixelsId - id of the pixels to retrieve.
c - the channel of the pixels to retrieve.
t - the time point to retrieve.
z - the z section to retrieve.
Returns:
The raw plane in 2-d array.
Throws:
omero.ServerError

preClose

protected void preClose()
Overrides:
preClose in class AbstractAmdServant


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

Copyright © 2009 The University of Dundee. All Rights Reserved.