ome.services
Class RawPixelsBean

java.lang.Object
  extended by ome.services.AbstractStatefulBean
      extended by ome.services.RawPixelsBean
All Implemented Interfaces:
Serializable, RawPixelsStore, ServiceInterface, StatefulServiceInterface, SelfConfigurableService

@Transactional(readOnly=true)
public class RawPixelsBean
extends AbstractStatefulBean
implements RawPixelsStore

Implementation of the RawPixelsStore stateful service.

Since:
OMERO3
Version:
3.0 (Internal version: $Revision$ $Date: 2005/07/05 16:13:52 $)
Author:

Josh Moore     josh.moore@gmx.de
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ome.services.AbstractStatefulBean
iQuery, iUpdate, modified, sec
 
Constructor Summary
RawPixelsBean()
          default constructor
RawPixelsBean(boolean checking, String omeroDataDir)
          overriden to allow Spring to set boolean
 
Method Summary
 void activate()
          Completely restore this service for active use from whatever passivation it has implemented.
 byte[] calculateMessageDigest()
           
 void clean()
           
 void close()
          signals the end of the service lifecycle.
 int getByteWidth()
           
 byte[] getCol(int arg0, int arg1, int arg2, int arg3)
           
 byte[] getHypercube(List<Integer> offset, List<Integer> size, List<Integer> step)
           
 long getPixelsId()
          Returns the current Pixels set identifier.
 byte[] getPlane(int arg0, int arg1, int arg2)
           
 long getPlaneOffset(int arg0, int arg1, int arg2)
           
 byte[] getPlaneRegion(int z, int c, int t, int count, int offset)
           
 int getPlaneSize()
          delegates to PixelBuffer
 byte[] getRegion(int arg0, long arg1)
           
 int getResolutionLevel()
           
 int getResolutionLevels()
           
 byte[] getRow(int arg0, int arg1, int arg2, int arg3)
           
 long getRowOffset(int arg0, int arg1, int arg2, int arg3)
           
 int getRowSize()
           
 Class<? extends ServiceInterface> getServiceInterface()
           
 byte[] getStack(int arg0, int arg1)
           
 long getStackOffset(int arg0, int arg1)
           
 int getStackSize()
           
 byte[] getTile(int z, int c, int t, int x, int y, int w, int h)
           
 int[] getTileSize()
           
 byte[] getTimepoint(int arg0)
           
 long getTimepointOffset(int arg0)
           
 int getTimepointSize()
           
 int getTotalSize()
           
 boolean isDiskSpaceChecking()
           
 boolean isFloat()
           
 boolean isSigned()
           
 void passivate()
          Perform whatever passivation is possible or throw an exception.
 void prepare(Set<Long> pixelsIds)
          Prepares the stateful service with a cache of loaded Pixels objects.
 boolean requiresPixelsPyramid()
           
 ome.model.core.Pixels save()
           
 void setDiskSpaceChecking(boolean diskSpaceChecking)
           
 void setIRepositoryInfo(IRepositoryInfo iRepositoryInfo)
          Disk Space Usage service Bean injector
 void setPixelsData(PixelsService dataService)
           
 void setPixelsId(long pixelsId, boolean bypassOriginalFile)
          Initializes the stateful service for a given Pixels set.
 void setPixelsMetadata(IPixels metaService)
           
 void setPlane(byte[] arg0, int arg1, int arg2, int arg3)
           
 void setRegion(int arg0, long arg1, byte[] arg2)
           
 void setResolutionLevel(int resolutionLevel)
           
 void setRow(byte[] arg0, int arg1, int arg2, int arg3, int arg4)
           
 void setSqlAction(ome.util.SqlAction sql)
          SQL action Bean injector
 void setStack(byte[] arg0, int arg1, int arg2, int arg3)
           
 void setTile(byte[] data, int z, int c, int t, int x, int y, int w, int h)
           
 void setTimepoint(byte[] arg0, int arg1)
           
 
Methods inherited from class ome.services.AbstractStatefulBean
getBeanHelper, getCurrentEventContext, isModified, modified, selfConfigure, setQueryService, setSecuritySystem, setUpdateService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ome.api.StatefulServiceInterface
getCurrentEventContext
 

Constructor Detail

RawPixelsBean

public RawPixelsBean()
default constructor


RawPixelsBean

public RawPixelsBean(boolean checking,
                     String omeroDataDir)
overriden to allow Spring to set boolean

Parameters:
checking -
Method Detail

getServiceInterface

public Class<? extends ServiceInterface> getServiceInterface()
Specified by:
getServiceInterface in interface SelfConfigurableService

setPixelsMetadata

public final void setPixelsMetadata(IPixels metaService)

setPixelsData

public final void setPixelsData(PixelsService dataService)

setIRepositoryInfo

public final void setIRepositoryInfo(IRepositoryInfo iRepositoryInfo)
Disk Space Usage service Bean injector

Parameters:
iRepositoryInfo - an IRepositoryInfo

setSqlAction

public final void setSqlAction(ome.util.SqlAction sql)
SQL action Bean injector

Parameters:
sql - a SqlAction

passivate

@Transactional(readOnly=true)
public void passivate()
Description copied from interface: StatefulServiceInterface
Perform whatever passivation is possible or throw an exception. A good passivation method will free up as much memory as possible, most likely by storing it to disk. A call to passivate should be safe even if the service is already passivated.

Specified by:
passivate in interface StatefulServiceInterface

activate

@Transactional(readOnly=true)
public void activate()
Description copied from interface: StatefulServiceInterface
Completely restore this service for active use from whatever passivation it has implemented. A call to activate should be safe even if the service is already activated.

Specified by:
activate in interface StatefulServiceInterface

save

@Transactional(readOnly=false)
public ome.model.core.Pixels save()
Specified by:
save in interface RawPixelsStore

close

@Transactional(readOnly=false)
public void close()
Description copied from interface: StatefulServiceInterface
signals the end of the service lifecycle. Resources such as Sessions can be released. All further calls will throw an exception.

Specified by:
close in interface StatefulServiceInterface

clean

public void clean()

setPixelsId

public void setPixelsId(long pixelsId,
                        boolean bypassOriginalFile)
Description copied from interface: RawPixelsStore
Initializes the stateful service for a given Pixels set.

Specified by:
setPixelsId in interface RawPixelsStore
Parameters:
pixelsId - Pixels set identifier.
bypassOriginalFile - Whether or not to bypass checking for an original file to back the pixel buffer used by this service. If requests are predominantly write-only or involve the population of a brand new pixel buffer using true here is a safe optimization otherwise false is expected.

getPixelsId

public long getPixelsId()
Description copied from interface: RawPixelsStore
Returns the current Pixels set identifier.

Specified by:
getPixelsId in interface RawPixelsStore
Returns:
See above.

prepare

public void prepare(Set<Long> pixelsIds)
Description copied from interface: RawPixelsStore
Prepares the stateful service with a cache of loaded Pixels objects. This method is designed to combat query overhead, where many sets of Pixels are to be read from or written to, by loading all the Pixels sets at once. Multiple calls will result in the existing cache being overwritten.

Specified by:
prepare in interface RawPixelsStore
Parameters:
pixelsIds - Pixels IDs to cache.

calculateMessageDigest

public byte[] calculateMessageDigest()
Specified by:
calculateMessageDigest in interface RawPixelsStore

getHypercube

public byte[] getHypercube(List<Integer> offset,
                           List<Integer> size,
                           List<Integer> step)
Specified by:
getHypercube in interface RawPixelsStore

getPlaneRegion

public byte[] getPlaneRegion(int z,
                             int c,
                             int t,
                             int count,
                             int offset)
Specified by:
getPlaneRegion in interface RawPixelsStore

getPlane

public byte[] getPlane(int arg0,
                       int arg1,
                       int arg2)
Specified by:
getPlane in interface RawPixelsStore

getPlaneOffset

public long getPlaneOffset(int arg0,
                           int arg1,
                           int arg2)
Specified by:
getPlaneOffset in interface RawPixelsStore

getPlaneSize

public int getPlaneSize()
Description copied from interface: RawPixelsStore
delegates to PixelBuffer

Specified by:
getPlaneSize in interface RawPixelsStore
Returns:
See Also:
PixelBuffer.getPlaneSize()

getRegion

public byte[] getRegion(int arg0,
                        long arg1)
Specified by:
getRegion in interface RawPixelsStore

getRow

public byte[] getRow(int arg0,
                     int arg1,
                     int arg2,
                     int arg3)
Specified by:
getRow in interface RawPixelsStore

getCol

public byte[] getCol(int arg0,
                     int arg1,
                     int arg2,
                     int arg3)
Specified by:
getCol in interface RawPixelsStore

getRowOffset

public long getRowOffset(int arg0,
                         int arg1,
                         int arg2,
                         int arg3)
Specified by:
getRowOffset in interface RawPixelsStore

getRowSize

public int getRowSize()
Specified by:
getRowSize in interface RawPixelsStore

getStack

public byte[] getStack(int arg0,
                       int arg1)
Specified by:
getStack in interface RawPixelsStore

getStackOffset

public long getStackOffset(int arg0,
                           int arg1)
Specified by:
getStackOffset in interface RawPixelsStore

getStackSize

public int getStackSize()
Specified by:
getStackSize in interface RawPixelsStore

getTimepoint

public byte[] getTimepoint(int arg0)
Specified by:
getTimepoint in interface RawPixelsStore

getTimepointOffset

public long getTimepointOffset(int arg0)
Specified by:
getTimepointOffset in interface RawPixelsStore

getTimepointSize

public int getTimepointSize()
Specified by:
getTimepointSize in interface RawPixelsStore

getTotalSize

public int getTotalSize()
Specified by:
getTotalSize in interface RawPixelsStore

getByteWidth

public int getByteWidth()
Specified by:
getByteWidth in interface RawPixelsStore

isSigned

public boolean isSigned()
Specified by:
isSigned in interface RawPixelsStore

isFloat

public boolean isFloat()
Specified by:
isFloat in interface RawPixelsStore

setPlane

public void setPlane(byte[] arg0,
                     int arg1,
                     int arg2,
                     int arg3)
Specified by:
setPlane in interface RawPixelsStore

setRegion

public void setRegion(int arg0,
                      long arg1,
                      byte[] arg2)
Specified by:
setRegion in interface RawPixelsStore

setRow

public void setRow(byte[] arg0,
                   int arg1,
                   int arg2,
                   int arg3,
                   int arg4)
Specified by:
setRow in interface RawPixelsStore

setStack

public void setStack(byte[] arg0,
                     int arg1,
                     int arg2,
                     int arg3)
Specified by:
setStack in interface RawPixelsStore

setTimepoint

public void setTimepoint(byte[] arg0,
                         int arg1)
Specified by:
setTimepoint in interface RawPixelsStore

isDiskSpaceChecking

public boolean isDiskSpaceChecking()

setDiskSpaceChecking

public void setDiskSpaceChecking(boolean diskSpaceChecking)

getResolutionLevels

public int getResolutionLevels()
Specified by:
getResolutionLevels in interface RawPixelsStore

getTileSize

public int[] getTileSize()
Specified by:
getTileSize in interface RawPixelsStore

requiresPixelsPyramid

public boolean requiresPixelsPyramid()
Specified by:
requiresPixelsPyramid in interface RawPixelsStore

getResolutionLevel

public int getResolutionLevel()
Specified by:
getResolutionLevel in interface RawPixelsStore

setResolutionLevel

public void setResolutionLevel(int resolutionLevel)
Specified by:
setResolutionLevel in interface RawPixelsStore

getTile

public byte[] getTile(int z,
                      int c,
                      int t,
                      int x,
                      int y,
                      int w,
                      int h)
Specified by:
getTile in interface RawPixelsStore

setTile

public void setTile(byte[] data,
                    int z,
                    int c,
                    int t,
                    int x,
                    int y,
                    int w,
                    int h)
Specified by:
setTile in interface RawPixelsStore


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

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