| java.lang.Object javax.media.jai.UnpackedImageData
UnpackedImageData | final public class UnpackedImageData (Code) | | 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.
since: JAI 1.1 |
Field Summary | |
final public int[] | bandOffsets The number of array elements from the beginning of the data array
to the first pixel of the Rectangle for all bands. | final public boolean | convertToDest Indicates whether the PixelAccessor can and must set the
data back into the Raster . | final public Object | data The data array supplied to store the unpacked data. | final public int | lineStride The number of array elements per scanline. | final public int | pixelStride The number of array elements to skip to get to the next
pixel on the same scanline. | final public Raster | raster The Raster containing the pixel data. | final public Rectangle | rect The rectangular region within the Raster where the
data are to be accessed. | final public int | type The type of the primitive array used to store the data. |
Constructor Summary | |
public | UnpackedImageData(Raster raster, Rectangle rect, int type, Object data, int pixelStride, int lineStride, int[] bandOffsets, boolean convertToDest) Constructs a PackedImageRaster.
Parameters: raster - The Raster containing the pixel data. Parameters: rect - The rectangular region containing the data. Parameters: type - The type of the primitive array supplied to store the data. Parameters: data - The data array supplied to store the data. Parameters: pixelStride - The data array increment needed to move from band xof pixel i to band x of pixel i+1 on the same scanline. Parameters: lineStride - The data array increment to move from the pixel xof line i to pixel x of line i+1. Parameters: bandOffsets - The number of bytes from the start of the data arrayto the location of the first pixel of the rectanglefor all bands. Parameters: convertToDest - A boolean indicating whether the data can andmust be set back into the Raster . |
Method Summary | |
public byte[][] | getByteData() Returns the two-dimensional byte data array, or null
if the data are not stored in a byte array. | public byte[] | getByteData(int b) Returns byte data array for a specific band, or null
if the data are not stored in a byte array.
Parameters: b - The band whose data array is to be retrieved. | public double[][] | getDoubleData() Returns the two-dimensional double data array, or null
if the data are not stored in a double array. | public double[] | getDoubleData(int b) Returns double data array for a specific band, or null
if the data are not stored in a double array.
Parameters: b - The band whose data array is to be retrieved. | public float[][] | getFloatData() Returns the two-dimensional float data array, or null
if the data are not stored in a float array. | public float[] | getFloatData(int b) Returns float data array for a specific band, or null
if the data are not stored in a float array.
Parameters: b - The band whose data array is to be retrieved. | public int[][] | getIntData() Returns the two-dimensional integer data array, or null
if the data are not stored in an integer array. | public int[] | getIntData(int b) Returns integer data array for a specific band, or null
if the data are not stored in an integer array.
Parameters: b - The band whose data array is to be retrieved. | public int | getMaxOffset() Returns the maximum offset of all bands. | public int | getMinOffset() Returns the minimum offset of all bands. | public int | getOffset(int b) Returns the offset for a band.
Parameters: b - The band whose offset is to be returned. | public short[][] | getShortData() Returns the two-dimensional short data array, or null
if the data are not stored in a short array. | public short[] | getShortData(int b) Returns short data array for a specific band, or null
if the data are not stored in a short array.
Parameters: b - The band whose data array is to be retrieved. |
bandOffsets | final public int[] bandOffsets(Code) | | The number of array elements from the beginning of the data array
to the first pixel of the Rectangle for all bands.
|
convertToDest | final public boolean convertToDest(Code) | | Indicates whether the 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.
|
data | final public Object data(Code) | | The data array supplied to store the unpacked data.
|
lineStride | final public int lineStride(Code) | | The number of array elements per scanline.
|
pixelStride | final public int pixelStride(Code) | | The number of array elements to skip to get to the next
pixel on the same scanline.
|
raster | final public Raster raster(Code) | | The Raster containing the pixel data.
|
rect | final public Rectangle rect(Code) | | The rectangular region within the Raster where the
data are to be accessed.
|
type | final public int type(Code) | | The type of the primitive array used to store the data.
|
UnpackedImageData | public UnpackedImageData(Raster raster, Rectangle rect, int type, Object data, int pixelStride, int lineStride, int[] bandOffsets, boolean convertToDest)(Code) | | Constructs a PackedImageRaster.
Parameters: raster - The Raster containing the pixel data. Parameters: rect - The rectangular region containing the data. Parameters: type - The type of the primitive array supplied to store the data. Parameters: data - The data array supplied to store the data. Parameters: pixelStride - The data array increment needed to move from band xof pixel i to band x of pixel i+1 on the same scanline. Parameters: lineStride - The data array increment to move from the pixel xof line i to pixel x of line i+1. Parameters: bandOffsets - The number of bytes from the start of the data arrayto the location of the first pixel of the rectanglefor all bands. Parameters: convertToDest - A boolean indicating whether the data can andmust be set back into the Raster . This appliesonly to destinations. |
getByteData | public byte[][] getByteData()(Code) | | Returns the two-dimensional byte data array, or 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.
The two-dimensional byte data array. |
getByteData | public byte[] getByteData(int b)(Code) | | Returns byte data array for a specific band, or null
if the data are not stored in a byte array.
Parameters: b - The band whose data array is to be retrieved. The one-dimensional byte data array for the requested band. |
getDoubleData | public double[][] getDoubleData()(Code) | | Returns the two-dimensional double data array, or 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.
The two-dimensional double data array. |
getDoubleData | public double[] getDoubleData(int b)(Code) | | Returns double data array for a specific band, or null
if the data are not stored in a double array.
Parameters: b - The band whose data array is to be retrieved. The one-dimensional double data array for the requested band. |
getFloatData | public float[][] getFloatData()(Code) | | Returns the two-dimensional float data array, or 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.
The two-dimensional float data array. |
getFloatData | public float[] getFloatData(int b)(Code) | | Returns float data array for a specific band, or null
if the data are not stored in a float array.
Parameters: b - The band whose data array is to be retrieved. The one-dimensional float data array for the requested band. |
getIntData | public int[][] getIntData()(Code) | | Returns the two-dimensional integer data array, or 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.
The two-dimensional int data array. |
getIntData | public int[] getIntData(int b)(Code) | | Returns integer data array for a specific band, or null
if the data are not stored in an integer array.
Parameters: b - The band whose data array is to be retrieved. The one-dimensional int data array for the requested band. |
getMaxOffset | public int getMaxOffset()(Code) | | Returns the maximum offset of all bands.
The maximum offset of all the bands. |
getMinOffset | public int getMinOffset()(Code) | | Returns the minimum offset of all bands.
The minimum offset of all bands. |
getOffset | public int getOffset(int b)(Code) | | Returns the offset for a band.
Parameters: b - The band whose offset is to be returned. The offset of the requested band. |
getShortData | public short[][] getShortData()(Code) | | Returns the two-dimensional short data array, or 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.
The two-dimensional short data array. |
getShortData | public short[] getShortData(int b)(Code) | | Returns short data array for a specific band, or null
if the data are not stored in a short array.
Parameters: b - The band whose data array is to be retrieved. The one-dimensional short data array for the requested band. |
|
|