marc2050
4th August 2011, 21:31
Hi.
I'm referring to the spectrogram calls. The code is as below:
class SpectrogramData: public QwtRasterData
{
public:
SpectrogramData()
{
setInterval( Qt::XAxis, QwtInterval( -1.5, 1.5 ) );
setInterval( Qt::YAxis, QwtInterval( -1.5, 1.5 ) );
setInterval( Qt::ZAxis, QwtInterval( 0.0, 10.0 ) );
}
virtual double value(double x, double y) const
{
const double c = 0.842;
const double v1 = x * x + (y-c) * (y+c);
const double v2 = x * (y+c) + x * (y+c);
return 1.0 / (v1 * v1 + v2 * v2);
}
};
... somewhere else...
d_spectrogram = new QwtPlotSpectrogram();
My simple question is, how often is this SpectrogramData function call when drawing out the plot? Is it per pixel?
Thank you. 'm just trying to learn and get more understanding...
I'm referring to the spectrogram calls. The code is as below:
class SpectrogramData: public QwtRasterData
{
public:
SpectrogramData()
{
setInterval( Qt::XAxis, QwtInterval( -1.5, 1.5 ) );
setInterval( Qt::YAxis, QwtInterval( -1.5, 1.5 ) );
setInterval( Qt::ZAxis, QwtInterval( 0.0, 10.0 ) );
}
virtual double value(double x, double y) const
{
const double c = 0.842;
const double v1 = x * x + (y-c) * (y+c);
const double v2 = x * (y+c) + x * (y+c);
return 1.0 / (v1 * v1 + v2 * v2);
}
};
... somewhere else...
d_spectrogram = new QwtPlotSpectrogram();
My simple question is, how often is this SpectrogramData function call when drawing out the plot? Is it per pixel?
Thank you. 'm just trying to learn and get more understanding...