Hello,
We have recently added something very similar: New Functor Filter with lambda support
The are called UnaryFunctorGenerator and BinaryFunctorGeneratorImageFilter These filters were replacements for the prior UnaryFunctorImageFilter and BinaryFunctor filter. They have some similar functionality to what you propose, but don’t work with neighborhoods. Please see if these new classes in ITK meet some of your needs and if you could help improve them!