Results 1 to 4 of 4

Thread: Agressive filtering of many points, SVN trunk, OpenGL

  1. #1
    Join Date
    Jul 2016
    Posts
    57
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Agressive filtering of many points, SVN trunk, OpenGL

    How do I properly apply that property?

    Do I have to do it this way?:
    Qt Code:
    1. curve->setPaintAttribute(QwtPlotCurve::FilterPointsAggressive, true);
    To copy to clipboard, switch view to plain text mode 

    Above code did not make any difference, or am I applying it wrong?

    P.S. the reason I'm now trying this is...even with OpenGL zooming IN/OUT is kinda slow...

    For example, I created a file x,y with 100 million samples, the MATLAB plotter (which sucks kinda?) has almost same speed(slow speed...) when zooming in/out as my Qwt program utilizing OpenGL, why is that?
    Last edited by r2com; 18th August 2016 at 00:12.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,277
    Thanked 871 Times in 819 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Agressive filtering of many points, SVN trunk, OpenGL

    First of all you need to have samples, that are ordered according to the x or y coordinates and are displayed as lines. If this is the case the filter algorithm will reduce the number of painted lines according to the width or height of the plot canvas. Then rendering itself should be a question of ms.

    The filter algo is pretty fast, but of course it has to iterate over all points and for 100 million samples it will take some time. For this specific use case I would expect using an OpenGL canvas has zero effect as the rendering is not significant for the overall performance.

    But please focus on realistic scenarios, that have something to do with what you want to achieve.

    Uwe

  3. #3
    Join Date
    Jul 2016
    Posts
    57
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Agressive filtering of many points, SVN trunk, OpenGL

    Quote Originally Posted by Uwe View Post
    First of all you need to have samples, that are ordered according to the x or y coordinates and are displayed as lines.
    Well, I have this:
    Qt Code:
    1. QPolygonF points;
    To copy to clipboard, switch view to plain text mode 
    And then I added 100 million points to that as:
    Qt Code:
    1. points << QPointF(x,y);
    To copy to clipboard, switch view to plain text mode 

    Would that work? If Yes, then is having this code:
    Qt Code:
    1. curve->setPaintAttribute(QwtPlotCurve::FilterPointsAggressive, true);
    To copy to clipboard, switch view to plain text mode 
    Right after attaching curve to plot should work?

    And if Not, then what exactly is the right way to do it?

    I am asking this because there is no real tutorial/manual about the above functionality, just dry reference descriptions of functions/features.

  4. #4
    Join Date
    Jul 2016
    Posts
    57
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Agressive filtering of many points, SVN trunk, OpenGL

    OK, so again my question basically was how to properly apply FilterPointsAgressive property?

    Is having this:
    Qt Code:
    1. curve->setPaintAttribute(QwtPlotCurve::FilterPointsAggressive, true);
    To copy to clipboard, switch view to plain text mode 
    before or after attaching the curve is a right way to do it or not?

Similar Threads

  1. Replies: 3
    Last Post: 16th December 2015, 19:39
  2. Replies: 2
    Last Post: 2nd May 2012, 09:49
  3. Moving from Qwt 5.2 to 6.0 (trunk)
    By bigjoeystud in forum Qwt
    Replies: 18
    Last Post: 21st May 2010, 19:17
  4. getting mouse points in opengl
    By sdastagirmca in forum Qt Programming
    Replies: 1
    Last Post: 21st June 2009, 13:59
  5. OpenGL control points
    By jhearon in forum Qt Programming
    Replies: 1
    Last Post: 3rd November 2007, 18:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.