PDA

View Full Version : How to display a large signals with 10000 points on a screen?



marc2050
12th May 2011, 03:10
Hi.

I've a signal data that has 10000 points in it.
I like to display this signal data in Qpainter.
But on my screen, I only have a resolution of 1280 horizontally.
How do I squeeze this 10000 points into a display with 1280 resolution?
I tried a method in which I sample every other 7 samples so by the time I draw the last pixel, I'm almost at the 10000th points in my signals. But this method will make me miss out some peaks in the signals when I draw them. Is there a better way to achieve a good representation?

Thank you.
Marc

PS. I'm not sure if this question is entirely related to QT. Just wanted to know how other programmers do that in QT.

aamer4yu
12th May 2011, 05:43
Put ur painted widget inside a QScrollWidget and you can scroll through the points.

Ginsengelf
12th May 2011, 07:30
Hi, you can draw the minimum and maximum of a bunch of samples. That way you won't miss any peaks.

Ginsengelf