Get the int value of the sample at the coordinates x,y. An exception will occur if the slice stores FLOAT data.
x
y
int getInt(int x, int y) { final pi = y * width + x; return data[pi] as int; }