|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
ITK command that uses std::function objects as filter and action callbacks. More...
#include <mitkStdFunctionCommand.h>


Public Types | |
| using | Self = StdFunctionCommand |
| using | Pointer = itk::SmartPointer< Self > |
| using | FilterFunction = std::function< bool(const itk::EventObject &)> |
| Function type for filtering events. Returns true if the event should be handled. More... | |
| using | ActionFunction = std::function< void(const itk::EventObject &)> |
| Function type for the action to execute when the filter passes. More... | |
Public Member Functions | |
| virtual const char * | GetClassName () const |
| void | SetCommandFilter (FilterFunction stdFunctionFilter) |
| Set the filter function that decides whether to handle an event. More... | |
| void | SetCommandAction (ActionFunction stdFunctionAction) |
| Set the action function to execute when the filter passes. More... | |
| void | Execute (Object *, const itk::EventObject &event) override |
| Execute the command for a non-const caller. More... | |
| void | Execute (const Object *, const itk::EventObject &event) override |
| Execute the command for a const caller. More... | |
Static Public Member Functions | |
| static Pointer | New () |
Protected Member Functions | |
| StdFunctionCommand () | |
| ~StdFunctionCommand () override | |
Protected Attributes | |
| FilterFunction | m_StdFilterFunction |
| ActionFunction | m_StdActionFunction |
ITK command that uses std::function objects as filter and action callbacks.
This command accepts a filter function that decides whether to handle an event, and an action function that is executed when the filter returns true. Both functions must be set before the command will execute.
Definition at line 33 of file mitkStdFunctionCommand.h.
| using mitk::StdFunctionCommand::ActionFunction = std::function<void(const itk::EventObject&)> |
Function type for the action to execute when the filter passes.
Definition at line 43 of file mitkStdFunctionCommand.h.
| using mitk::StdFunctionCommand::FilterFunction = std::function<bool(const itk::EventObject&)> |
Function type for filtering events. Returns true if the event should be handled.
Definition at line 40 of file mitkStdFunctionCommand.h.
Definition at line 37 of file mitkStdFunctionCommand.h.
Definition at line 36 of file mitkStdFunctionCommand.h.
|
inlineprotected |
Definition at line 109 of file mitkStdFunctionCommand.h.
|
inlineoverrideprotected |
Definition at line 114 of file mitkStdFunctionCommand.h.
|
inlineoverride |
Execute the command for a const caller.
If both filter and action functions are set and the filter returns true for the given event, the action function is called.
Definition at line 94 of file mitkStdFunctionCommand.h.
|
inlineoverride |
Execute the command for a non-const caller.
If both filter and action functions are set and the filter returns true for the given event, the action function is called.
Definition at line 77 of file mitkStdFunctionCommand.h.
|
virtual |
Run-time type information (and related methods).
|
static |
Method for creation through the object factory.
|
inline |
Set the action function to execute when the filter passes.
| [in] | stdFunctionAction | the action function. |
Definition at line 66 of file mitkStdFunctionCommand.h.
|
inline |
Set the filter function that decides whether to handle an event.
| [in] | stdFunctionFilter | the filter function. |
Definition at line 56 of file mitkStdFunctionCommand.h.
|
protected |
Definition at line 107 of file mitkStdFunctionCommand.h.
|
protected |
Definition at line 106 of file mitkStdFunctionCommand.h.