fDoG implementation for abstraction and support for 0 grids