|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.UnpackedImageData
This class is used by PixelAccessor
to store unpacked
image data and the information needed to access it. The data are stored in
a two-dimensional primitive array.
Field Summary | |
int[] |
bandOffsets
The number of array elements from the beginning of the data array to the first pixel of the Rectangle for all bands. |
boolean |
convertToDest
Indicates whether the PixelAccessor can and must set the
data back into the Raster . |
Object |
data
The data array supplied to store the unpacked data. |
int |
lineStride
The number of array elements per scanline. |
int |
pixelStride
The number of array elements to skip to get to the next pixel on the same scanline. |
Raster |
raster
The Raster containing the pixel data. |
Rectangle |
rect
The rectangular region within the Raster where the
data are to be accessed. |
int |
type
The type of the primitive array used to store the data. |
Constructor Summary | |
UnpackedImageData(Raster raster,
Rectangle rect,
int type,
Object data,
int pixelStride,
int lineStride,
int[] bandOffsets,
boolean convertToDest)
Constructs a PackedImageRaster. |
Method Summary | |
byte[][] |
getByteData()
Returns the two-dimensional byte data array, or null
if the data are not stored in a byte array. |
byte[] |
getByteData(int b)
Returns byte data array for a specific band, or null
if the data are not stored in a byte array. |
double[][] |
getDoubleData()
Returns the two-dimensional double data array, or null
if the data are not stored in a double array. |
double[] |
getDoubleData(int b)
Returns double data array for a specific band, or null
if the data are not stored in a double array. |
float[][] |
getFloatData()
Returns the two-dimensional float data array, or null
if the data are not stored in a float array. |
float[] |
getFloatData(int b)
Returns float data array for a specific band, or null
if the data are not stored in a float array. |
int[][] |
getIntData()
Returns the two-dimensional integer data array, or null
if the data are not stored in an integer array. |
int[] |
getIntData(int b)
Returns integer data array for a specific band, or null
if the data are not stored in an integer array. |
int |
getMaxOffset()
Returns the maximum offset of all bands. |
int |
getMinOffset()
Returns the minimum offset of all bands. |
int |
getOffset(int b)
Returns the offset for a band. |
short[][] |
getShortData()
Returns the two-dimensional short data array, or null
if the data are not stored in a short array. |
short[] |
getShortData(int b)
Returns short data array for a specific band, or null
if the data are not stored in a short array. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public final Raster raster
Raster
containing the pixel data.public final Rectangle rect
Raster
where the
data are to be accessed.public final int type
public final Object data
public final int pixelStride
public final int lineStride
public final int[] bandOffsets
Rectangle
for all bands.public final boolean convertToDest
PixelAccessor
can and must set the
data back into the Raster
. If the data does not need
to be copied back to the Raster
, this variable should be
set to false
. Only destinations can be set.Constructor Detail |
public UnpackedImageData(Raster raster, Rectangle rect, int type, Object data, int pixelStride, int lineStride, int[] bandOffsets, boolean convertToDest)
raster
- The Raster
containing the pixel data.rect
- The rectangular region containing the data.type
- The type of the primitive array supplied to store the data.data
- The data array supplied to store the data.pixelStride
- The data array increment needed to move from band x
of pixel i to band x of pixel i+1 on the same
scanline.lineStride
- The data array increment to move from the pixel x
of line i to pixel x of line i+1.bandOffsets
- The number of bytes from the start of the data array
to the location of the first pixel of the rectangle
for all bands.convertToDest
- A boolean
indicating whether the data can and
must be set back into the Raster
. This applies
only to destinations.Method Detail |
public byte[][] getByteData()
null
if the data are not stored in a byte array.
The array format is data[band][]
where the second
index is navigated using the pixel and line strides.public byte[] getByteData(int b)
null
if the data are not stored in a byte array.b
- The band whose data array is to be retrieved.public short[][] getShortData()
null
if the data are not stored in a short array.
The array format is data[band][]
where the second
index is navigated using the pixel and line strides.public short[] getShortData(int b)
null
if the data are not stored in a short array.b
- The band whose data array is to be retrieved.public int[][] getIntData()
null
if the data are not stored in an integer array.
The array format is data[band][]
where the second
index is navigated using the pixel and line strides.public int[] getIntData(int b)
null
if the data are not stored in an integer array.b
- The band whose data array is to be retrieved.public float[][] getFloatData()
null
if the data are not stored in a float array.
The array format is data[band][]
where the second
index is navigated using the pixel and line strides.public float[] getFloatData(int b)
null
if the data are not stored in a float array.b
- The band whose data array is to be retrieved.public double[][] getDoubleData()
null
if the data are not stored in a double array.
The array format is data[band][]
where the second
index is navigated using the pixel and line strides.public double[] getDoubleData(int b)
null
if the data are not stored in a double array.b
- The band whose data array is to be retrieved.public int getOffset(int b)
b
- The band whose offset is to be returned.public int getMinOffset()
public int getMaxOffset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |