Line data Source code
1 : /** 2 : * \file DerivativeFilter.h 3 : */ 4 : 5 : #ifndef ATK_TOOLS_DERIVATIVEFILTER_H 6 : #define ATK_TOOLS_DERIVATIVEFILTER_H 7 : 8 : #include <ATK/Core/TypedBaseFilter.h> 9 : #include <ATK/Tools/config.h> 10 : 11 : namespace ATK 12 : { 13 : /// Does a discrete derivation of the input channels 14 : template<typename DataType_> 15 : class ATK_TOOLS_EXPORT DerivativeFilter final : public TypedBaseFilter<DataType_> 16 : { 17 : protected: 18 : /// Simplify parent calls 19 : using Parent = TypedBaseFilter<DataType_>; 20 : using typename Parent::DataType; 21 : using Parent::converted_inputs; 22 : using Parent::outputs; 23 : using Parent::input_delay; 24 : using Parent::nb_input_ports; 25 : using Parent::nb_output_ports; 26 : 27 : public: 28 : /*! 29 : * @brief Constructor 30 : * @param nb_channels is the number of input and output channels 31 : */ 32 : explicit DerivativeFilter(gsl::index nb_channels = 1); 33 : /// Destructor 34 1 : ~DerivativeFilter() override = default; 35 : 36 : protected: 37 : void process_impl(gsl::index size) const final; 38 : }; 39 : } 40 : 41 : #endif