omero.util.tiles module

class util.tiles.RPSTileData(loop, rps)[source]

Bases: TileData

close()[source]
getTile(z, c, t, x, y, w, h)[source]
Parameters:
  • z – int

  • c – int

  • t – int

  • y – int

  • w – int

  • h – int

Returns:

byte[]

setTile(buffer, z, c, t, x, y, w, h)[source]

buffer: byte[] :param z: int :param c: int :param t: int :param y: int :param w: int :param h: int

class util.tiles.RPSTileLoop(session, pixels)[source]

Bases: TileLoop

createData()[source]

Subclasses must provide a fresh instance of {@link TileData}. The instance will be closed after the run of forEachTile.

Returns:

TileData

forEachTile(tileWidth, tileHeight, iteration)[source]

Iterates over every tile in a given Pixels object based on the over arching dimensions and a requested maximum tile width and height. :param tileWidth: <b>Maximum</b> width of the tile requested. The tile request itself will be smaller than the original tile width requested if <code>x + tileWidth > sizeX</code>. :param tileHeight: <b>Maximum</b> height of the tile requested. The tile request itself will be smaller if <code>y + tileHeight > sizeY</code>. :param iteration: Invoker to call for each tile. @return The total number of tiles iterated over.

getPixels()[source]

After saving the binary data, the update event of the {@link Pixels} instance will be updated and therefore need to be reloaded. As a convenience the returned value is accessible here.

getSession()[source]
setPixels(pixels)[source]

Used by RPSTileData to set a reloaded Pixels instance for client use.

class util.tiles.TileData[source]

Bases: object

“Interface” which must be returned by concrete TileLoop implementations.

close()[source]
getTile(z, c, t, x, y, w, h)[source]
Parameters:
  • z – int

  • c – int

  • t – int

  • y – int

  • w – int

  • h – int

Returns:

byte[]

setTile(buffer, z, c, t, x, y, w, h)[source]

buffer: byte[] :param z: int :param c: int :param t: int :param y: int :param w: int :param h: int

class util.tiles.TileLoop[source]

Bases: object

createData()[source]

Subclasses must provide a fresh instance of {@link TileData}. The instance will be closed after the run of forEachTile.

Returns:

TileData

forEachTile(sizeX, sizeY, sizeZ, sizeC, sizeT, tileWidth, tileHeight, iteration)[source]

Iterates over every tile in a given Pixels object based on the over arching dimensions and a requested maximum tile width and height. :param sizeX: int :param sizeY: int :param sizeZ: int :param sizeC: int :param sizeT: int :param iteration: Invoker to call for each tile. :param pixel: Pixel instance :param tileWidth: <b>Maximum</b> width of the tile requested. The tile request itself will be smaller than the original tile width requested if <code>x + tileWidth > sizeX</code>. :param tileHeight: <b>Maximum</b> height of the tile requested. The tile request itself will be smaller if <code>y + tileHeight > sizeY</code>. :returns: The total number of tiles iterated over.

class util.tiles.TileLoopIteration[source]

Bases: object

“Interface” which must be passed to forEachTile

run(rps, z, c, t, x, y, tileWidth, tileHeight, tileCount)[source]