update from DGtal + row-major order for fftw
bug fixin diffusion by FFT for non-rectangular images