PDA

View Full Version : Is FilterPointsAggressive property using max-min decimation algorithm?



r2com
24th August 2016, 20:22
so is this algorithm used when that property is checked?
http://digital.ni.com/public.nsf/allkb/F694FFEEA0ACF282862576020075F784

Uwe
26th August 2016, 08:55
The basic idea is the same, but as the page does not explain its algo ( only the effect ) and I can't tell you how similar it is to what Qwt does.

In Qwt sequences of lines, that end up at the same x position are replaced by a maximum of 3 vertical lines, so that the outcome remains being a polygon ( the same is implemented for y coordinates and horizontal lines ).



entering point
minimum
maximum
leaving point


So in the worst case you have 3 lines per pixel + 1 line connecting the pixels.

In general it would also be possible to have even less lines by giving up having a polygon of connected lines. This would lead to even less work for the raster paint engine as the path "enter-min-max-leave" might have to pass some pixels twice.

Uwe

r2com
26th August 2016, 16:06
In general it would also be possible to have even less lines by giving up having a polygon of connected lines. T


Am I understanding correctly, that you are saying that I can plot just dots, not lines? I.e. a dot plot, instead of the line plot?

Uwe
26th August 2016, 16:54
Am I understanding correctly, that you are saying that I can plot just dots, not lines? I.e. a dot plot, instead of the line plot?
Of course you can print dots as well - this is what QwtPlotCurve::Dots style does ( a scatter plot ). If you want to go this way have a look at the scatterplot example. It does a completely different type of optimization, one that works for unordered points, is independent of hardware acceleration ( no OpenGL required ) and can be processed multithreaded.

But this is totally unrelated to my previous answers.

Uwe

r2com
26th August 2016, 18:36
In general it would also be possible to have even less lines by giving up having a polygon of connected lines.


I am not quite understanding what you mean? How can I do it on my side? Or is it something what has to be coded inside SVN trunk cor Qwt itself?