
Originally Posted by
Anton1
QSize(1818, 909) 179
QSize(705, 80) 11
With the spectrogram example I can see on my box ( i7-3770T CPU @ 2.50GHz with 4 cores ) values like:
- QSize(484, 343) 3
- QSize(1804, 1075) 27
As my system is far away from being a burner I guess we are talking about some slow embedded device on your side ?
To compare the systems: could you check the numbers of the spectrogram example on your box ?
--
Concerning the "Incremental image composition":
{
....
protected:
const QRectF &area,
const QSize &imageSize
) const override
{
if ( m_image.isNull() )
{
xMap, yMap, area, imageSize );
}
else
{
// find the new area, not being part of the previous image
// and the width/height in pixels
subArea = ...;
subImageSize = ...
xMap, yMap, subArea, subImageSize );
// shift the pixels in m_image and copy in those from subImage
m_image = ...
}
return m_image;
}
private:
};
class YourSpectrogram: public QwtPlotSpectrogram
{
....
protected:
virtual QImage renderImage(
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRectF &area, const QSize &imageSize ) const override
{
if ( m_image.isNull() )
{
m_image = QwtPlotSpectrogram::renderImage(
xMap, yMap, area, imageSize );
}
else
{
// find the new area, not being part of the previous image
// and the width/height in pixels
subArea = ...;
subImageSize = ...
QImage subImage = QwtPlotSpectrogram::renderImage(
xMap, yMap, subArea, subImageSize );
// shift the pixels in m_image and copy in those from subImage
m_image = ...
}
return m_image;
}
private:
QImage m_image;
};
To copy to clipboard, switch view to plain text mode
HTH,
Uwe
PS: if you have a good example for a waterfall plot that could be used as an example ( no huge data files ) you could send me your slow implementation. I would do the optimized implementation then.
Bookmarks