26#include <QGraphicsPathItem>
27#include <QGraphicsView>
82 QWidget * pQwidgetty(
dynamic_cast<QWidget*
>(parent()));
95 const QString& filtername)
108 int fMax = samplingFreq/2;
116 QGraphicsTextItem * text = addText(filtername, QFont(
"Times",
m_iAxisTextSize));
122 QPen pen(Qt::DotLine);
163 pos = ((double)
m_iCutOffLow / (double)fMax) * numberCoeff;
181 pos = ((double)
m_iCutOffLow / (double)fMax) * numberCoeff;
205 float numberCoeff = coefficientsAFreq.cols();
206 float dsFactor = numberCoeff/
m_qvView->width();
209 for(
int i = 0; i<coefficientsAFreq.cols(); i++) {
210 if(std::abs(coefficientsAFreq(i)) > max) {
211 max = std::abs(coefficientsAFreq(i));
215 coefficientsAFreq = coefficientsAFreq / max;
227 for(
int i = 0; i < numberCoeff; i++) {
235 path.lineTo(path.currentPosition().x()+(1/dsFactor),y);
237 path.lineTo(path.currentPosition().x()+1,y);
QGraphicsScene that draws the magnitude (and optional phase) response of a designed FIR / IIR filter.
2-D display widgets and visualisation helpers (charts, topography, colour maps).
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
int m_iDiagramMarginsVert
int m_iDiagramMarginsHoriz
void plotFilterFrequencyResponse()
QGraphicsPathItem * m_pGraphicsItemPath
FilterPlotScene(QGraphicsView *view, QObject *parent=0)
int m_iNumberHorizontalLines
void updateFilter(const UTILSLIB::FilterKernel &operatorFilter, int samplingFreq, int cutOffLow, int cutOffHigh)
int m_iNumberVerticalLines
void plotMagnitudeDiagram(int samplingFreq, const QString &filtername=QString())
UTILSLIB::FilterKernel m_pCurrentFilter
LayoutScene(QGraphicsView *view, QObject *parent=0)
The FilterKernel class provides methods to create/design a FIR filter kernel.
static QVector< FilterParameter > m_filterTypes
Eigen::RowVectorXd getCoefficients() const