Package ome.io.nio

Class Utils


  • public class Utils
    extends java.lang.Object
    General utility methods for working with ROMIO classes.
    Since:
    OMERO Beta-4.3.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Utils.FailedTileLoopException
      The processing of a tile failed so abort the loop.
    • Constructor Summary

      Constructors 
      Constructor Description
      Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int forEachTile​(TileLoopIteration iteration, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT, int tileWidth, int tileHeight)
      Iterates over every tile in a given pixel buffer based on the over arching dimensions and a requested maximum tile width and height.
      static int forEachTile​(TileLoopIteration iteration, PixelBuffer pixelBuffer, int tileWidth, int tileHeight)
      Iterates over every tile in a given pixel buffer based on the over arching dimensions and a requested maximum tile width and height.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • forEachTile

        public static int forEachTile​(TileLoopIteration iteration,
                                      PixelBuffer pixelBuffer,
                                      int tileWidth,
                                      int tileHeight)
                               throws Utils.FailedTileLoopException
        Iterates over every tile in a given pixel buffer based on the over arching dimensions and a requested maximum tile width and height.
        Parameters:
        iteration - Invoker to call for each tile.
        pixelBuffer - Pixel buffer which is backing the pixel data.
        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:
        Utils.FailedTileLoopException - if the tile loop was aborted; exception bears completed tile count
      • forEachTile

        public static int forEachTile​(TileLoopIteration iteration,
                                      int sizeX,
                                      int sizeY,
                                      int sizeZ,
                                      int sizeC,
                                      int sizeT,
                                      int tileWidth,
                                      int tileHeight)
                               throws Utils.FailedTileLoopException
        Iterates over every tile in a given pixel buffer 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 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:
        Utils.FailedTileLoopException - if the tile loop was aborted; exception bears completed tile count