added anisotropic distance transform for 2D