Command/Observer which accepts a lambda

Hello,

I am wondering if anyone has already created a itk::Command class which accepts a C++ lambda function?

Otherwise, I am wondering if a new itk::Object::AddObserver method should be overloaded to accept std::function<void()> so that a lambda can be directly added instead of constructing a command class.

What do you think?

3 Likes

Sounds like a great idea!