omero.util
Class RPSTileLoop

java.lang.Object
  extended by omero.util.TileLoop
      extended by omero.util.RPSTileLoop

public class RPSTileLoop
extends TileLoop

Helper subclass of TileLoop which handles unloaded Pixels instances and manages the creation of the RPSTileData.

Since:
4.3.0
Author:
Josh Moore, josh at glencoesoftware.com

Field Summary
protected  omero.model.Pixels pixels
          Instance will be replaced on RawPixelsStorePrx.save()
protected  omero.api.ServiceFactoryPrx session
           
 
Constructor Summary
RPSTileLoop(omero.api.ServiceFactoryPrx session, omero.model.Pixels pixels)
           
 
Method Summary
 TileData createData()
          Subclasses must provide a fresh instance of TileData.
 int forEachTile(int tileWidth, int tileHeight, TileLoopIteration iteration)
          Iterates over every tile in a given pixel based on the over arching dimensions and a requested maximum tile width and height.
 omero.model.Pixels getPixels()
          After saving the binary data, the update event of the Pixels instance will be updated and therefore need to be reloaded.
protected  omero.api.ServiceFactoryPrx getSession()
           
 void setPixels(omero.model.Pixels pixels)
          Called by the TileData implementation to update the pixels instance for re-use by the client.
 
Methods inherited from class omero.util.TileLoop
forEachTile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

protected final omero.api.ServiceFactoryPrx session

pixels

protected volatile omero.model.Pixels pixels
Instance will be replaced on RawPixelsStorePrx.save()

Constructor Detail

RPSTileLoop

public RPSTileLoop(omero.api.ServiceFactoryPrx session,
                   omero.model.Pixels pixels)
Method Detail

getSession

protected omero.api.ServiceFactoryPrx getSession()

getPixels

public omero.model.Pixels getPixels()
After saving the binary data, the update event of the Pixels instance will be updated and therefore need to be reloaded. As a convenience the returned value is accessible here.


setPixels

public void setPixels(omero.model.Pixels pixels)
Called by the TileData implementation to update the pixels instance for re-use by the client.


createData

public TileData createData()
Description copied from class: TileLoop
Subclasses must provide a fresh instance of TileData. The instance will be closed after the run of forEachTile.

Specified by:
createData in class TileLoop

forEachTile

public int forEachTile(int tileWidth,
                       int tileHeight,
                       TileLoopIteration iteration)
                throws ClientError,
                       omero.ServerError
Iterates over every tile in a given pixel based on the over arching dimensions and a requested maximum tile width and height.

Parameters:
iteration - Invoker to call for each tile.
pixel - Pixel instance
tileWidth - Maximum width of the tile requested. The tile request itself will be smaller than the original tile width requested if x + tileWidth > sizeX.
tileHeight - Maximum height of the tile requested. The tile request itself will be smaller if y + tileHeight > sizeY.
Returns:
The total number of tiles iterated over.
Throws:
ClientError
omero.ServerError


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

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