Class GridIndexer2D.MirrorImageIndexer

java.lang.Object
imagingbook.common.image.GridIndexer2D
imagingbook.common.image.GridIndexer2D.MirrorImageIndexer
All Implemented Interfaces:
Cloneable
Enclosing class:
GridIndexer2D

This indexer returns mirrored image values for coordinates outside the image bounds. There is no public constructor. To instantiate use method GridIndexer2D.create(int, int, OutOfBoundsStrategy) with OutOfBoundsStrategy.MirrorImage.
  • Method Details

    • getIndex

      public int getIndex(int u, int v)
      Description copied from class: GridIndexer2D
      Returns the 1D array index for a given pair of image coordinates. For u, v coordinates outside the image, the returned index depends on the concrete sub-class of GridIndexer2D. As a general rule, this method either returns a valid 1D array index or throws an exception. Subclasses implement (override) this method.
      Specified by:
      getIndex in class GridIndexer2D
      Parameters:
      u - x-coordinate
      v - y-coordinate
      Returns:
      1D array index