public void get( int x , int y , int[] pixel ) { if( image.isInBounds(x,y) ) { image.unsafe_get(x, y, pixel); } else { getOutside(x, y, pixel); } }
@Override public void getOutside(int x, int y, int pixel[] ) { image.unsafe_get(colWrap.getIndex(x), rowWrap.getIndex(y), pixel); }
/** * Returns the pixel's value for all the bands as an array. * * @param x pixel coordinate. * @param y pixel coordinate. * @param storage If not null then the pixel's value is written here. If null a new array is created. * @return The pixel's value. */ public int[] get(int x, int y, int[] storage) { if (!isInBounds(x, y)) throw new ImageAccessException("Requested pixel is out of bounds"); if (storage == null) { storage = new int[numBands]; } unsafe_get(x,y,storage); return storage; }