| javax.media.jai.iterator.RandomIter
All known Subclasses: com.sun.media.jai.iterator.RandomIterFallback,
RandomIter | public interface RandomIter (Code) | | An iterator that allows random read-only access to any sample
within its bounding rectangle. This flexibility will generally
exact a corresponding price in speed and setup overhead.
The iterator is initialized with a particular rectangle as its
bounds, which it is illegal to exceed. This initialization takes
place in a factory method and is not a part of the iterator
interface itself.
The getSample(), getSampleFloat(), and getSampleDouble()
methods are provided to allow read-only access to the source data.
The getPixel() methods allow retrieval of all bands simultaneously.
An instance of RandomIter may be obtained by means of the
RandomIterFactory.create() method, which returns an opaque
object implementing this interface.
See Also: WritableRandomIter See Also: RandomIterFactory |
Method Summary | |
void | done() Informs the iterator that it may discard its internal data
structures. | int[] | getPixel(int x, int y, int[] iArray) Returns the samples of the specified pixel from the image
in an array of int.
Parameters: x - the X coordinate of the desired pixel. Parameters: y - the Y coordinate of the desired pixel. Parameters: iArray - An optionally preallocated int array. | float[] | getPixel(int x, int y, float[] fArray) Returns the samples of the specified pixel from the image
in an array of float.
Parameters: x - the X coordinate of the desired pixel. Parameters: y - the Y coordinate of the desired pixel. Parameters: fArray - An optionally preallocated float array. | double[] | getPixel(int x, int y, double[] dArray) Returns the samples of the specified pixel from the image
in an array of double.
Parameters: x - the X coordinate of the desired pixel. Parameters: y - the Y coordinate of the desired pixel. Parameters: dArray - An optionally preallocated double array. | 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. |
done | void done()(Code) | | Informs the iterator that it may discard its internal data
structures. This method should be called when the iterator
will no longer be used.
|
getPixel | int[] getPixel(int x, int y, int[] iArray)(Code) | | Returns the samples of the specified pixel from the image
in an array of int.
Parameters: x - the X coordinate of the desired pixel. Parameters: y - the Y coordinate of the desired pixel. Parameters: iArray - An optionally preallocated int array. the contents of the pixel as an int array. |
getPixel | float[] getPixel(int x, int y, float[] fArray)(Code) | | Returns the samples of the specified pixel from the image
in an array of float.
Parameters: x - the X coordinate of the desired pixel. Parameters: y - the Y coordinate of the desired pixel. Parameters: fArray - An optionally preallocated float array. the contents of the pixel as a float array. |
getPixel | double[] getPixel(int x, int y, double[] dArray)(Code) | | Returns the samples of the specified pixel from the image
in an array of double.
Parameters: x - the X coordinate of the desired pixel. Parameters: y - the Y coordinate of the desired pixel. Parameters: dArray - An optionally preallocated double array. the contents of the pixel as a double array. |
getSample | int getSample(int x, int y, int b)(Code) | | Returns the specified sample from the image.
Parameters: x - the X coordinate of the desired pixel. Parameters: y - the Y coordinate of the desired pixel. Parameters: b - the band to retrieve. |
getSampleDouble | double getSampleDouble(int x, int y, int b)(Code) | | Returns the specified sample from the image as a double.
Parameters: x - the X coordinate of the desired pixel. Parameters: y - the Y coordinate of the desired pixel. Parameters: b - the band to retrieve. |
getSampleFloat | float getSampleFloat(int x, int y, int b)(Code) | | Returns the specified sample from the image as a float.
Parameters: x - the X coordinate of the desired pixel. Parameters: y - the Y coordinate of the desired pixel. Parameters: b - the band to retrieve. |
|
|