Gradient-weighted diffusion version 1
Started on dealing with ignoring image under mask.