ome.services.blitz.gateway.services.impl
Class ImageServiceImpl

java.lang.Object
  extended by ome.services.blitz.gateway.services.impl.ImageServiceImpl
All Implemented Interfaces:
ImageService

public class ImageServiceImpl
extends Object
implements ImageService

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

Constructor Summary
ImageServiceImpl(GatewayFactory gatewayFactory)
          Instantiate the imageService with the serviceFactory.
 
Method Summary
 Long copyImage(long imageId, int x, int y, int t, int z, List<Integer> channelList, String imageName)
          Copy the image and pixels from image.
 Long copyPixels(long pixelsID, int x, int y, int t, int z, List<Integer> channelList, String methodology)
          Copy the pixels set from pixels to a new set.
 Long copyPixels(long pixelsID, List<Integer> channelList, String imageName)
          Copy the pixels set from pixels to a new set.
 Long createImage(int sizeX, int sizeY, int sizeZ, int sizeT, List<Integer> channelList, omero.model.PixelsType pixelsType, String name, String description)
          Create a new image of specified X,Y, Z, T and channels plus pixelsType with name and description
 omero.model.Image getImage(long imageID)
          Get the image information for an image.
 omero.model.Pixels getPixels(long pixelsId)
          Get the pixels information for an image.
 byte[] getRawPlane(long pixelsId, int z, int c, int t)
          Get the raw plane from the server with id pixelsId, and channels, c, timepoint t, and z-section z.
 int[] getRenderedImage(long pixelsId, int z, int t)
          Render image as Buffered image.
 int[][][] getRenderedImageMatrix(long pixelsId, int z, int t)
          Render image as 3d matrix.
 byte[] getThumbnail(long pixelsId, omero.RInt sizeX, omero.RInt sizeY)
          Get the thumbnail of the image.
 Map<Long,byte[]> getThumbnailSet(omero.RInt sizeX, omero.RInt sizeY, List<Long> pixelsIds)
          Get a set of thumbnails.
 int[] renderAsPackedIntAsRGBA(long pixelsId, int z, int t)
          Render image as Buffered image.
 void setActive(Long pixelsId, int w, boolean active)
          Set the active channels in the pixels.
 void uploadPlane(long pixelsId, int z, int c, int t, byte[] data)
          Upload the plane to the server, on pixels id with channel and the time, + z section. the data is the client 2d data values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageServiceImpl

public ImageServiceImpl(GatewayFactory gatewayFactory)
Instantiate the imageService with the serviceFactory.

Parameters:
serviceFactory - see above.
Method Detail

createImage

public Long createImage(int sizeX,
                        int sizeY,
                        int sizeZ,
                        int sizeT,
                        List<Integer> channelList,
                        omero.model.PixelsType pixelsType,
                        String name,
                        String description)
                 throws omero.ServerError
Description copied from interface: ImageService
Create a new image of specified X,Y, Z, T and channels plus pixelsType with name and description

Specified by:
createImage in interface ImageService
Returns:
new image id.
Throws:
omero.ServerError

copyPixels

public Long copyPixels(long pixelsID,
                       int x,
                       int y,
                       int t,
                       int z,
                       List<Integer> channelList,
                       String methodology)
                throws omero.ServerError
Description copied from interface: ImageService
Copy the pixels set from pixels to a new set.

Specified by:
copyPixels in interface ImageService
Parameters:
pixelsID - pixels id to copy.
x - width of plane.
y - height of plane.
t - num timepoints
z - num zsections.
channelList - the list of channels to copy.
methodology - what created the pixels.
Returns:
new id.
Throws:
omero.ServerError

copyPixels

public Long copyPixels(long pixelsID,
                       List<Integer> channelList,
                       String imageName)
                throws omero.ServerError
Description copied from interface: ImageService
Copy the pixels set from pixels to a new set.

Specified by:
copyPixels in interface ImageService
Parameters:
pixelsID - pixels id to copy.
channelList - the list of channels to copy.
imageName - what created the pixels.
Returns:
new id.
Throws:
omero.ServerError

copyImage

public Long copyImage(long imageId,
                      int x,
                      int y,
                      int t,
                      int z,
                      List<Integer> channelList,
                      String imageName)
               throws omero.ServerError
Description copied from interface: ImageService
Copy the image and pixels from image.

Specified by:
copyImage in interface ImageService
Parameters:
imageId - image id to copy.
x - width of plane.
y - height of plane.
t - number of timepoints.
z - number of zsections.
channelList - the list of channels to copy.
imageName - The name of the image.
Returns:
new id.
Throws:
omero.ServerError

getImage

public omero.model.Image getImage(long imageID)
                           throws omero.ServerError
Description copied from interface: ImageService
Get the image information for an image.

Specified by:
getImage in interface ImageService
Parameters:
imageID - image id relating to the iamge.
Returns:
see above.
Throws:
omero.ServerError

getPixels

public omero.model.Pixels getPixels(long pixelsId)
                             throws omero.ServerError
Description copied from interface: ImageService
Get the pixels information for an image.

Specified by:
getPixels in interface ImageService
Parameters:
pixelsId - image id relating to the pixels.
Returns:
see above.
Throws:
omero.ServerError

getRawPlane

public byte[] getRawPlane(long pixelsId,
                          int z,
                          int c,
                          int t)
                   throws omero.ServerError
Description copied from interface: ImageService
Get the raw plane from the server with id pixelsId, and channels, c, timepoint t, and z-section z. This is the plane as bytes, not converted to doubles.

Specified by:
getRawPlane in interface ImageService
Parameters:
pixelsId - see above.
z - see above.
c - see above.
t - see above.
Returns:
see above.
Throws:
omero.ServerError

getRenderedImage

public int[] getRenderedImage(long pixelsId,
                              int z,
                              int t)
                       throws omero.ServerError
Description copied from interface: ImageService
Render image as Buffered image.

Specified by:
getRenderedImage in interface ImageService
Parameters:
pixelsId - pixels id of the plane to render
z - z section to render
t - timepoint to render
Returns:
packed int
Throws:
omero.ServerError

renderAsPackedIntAsRGBA

public int[] renderAsPackedIntAsRGBA(long pixelsId,
                                     int z,
                                     int t)
                              throws omero.ServerError
Description copied from interface: ImageService
Render image as Buffered image.

Specified by:
renderAsPackedIntAsRGBA in interface ImageService
Parameters:
pixelsId - pixels id of the plane to render
z - z section to render
t - timepoint to render
Returns:
packed int
Throws:
omero.ServerError

getRenderedImageMatrix

public int[][][] getRenderedImageMatrix(long pixelsId,
                                        int z,
                                        int t)
                                 throws omero.ServerError
Description copied from interface: ImageService
Render image as 3d matrix.

Specified by:
getRenderedImageMatrix in interface ImageService
Parameters:
pixelsId - pixels id of the plane to render
z - z section to render
t - timepoint to render
Returns:
packed int
Throws:
omero.ServerError

getThumbnail

public byte[] getThumbnail(long pixelsId,
                           omero.RInt sizeX,
                           omero.RInt sizeY)
                    throws omero.ServerError
Description copied from interface: ImageService
Get the thumbnail of the image.

Specified by:
getThumbnail in interface ImageService
Parameters:
pixelsId - for pixelsId
sizeX - size of thumbnail.
sizeY - size of thumbnail.
Returns:
see above.
Throws:
omero.ServerError

getThumbnailSet

public Map<Long,byte[]> getThumbnailSet(omero.RInt sizeX,
                                        omero.RInt sizeY,
                                        List<Long> pixelsIds)
                                 throws omero.ServerError
Description copied from interface: ImageService
Get a set of thumbnails.

Specified by:
getThumbnailSet in interface ImageService
Parameters:
sizeX - size of thumbnail.
sizeY - size of thumbnail.
pixelsIds - list of ids.
Returns:
see above.
Throws:
omero.ServerError

setActive

public void setActive(Long pixelsId,
                      int w,
                      boolean active)
               throws omero.ServerError
Description copied from interface: ImageService
Set the active channels in the pixels.

Specified by:
setActive in interface ImageService
Parameters:
pixelsId - the pixels id.
w - the channel
active - set active?
Throws:
omero.ServerError

uploadPlane

public void uploadPlane(long pixelsId,
                        int z,
                        int c,
                        int t,
                        byte[] data)
                 throws omero.ServerError
Upload the plane to the server, on pixels id with channel and the time, + z section. the data is the client 2d data values. This will be converted to the raw server bytes.

Specified by:
uploadPlane in interface ImageService
Parameters:
pixelsId - pixels id to upload to .
z - z section.
c - channel.
t - time point.
data - plane data.
Throws:
DSOutOfServiceException
omero.ServerError


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

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