public static Image anisotropicDiffusion(Image original, int iterations, BorderDetectorFunction pf) {
		Image diffused = original.shallowClone();
		for(int i = 0; i < iterations; i++) {
			for(int x = 0; x < diffused.getWidth(); x++) {
				for(int y = 0; y < diffused.getHeight(); y++) {
					diffusePixel(original, diffused, x, y, pf);
				}
			}
			original = (Image) diffused.clone();
		}
		return diffused;
	}