#include <filter.hpp>
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
class Filter< Tin, Tout >
Base class for filters
This class is the base class for all filters. It defines the interface for loading data and processing it. Derived classes must implement Filter::kind, Filter::load_data and Filter::process methods. Optionally, they can implement the Filter::set_params method to receive parameters as a void pointer.
After deriving the class, remember to call the INSTALL_FILTER_DRIVER(klass, type_in, type_out) macro to enable the plugin to be loaded by the kernel.
- Template Parameters
-
Tin | Input data type |
Tout | Output data type |
◆ error()
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
std::string Filter< Tin, Tout >::error |
( |
| ) |
|
|
inline |
Returns the error message
This method returns the error message.
- Returns
- The error message
◆ info()
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
virtual std::map<std::string, std::string> Filter< Tin, Tout >::info |
( |
| ) |
|
|
pure virtual |
Returns the filter information
This method returns the filter information. It returns a map with keys and values describing the filter.
- Returns
- The filter information
◆ kind()
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
virtual std::string Filter< Tin, Tout >::kind |
( |
| ) |
|
|
pure virtual |
Returns the kind of filter
This method returns the kind of filter. It is used to identify the filter when loading it from a plugin.
- Returns
- The kind of filter
◆ load_data()
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
Loads the input data
This method loads the input data into the filter. It returns true if the data was loaded successfully, and false otherwise.
- Parameters
-
- Returns
- True if the data was loaded successfully, and false otherwise
◆ process()
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
Processes the input data
This method processes the input data and returns the result. It returns true if the data was processed successfully, and false otherwise.
- Parameters
-
- Returns
- True if the data was processed successfully, and false otherwise
◆ server_name()
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
static const std::string Filter< Tin, Tout >::server_name |
( |
| ) |
|
|
inlinestatic |
Returns the plugin server name.
◆ set_params()
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
virtual void Filter< Tin, Tout >::set_params |
( |
void * |
params | ) |
|
|
inlinevirtual |
Sets the parameters
This method sets the parameters for the filter. It receives a void pointer to the parameters. The child class must cast the pointer to the correct type.
- Parameters
-
params | The parameters (typically a pointer to a struct) |
◆ dummy
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
bool Filter< Tin, Tout >::dummy = false |
Set it to true to enable dummy mode
◆ version
template<typename Tin = std::vector<double>, typename Tout = std::vector<double>>
const int Filter< Tin, Tout >::version = 2 |
|
static |
Returns the plugin protocol version.
The documentation for this class was generated from the following file: