implementation of anisotropic diffusion, isotropic diffusion (AKA gaussian filtering) and connected components