Package omero.util
Class RPSTileLoop
- java.lang.Object
-
- omero.util.TileLoop
-
- omero.util.RPSTileLoop
-
public class RPSTileLoop extends TileLoop
Helper subclass ofTileLoopwhich handles unloadedPixelsinstances and manages the creation of theRPSTileData.- Since:
- 4.3.0
-
-
Field Summary
Fields Modifier and Type Field Description protected PixelspixelsInstance will be replaced onRawPixelsStorePrx.save()protected ServiceFactoryPrxsession
-
Constructor Summary
Constructors Constructor Description RPSTileLoop(ServiceFactoryPrx session, Pixels pixels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TileDatacreateData()Subclasses must provide a fresh instance ofTileData.intforEachTile(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.PixelsgetPixels()After saving the binary data, the update event of thePixelsinstance will be updated and therefore need to be reloaded.protected ServiceFactoryPrxgetSession()voidsetPixels(Pixels pixels)-
Methods inherited from class omero.util.TileLoop
forEachTile
-
-
-
-
Field Detail
-
session
protected final ServiceFactoryPrx session
-
pixels
protected volatile Pixels pixels
Instance will be replaced onRawPixelsStorePrx.save()
-
-
Constructor Detail
-
RPSTileLoop
public RPSTileLoop(ServiceFactoryPrx session, Pixels pixels)
-
-
Method Detail
-
getSession
protected ServiceFactoryPrx getSession()
-
getPixels
public Pixels getPixels()
After saving the binary data, the update event of thePixelsinstance will be updated and therefore need to be reloaded. As a convenience the returned value is accessible here.
-
setPixels
public void setPixels(Pixels pixels)
-
createData
public TileData createData()
Description copied from class:TileLoopSubclasses must provide a fresh instance ofTileData. The instance will be closed after the run ofTileLoop.forEachTile(int, int, int, int, int, int, int, TileLoopIteration).- Specified by:
createDatain classTileLoop- Returns:
- the new instance
-
forEachTile
public int forEachTile(int tileWidth, int tileHeight, TileLoopIteration iteration) throws ClientError, ServerErrorIterates 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.tileWidth- Maximum width of the tile requested. The tile request itself will be smaller than the original tile width requested ifx + tileWidth > sizeXtileHeight- Maximum height of the tile requested. The tile request itself will be smaller ify + tileHeight > sizeY.- Returns:
- The total number of tiles iterated over.
- Throws:
ClientErrorServerError
-
-