@Override public Number get(int x, int y) { return image.get(x,y); }
public long get( int x , int y ) { if( image.isInBounds(x,y) ) return image.get(x,y); return getOutside( x , y ); }
@Override public long getOutside(int x, int y) { return image.get( colWrap.getIndex(x) , rowWrap.getIndex(y) ); }
public static double get(ImageGray img, int x, int y) { if (img instanceof GrayI8) { return ((GrayI8) img).get(x, y); } else if (img instanceof GrayI16) { return ((GrayI16) img).get(x, y); } else if (img instanceof GrayS32) { return ((GrayS32) img).get(x, y); } else if (img instanceof GrayF32) { return ((GrayF32) img).get(x, y); } else if (img instanceof GrayF64) { return ((GrayF64) img).get(x, y); } else if (img instanceof GrayS64) { return ((GrayS64) img).get(x, y); } else { throw new IllegalArgumentException("Unknown or incompatible image type: " + img.getClass().getSimpleName()); } }