double[][] imageValues = new double[resolution.width][resolution.height];
for (int x=0; x < resolution.width; x++) {
for (int y=0; y < resolution.height; y++) {
final double xx = x;
final double yy = y;
TxPair txPair = new TxPair() {
public double getDistance() {
double w = getFromX() - getToX();
double h = getFromY() - getToY();
return Math.sqrt(w*w+h*h);
}