new Setter(name)
- Description:
Template to implement a setter hook mechanism. A typical implementation is of the form:
#include "Setter.hpp" namespace aidecv { class SomethingSetter : public Setter { public: SomethingSetter() : Setter("something"){} void set(Image& target, JSON command, const Image& source_if_any) { // Implements the setter } } somethingSetter; }
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The 'do' operation name to register for this setter. |
Methods
set(target, command, source)
- Description:
Implements the setter operation.
- Typically modifies the target given the command, optionnaly using the source.
Parameters:
Name | Type | Description |
---|---|---|
target |
Mat | The input/output image. |
command |
JSON | The command parameters. |
source |
Mat | The source image if any, otherwise an empty image. |
(static) getSetters() → {Map}
- Description:
Returns the setters table
Returns:
A std::map < std::string, Setter * >
with the register setters indexed by the 'do' operation name.
- Type
- Map