Class RandomIterFallbackNoCacheNoArray

Object
RandomIterFallbackNoCacheNoArray
All Implemented Interfaces:
RandomIter

public class RandomIterFallbackNoCacheNoArray extends Object implements RandomIter
Modified version of ImageN RandomIterFallbackIntNoCache that doesn't stores the tile positions in an array. The current tile is not cached but it is calculated every time.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Informs the iterator that it may discard its internal data structures.
    double[]
    getPixel(int x, int y, double[] dArray)
    Returns the samples of the specified pixel from the image in an array of double.
    float[]
    getPixel(int x, int y, float[] fArray)
    Returns the samples of the specified pixel from the image in an array of float.
    int[]
    getPixel(int x, int y, int[] iArray)
    Returns the samples of the specified pixel from the image in an array of int.
    int
    getSample(int x, int y, int b)
    Returns the specified sample from the image.
    double
    getSampleDouble(int x, int y, int b)
    Returns the specified sample from the image as a double.
    float
    getSampleFloat(int x, int y, int b)
    Returns the specified sample from the image as a float.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RandomIterFallbackNoCacheNoArray

      public RandomIterFallbackNoCacheNoArray(RenderedImage im, Rectangle bounds)
  • Method Details

    • getSample

      public int getSample(int x, int y, int b)
      Description copied from interface: RandomIter
      Returns the specified sample from the image.
      Specified by:
      getSample in interface RandomIter
      Parameters:
      x - the X coordinate of the desired pixel.
      y - the Y coordinate of the desired pixel.
      b - the band to retrieve.
    • getSampleFloat

      public float getSampleFloat(int x, int y, int b)
      Description copied from interface: RandomIter
      Returns the specified sample from the image as a float.
      Specified by:
      getSampleFloat in interface RandomIter
      Parameters:
      x - the X coordinate of the desired pixel.
      y - the Y coordinate of the desired pixel.
      b - the band to retrieve.
    • getSampleDouble

      public double getSampleDouble(int x, int y, int b)
      Description copied from interface: RandomIter
      Returns the specified sample from the image as a double.
      Specified by:
      getSampleDouble in interface RandomIter
      Parameters:
      x - the X coordinate of the desired pixel.
      y - the Y coordinate of the desired pixel.
      b - the band to retrieve.
    • getPixel

      public int[] getPixel(int x, int y, int[] iArray)
      Description copied from interface: RandomIter
      Returns the samples of the specified pixel from the image in an array of int.
      Specified by:
      getPixel in interface RandomIter
      Parameters:
      x - the X coordinate of the desired pixel.
      y - the Y coordinate of the desired pixel.
      iArray - An optionally preallocated int array.
      Returns:
      the contents of the pixel as an int array.
    • getPixel

      public float[] getPixel(int x, int y, float[] fArray)
      Description copied from interface: RandomIter
      Returns the samples of the specified pixel from the image in an array of float.
      Specified by:
      getPixel in interface RandomIter
      Parameters:
      x - the X coordinate of the desired pixel.
      y - the Y coordinate of the desired pixel.
      fArray - An optionally preallocated float array.
      Returns:
      the contents of the pixel as a float array.
    • getPixel

      public double[] getPixel(int x, int y, double[] dArray)
      Description copied from interface: RandomIter
      Returns the samples of the specified pixel from the image in an array of double.
      Specified by:
      getPixel in interface RandomIter
      Parameters:
      x - the X coordinate of the desired pixel.
      y - the Y coordinate of the desired pixel.
      dArray - An optionally preallocated double array.
      Returns:
      the contents of the pixel as a double array.
    • done

      public void done()
      Description copied from interface: RandomIter
      Informs the iterator that it may discard its internal data structures. This method should be called when the iterator will no longer be used.
      Specified by:
      done in interface RandomIter