Hi Georg, Niall,
This is definitely in the short-term to-do list for PixelMath, thank you for an excellent suggestion.
Probably not implemented exactly as you suggest, but this feature will be available with several functions, including convolutions and morphological transformations.