|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An iterator that allows random read/write 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 setSample() and setPixel() methods allow individual source samples and whole pixels to be written.
An instance of RandomIter may be obtained by means of the RandomIterFactory.createWritable() method, which returns an opaque object implementing this interface.
RandomIter
,
RandomIterFactory
Method Summary | |
void |
setPixel(int x,
int y,
double[] dArray)
Sets a pixel in the image using a float array of samples for input. |
void |
setPixel(int x,
int y,
float[] fArray)
Sets a pixel in the image using a float array of samples for input. |
void |
setPixel(int x,
int y,
int[] iArray)
Sets a pixel in the image using an int array of samples for input. |
void |
setSample(int x,
int y,
int b,
double s)
Sets the specified sample of the image to a double value. |
void |
setSample(int x,
int y,
int b,
float s)
Sets the specified sample of the image to a float value. |
void |
setSample(int x,
int y,
int b,
int s)
Sets the specified sample of the image to an integral value. |
Methods inherited from interface javax.media.jai.iterator.RandomIter |
done, getPixel, getPixel, getPixel, getSample, getSampleDouble, getSampleFloat |
Method Detail |
public void setSample(int x, int y, int b, int s)
x
- the X coordinate of the pixel.y
- the Y coordinate of the pixel.b
- the band to be set.s
- the sample's new integral value.public void setSample(int x, int y, int b, float s)
x
- the X coordinate of the pixel.y
- the Y coordinate of the pixel.b
- the band to be set.s
- the sample's new float value.public void setSample(int x, int y, int b, double s)
x
- the X coordinate of the pixel.y
- the Y coordinate of the pixel.b
- the band to be set.s
- the sample's new double value.public void setPixel(int x, int y, int[] iArray)
x
- the X coordinate of the pixel.y
- the Y coordinate of the pixel.iArray
- the input samples in an int array.public void setPixel(int x, int y, float[] fArray)
x
- the X coordinate of the pixel.y
- the Y coordinate of the pixel.iArray
- the input samples in a float array.public void setPixel(int x, int y, double[] dArray)
x
- the X coordinate of the pixel.y
- the Y coordinate of the pixel.dArray
- the input samples in a double array.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |