The FilterKernel class provides methods to create/design a FIR filter kernel. More...
#include <filterkernel.h>
Public Member Functions | |
| FilterKernel () | |
| FilterKernel creates a default FilterKernel object. | |
| FilterKernel (const QString &sFilterName, int iFilterType, int iOrder, double dCenterfreq, double dBandwidth, double dParkswidth, double dSFreq, int iDesignMethod) | |
| void | prepareFilter (int iDataSize) |
| Eigen::RowVectorXd | applyConvFilter (const Eigen::RowVectorXd &vecData, bool bKeepOverhead=false) const |
| void | applyFftFilter (Eigen::RowVectorXd &vecData, bool bKeepOverhead=false) |
| QString | getName () const |
| void | setName (const QString &sFilterName) |
| double | getSamplingFrequency () const |
| void | setSamplingFrequency (double dSFreq) |
| int | getFilterOrder () const |
| void | setFilterOrder (int iOrder) |
| double | getCenterFrequency () const |
| void | setCenterFrequency (double dCenterFreq) |
| double | getBandwidth () const |
| void | setBandwidth (double dBandwidth) |
| double | getParksWidth () const |
| void | setParksWidth (double dParksWidth) |
| double | getHighpassFreq () const |
| void | setHighpassFreq (double dHighpassFreq) |
| double | getLowpassFreq () const |
| void | setLowpassFreq (double dLowpassFreq) |
| Eigen::RowVectorXd | getCoefficients () const |
| void | setCoefficients (const Eigen::RowVectorXd &vecCoeff) |
| Eigen::RowVectorXcd | getFftCoefficients () const |
| void | setFftCoefficients (const Eigen::RowVectorXcd &vecFftCoeff) |
| FilterParameter | getDesignMethod () const |
| void | setDesignMethod (int iDesignMethod) |
| FilterParameter | getFilterType () const |
| void | setFilterType (int iFilterType) |
| QString | getShortDescription () const |
Static Public Attributes | |
| static QVector< FilterParameter > | m_designMethods |
| static QVector< FilterParameter > | m_filterTypes |
The FilterKernel class provides methods to create/design a FIR filter kernel.
The FilterKernel class provides methods to create/design a FIR filter kernel
Definition at line 128 of file filterkernel.h.
| FilterKernel::FilterKernel | ( | ) |
FilterKernel creates a default FilterKernel object.
Definition at line 69 of file filterkernel.cpp.
| FilterKernel::FilterKernel | ( | const QString & | sFilterName, |
| int | iFilterType, | ||
| int | iOrder, | ||
| double | dCenterfreq, | ||
| double | dBandwidth, | ||
| double | dParkswidth, | ||
| double | dSFreq, | ||
| int | iDesignMethod ) |
Constructs a FilterKernel object
| [in] | sFilterName | Defines the name of the generated filter. |
| [in] | iFilterType | Tyep of the filter: LPF, HPF, BPF, NOTCH (from enum FilterType). |
| [in] | iOrder | Represents the order of the filter, the higher the higher is the stopband attenuation. |
| [in] | dCenterfreq | Determines the center of the frequency - normed to sFreq/2 (nyquist). |
| [in] | dBandwidth | Ignored if FilterType is set to LPF,HPF. if NOTCH/BPF: bandwidth of stop-/passband - normed to sFreq/2 (nyquist). |
| [in] | dParkswidth | Determines the width of the filter slopes (steepness) - normed to sFreq/2 (nyquist). |
| [in] | dSFreq | The sampling frequency. |
| [in] | iDesignMethod | Specifies the design method to use. Choose between Cosind and Tschebyscheff. |
Definition at line 87 of file filterkernel.cpp.
| RowVectorXd FilterKernel::applyConvFilter | ( | const Eigen::RowVectorXd & | vecData, |
| bool | bKeepOverhead = false ) const |
Applies the current filter to the input data using convolution in time domain.
| [in] | vecData | Holds the data to be filtered. |
| [in] | bKeepOverhead | Whether the result should still include the overhead information in front and back of the data. Default is set to false. |
Definition at line 130 of file filterkernel.cpp.
| void FilterKernel::applyFftFilter | ( | Eigen::RowVectorXd & | vecData, |
| bool | bKeepOverhead = false ) |
Applies the current filter to the input data using multiplication in frequency domain.
| [in,out] | vecData | Holds the data to be filtered. Gets overwritten with its filtered result. |
| [in] | bKeepOverhead | Whether the result should still include the overhead information in front and back of the data. Default is set to false. |
Definition at line 154 of file filterkernel.cpp.
| double FilterKernel::getBandwidth | ( | ) | const |
Definition at line 259 of file filterkernel.cpp.
| double FilterKernel::getCenterFrequency | ( | ) | const |
Definition at line 245 of file filterkernel.cpp.
| Eigen::RowVectorXd FilterKernel::getCoefficients | ( | ) | const |
Definition at line 315 of file filterkernel.cpp.
| UTILSLIB::FilterParameter FilterKernel::getDesignMethod | ( | ) | const |
Definition at line 511 of file filterkernel.cpp.
| Eigen::RowVectorXcd FilterKernel::getFftCoefficients | ( | ) | const |
Definition at line 329 of file filterkernel.cpp.
| int FilterKernel::getFilterOrder | ( | ) | const |
Definition at line 231 of file filterkernel.cpp.
| UTILSLIB::FilterParameter FilterKernel::getFilterType | ( | ) | const |
Definition at line 521 of file filterkernel.cpp.
| double FilterKernel::getHighpassFreq | ( | ) | const |
Definition at line 287 of file filterkernel.cpp.
| double FilterKernel::getLowpassFreq | ( | ) | const |
Definition at line 301 of file filterkernel.cpp.
| QString FilterKernel::getName | ( | ) | const |
Definition at line 203 of file filterkernel.cpp.
| double FilterKernel::getParksWidth | ( | ) | const |
Definition at line 273 of file filterkernel.cpp.
| double FilterKernel::getSamplingFrequency | ( | ) | const |
Definition at line 217 of file filterkernel.cpp.
| QString FilterKernel::getShortDescription | ( | ) | const |
Definition at line 500 of file filterkernel.cpp.
| void FilterKernel::prepareFilter | ( | int | iDataSize | ) |
Prepares a filter kernel to be used wiht a specific data block length. This is favorable to call before filtering, in order to avoid transforming the filter coefficients anew during filtering. This functions was introduced since one does not always know the data length of the data blocks to be filtered when designing the filter.
| [in] | iDataSize | The data size to setup the filters to. |
Definition at line 114 of file filterkernel.cpp.
| void FilterKernel::setBandwidth | ( | double | dBandwidth | ) |
Definition at line 266 of file filterkernel.cpp.
| void FilterKernel::setCenterFrequency | ( | double | dCenterFreq | ) |
Definition at line 252 of file filterkernel.cpp.
| void FilterKernel::setCoefficients | ( | const Eigen::RowVectorXd & | vecCoeff | ) |
Definition at line 322 of file filterkernel.cpp.
| void FilterKernel::setDesignMethod | ( | int | iDesignMethod | ) |
Definition at line 531 of file filterkernel.cpp.
| void FilterKernel::setFftCoefficients | ( | const Eigen::RowVectorXcd & | vecFftCoeff | ) |
Definition at line 336 of file filterkernel.cpp.
| void FilterKernel::setFilterOrder | ( | int | iOrder | ) |
Definition at line 238 of file filterkernel.cpp.
| void FilterKernel::setFilterType | ( | int | iFilterType | ) |
Definition at line 542 of file filterkernel.cpp.
| void FilterKernel::setHighpassFreq | ( | double | dHighpassFreq | ) |
Definition at line 294 of file filterkernel.cpp.
| void FilterKernel::setLowpassFreq | ( | double | dLowpassFreq | ) |
Definition at line 308 of file filterkernel.cpp.
| void FilterKernel::setName | ( | const QString & | sFilterName | ) |
Definition at line 210 of file filterkernel.cpp.
| void FilterKernel::setParksWidth | ( | double | dParksWidth | ) |
Definition at line 280 of file filterkernel.cpp.
| void FilterKernel::setSamplingFrequency | ( | double | dSFreq | ) |
Definition at line 224 of file filterkernel.cpp.
|
static |
Vector of possible filter design methods.
Definition at line 233 of file filterkernel.h.
|
static |
Vector of possible filter design types.
Definition at line 234 of file filterkernel.h.