Lines Matching defs:data

41  *  This class represents pixel data packed such that the N samples which make
42 * up a single pixel are stored in a single data array element, and each data
43 * data array element holds samples for only one pixel.
47 * {@link DataBuffer#TYPE_INT TYPE_INT} data types.
48 * All data array elements reside
50 * that the image data can be manipulated directly. Scanline stride is the
51 * number of data array elements between a given sample and the corresponding
54 * Bit offsets are the offsets in bits into the data array
59 * from DataBuffer <code>data</code>:
61 * int sample = data.getElem(y * scanlineStride + x);
68 /** Bit masks for all bands of the image data. */
71 /** Bit Offsets for all bands of the image data. */
74 /** Bit sizes for all the bands of the image data. */
80 /** Line stride of the region of image data described by this
93 * Each sample is stored in a data array element in the position of
95 * masks must not overlap. Bit masks exceeding data type capacity are
97 * @param dataType The data type for storing samples.
99 * image data described.
101 * image data described.
114 throw new IllegalArgumentException("Unsupported data type "+
121 * and a scanline stride equal to scanlineStride data array elements.
122 * Each sample is stored in a data array element in the position of
124 * masks must not overlap. Bit masks exceeding data type capacity are
126 * @param dataType The data type for storing samples.
128 * image data described.
130 * image data described.
131 * @param scanlineStride The line stride of the image data.
148 throw new IllegalArgumentException("Unsupported data type "+
188 * Returns the number of data elements needed to transfer one pixel
197 * Returns the size of the buffer (in data array elements)
198 * needed for a data buffer that matches this
209 * same storage data type and bit masks as this
226 * SinglePixelPackedSampleModel. The DataBuffer's data type and size
258 /** Returns the offset (in data array elements) of pixel (x,y).
259 * The data element containing pixel <code>x,y</code>
260 * can be retrieved from a DataBuffer <code>data</code> with a
263 * data.getElem(sppsm.getOffset(x, y));
274 /** Returns the bit offsets into the data array element representing
323 * Returns data for a single pixel in a primitive array of type
326 * data type. Generally, obj
328 * automatically and will be of the right primitive data type.
330 * The following code illustrates transferring data for one pixel from
352 * the pixel data.
356 * the pixel data.
357 * @param data The DataBuffer containing the image data.
358 * @return the data for the specified pixel.
361 public Object getDataElements(int x, int y, Object obj, DataBuffer data) {
381 bdata[0] = (byte)data.getElem(y * scanlineStride + x);
395 sdata[0] = (short)data.getElem(y * scanlineStride + x);
409 idata[0] = data.getElem(y * scanlineStride + x);
425 * @param data The DataBuffer containing the image data.
429 public int [] getPixel(int x, int y, int iArray[], DataBuffer data) {
441 int value = data.getElem(y * scanlineStride + x);
458 * @param data The DataBuffer containing the image data.
463 int iArray[], DataBuffer data) {
484 int value = data.getElem(lineOffset+j);
503 * @param data The DataBuffer containing the image data.
508 public int getSample(int x, int y, int b, DataBuffer data) {
514 int sample = data.getElem(y * scanlineStride + x);
529 * @param data The DataBuffer containing the image data.
535 int iArray[], DataBuffer data) {
552 int value = data.getElem(lineOffset+j);
562 * Sets the data for a single pixel in the specified DataBuffer from a
565 * will hold valid data, and the type of the array must be the same as
566 * the storage data type of the SinglePixelPackedSampleModel.
568 * The following code illustrates transferring data for one pixel from
589 * not in bounds, or if obj is not large enough to hold the pixel data.
592 * @param obj A primitive array containing pixel data.
593 * @param data The DataBuffer containing the image data.
596 public void setDataElements(int x, int y, Object obj, DataBuffer data) {
609 data.setElem(y*scanlineStride+x, ((int)barray[0])&0xff);
615 data.setElem(y*scanlineStride+x, ((int)sarray[0])&0xffff);
621 data.setElem(y*scanlineStride+x, iarray[0]);
633 * @param data The DataBuffer containing the image data.
638 DataBuffer data) {
644 int value = data.getElem(lineOffset);
649 data.setElem(lineOffset, value);
662 * @param data The DataBuffer containing the image data.
666 int iArray[], DataBuffer data) {
682 int value = data.getElem(lineOffset+j);
689 data.setElem(lineOffset+j, value);
704 * @param data The DataBuffer containing the image data.
708 DataBuffer data) {
714 int value = data.getElem(y*scanlineStride + x);
717 data.setElem(y*scanlineStride + x,value);
731 * @param data The DataBuffer containing the image data.
735 int iArray[], DataBuffer data) {
746 int value = data.getElem(lineOffset+j);
750 data.setElem(lineOffset+j,value);