Class RandomIterFallbackShortNoCache
Object
RandomIterFallbackShortNoCache
- All Implemented Interfaces:
RandomIter
Modified version of ImageN
RandomIterFallbackByte that stores the tile positions in a short array with less
memory usage. The current tile is not cached but it is calculated every time.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddone()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.intgetSample(int x, int y, int b) Returns the specified sample from the image.doublegetSampleDouble(int x, int y, int b) Returns the specified sample from the image as a double.floatgetSampleFloat(int x, int y, int b) Returns the specified sample from the image as a float.
-
Constructor Details
-
RandomIterFallbackShortNoCache
-
-
Method Details
-
getSample
public int getSample(int x, int y, int b) Description copied from interface:RandomIterReturns the specified sample from the image.- Specified by:
getSamplein interfaceRandomIter- 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:RandomIterReturns the specified sample from the image as a float.- Specified by:
getSampleFloatin interfaceRandomIter- 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:RandomIterReturns the specified sample from the image as a double.- Specified by:
getSampleDoublein interfaceRandomIter- 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:RandomIterReturns the samples of the specified pixel from the image in an array of int.- Specified by:
getPixelin interfaceRandomIter- 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:RandomIterReturns the samples of the specified pixel from the image in an array of float.- Specified by:
getPixelin interfaceRandomIter- 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:RandomIterReturns the samples of the specified pixel from the image in an array of double.- Specified by:
getPixelin interfaceRandomIter- 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:RandomIterInforms 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:
donein interfaceRandomIter
-