303 * if the pixel coordinate is out of bounds. |
303 * if the pixel coordinate is out of bounds. |
304 * A ClassCastException will be thrown if the input object is non null |
304 * A ClassCastException will be thrown if the input object is non null |
305 * and references anything other than an array of transferType. |
305 * and references anything other than an array of transferType. |
306 * @param x The X coordinate of the pixel location. |
306 * @param x The X coordinate of the pixel location. |
307 * @param y The Y coordinate of the pixel location. |
307 * @param y The Y coordinate of the pixel location. |
308 * @param outData An object reference to an array of type defined by |
308 * @param obj An object reference to an array of type defined by |
309 * getTransferType() and length getNumDataElements(). |
309 * getTransferType() and length getNumDataElements(). |
310 * If null an array of appropriate type and size will be |
310 * If null an array of appropriate type and size will be |
311 * allocated. |
311 * allocated. |
312 * @return An object reference to an array of type defined by |
312 * @return An object reference to an array of type defined by |
313 * getTransferType() with the request pixel data. |
313 * getTransferType() with the request pixel data. |
349 * System.arraycopy(bandData, ((y2-y)*w + (x2-x))*numDataElements, |
349 * System.arraycopy(bandData, ((y2-y)*w + (x2-x))*numDataElements, |
350 * pixel, 0, numDataElements); |
350 * pixel, 0, numDataElements); |
351 * </pre> |
351 * </pre> |
352 * @param x The X coordinate of the upper left pixel location. |
352 * @param x The X coordinate of the upper left pixel location. |
353 * @param y The Y coordinate of the upper left pixel location. |
353 * @param y The Y coordinate of the upper left pixel location. |
354 * @param width Width of the pixel rectangle. |
354 * @param w Width of the pixel rectangle. |
355 * @param height Height of the pixel rectangle. |
355 * @param h Height of the pixel rectangle. |
356 * @param outData An object reference to an array of type defined by |
356 * @param obj An object reference to an array of type defined by |
357 * getTransferType() and length w*h*getNumDataElements(). |
357 * getTransferType() and length w*h*getNumDataElements(). |
358 * If null an array of appropriate type and size will be |
358 * If null an array of appropriate type and size will be |
359 * allocated. |
359 * allocated. |
360 * @return An object reference to an array of type defined by |
360 * @return An object reference to an array of type defined by |
361 * getTransferType() with the request pixel data. |
361 * getTransferType() with the request pixel data. |
374 * // To find the data element at location (x2, y2) |
374 * // To find the data element at location (x2, y2) |
375 * byte bandElement = bandData[((y2-y)*w + (x2-x))]; |
375 * byte bandElement = bandData[((y2-y)*w + (x2-x))]; |
376 * </pre> |
376 * </pre> |
377 * @param x The X coordinate of the upper left pixel location. |
377 * @param x The X coordinate of the upper left pixel location. |
378 * @param y The Y coordinate of the upper left pixel location. |
378 * @param y The Y coordinate of the upper left pixel location. |
379 * @param width Width of the pixel rectangle. |
379 * @param w Width of the pixel rectangle. |
380 * @param height Height of the pixel rectangle. |
380 * @param h Height of the pixel rectangle. |
381 * @param band The band to return. |
381 * @param band The band to return. |
382 * @param outData If non-null, data elements for all bands |
382 * @param outData If non-null, data elements for all bands |
383 * at the specified location are returned in this array. |
383 * at the specified location are returned in this array. |
384 * @return Data array with data elements for all bands. |
384 * @return Data array with data elements for all bands. |
385 */ |
385 */ |
435 * System.arraycopy(bandData, ((y2-y)*w + (x2-x))*numDataElements, |
435 * System.arraycopy(bandData, ((y2-y)*w + (x2-x))*numDataElements, |
436 * pixel, 0, numDataElements); |
436 * pixel, 0, numDataElements); |
437 * </pre> |
437 * </pre> |
438 * @param x The X coordinate of the upper left pixel location. |
438 * @param x The X coordinate of the upper left pixel location. |
439 * @param y The Y coordinate of the upper left pixel location. |
439 * @param y The Y coordinate of the upper left pixel location. |
440 * @param width Width of the pixel rectangle. |
440 * @param w Width of the pixel rectangle. |
441 * @param height Height of the pixel rectangle. |
441 * @param h Height of the pixel rectangle. |
442 * @param outData If non-null, data elements for all bands |
442 * @param outData If non-null, data elements for all bands |
443 * at the specified location are returned in this array. |
443 * at the specified location are returned in this array. |
444 * @return Data array with data elements for all bands. |
444 * @return Data array with data elements for all bands. |
445 */ |
445 */ |
446 public byte[] getByteData(int x, int y, int w, int h, byte[] outData) { |
446 public byte[] getByteData(int x, int y, int w, int h, byte[] outData) { |
534 * if the pixel coordinate is out of bounds. |
534 * if the pixel coordinate is out of bounds. |
535 * A ClassCastException will be thrown if the input object is non null |
535 * A ClassCastException will be thrown if the input object is non null |
536 * and references anything other than an array of transferType. |
536 * and references anything other than an array of transferType. |
537 * @param x The X coordinate of the pixel location. |
537 * @param x The X coordinate of the pixel location. |
538 * @param y The Y coordinate of the pixel location. |
538 * @param y The Y coordinate of the pixel location. |
539 * @param inData An object reference to an array of type defined by |
539 * @param obj An object reference to an array of type defined by |
540 * getTransferType() and length getNumDataElements() |
540 * getTransferType() and length getNumDataElements() |
541 * containing the pixel data to place at x,y. |
541 * containing the pixel data to place at x,y. |
542 */ |
542 */ |
543 public void setDataElements(int x, int y, Object obj) { |
543 public void setDataElements(int x, int y, Object obj) { |
544 if ((x < this.minX) || (y < this.minY) || |
544 if ((x < this.minX) || (y < this.minY) || |
664 * </pre> |
664 * </pre> |
665 * @param x The X coordinate of the upper left pixel location. |
665 * @param x The X coordinate of the upper left pixel location. |
666 * @param y The Y coordinate of the upper left pixel location. |
666 * @param y The Y coordinate of the upper left pixel location. |
667 * @param w Width of the pixel rectangle. |
667 * @param w Width of the pixel rectangle. |
668 * @param h Height of the pixel rectangle. |
668 * @param h Height of the pixel rectangle. |
669 * @param inData An object reference to an array of type defined by |
669 * @param obj An object reference to an array of type defined by |
670 * getTransferType() and length w*h*getNumDataElements() |
670 * getTransferType() and length w*h*getNumDataElements() |
671 * containing the pixel data to place between x,y and |
671 * containing the pixel data to place between x,y and |
672 * x+h, y+h. |
672 * x+h, y+h. |
673 */ |
673 */ |
674 public void setDataElements(int x, int y, int w, int h, Object obj) { |
674 public void setDataElements(int x, int y, int w, int h, Object obj) { |