Package omero.util
Class RPSTileLoop
- java.lang.Object
-
- omero.util.TileLoop
-
- omero.util.RPSTileLoop
-
public class RPSTileLoop extends TileLoop
Helper subclass ofTileLoop
which handles unloadedPixels
instances and manages the creation of theRPSTileData
.- Since:
- 4.3.0
-
-
Field Summary
Fields Modifier and Type Field Description protected Pixels
pixels
Instance will be replaced onRawPixelsStorePrx.save()
protected ServiceFactoryPrx
session
-
Constructor Summary
Constructors Constructor Description RPSTileLoop(ServiceFactoryPrx session, Pixels pixels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TileData
createData()
Subclasses must provide a fresh instance ofTileData
.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.Pixels
getPixels()
After saving the binary data, the update event of thePixels
instance will be updated and therefore need to be reloaded.protected ServiceFactoryPrx
getSession()
void
setPixels(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 thePixels
instance 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:TileLoop
Subclasses 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:
createData
in classTileLoop
- Returns:
- the new instance
-
forEachTile
public int forEachTile(int tileWidth, int tileHeight, TileLoopIteration iteration) throws ClientError, 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.tileWidth
- Maximum width of the tile requested. The tile request itself will be smaller than the original tile width requested ifx + tileWidth > sizeX
tileHeight
- 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:
ClientError
ServerError
-
-