Results 1 to 3 of 3

Thread: Help with QwtData please~

  1. #1
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Help with QwtData please~

    Hi,

    I'm having some trouble making a plot from a large data file (.txt) of doubles. Basically there's too much data to fit into an array and so i've been browsing the forums for a solution to this...
    I came across some things to do with QwtData but don't know if this is the right thing for me and also how it actually works... I'm wondering if anyone could help me out here. I've read some threads about implementing a bridge to the data, but nothing about how to read the actual data itself in order to bridge to it.

    New to Qwt~ so looking for some experienced people to explain it all to me ^^

    Cheers

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

    Default Re: Help with QwtData please~

    QwtData is an abstract API between the curve and the samples. So the application is free to organize its data structures like it is best and then to implement its specific data object according to it.

    The problem, that you have too many samples to be loaded into memory is a general one and doesn't have much to do with Qwt or Qt. So don't be surprised, not to find an answer in a Qt/Qwt forum.

    I can imagine 2 solutions:

    a) You do some preprocessing on your samples, that reduces the number of points and load those into memory - how depends on the characteristics of your samples.

    b) QwtPlotCurve always iterates in increasing order over the samples. So your data object doesn't have to load all values into memory at the same time.

    You didn't write what "too much" data exactly means, but if these are really many you have to find a solution for performance issues anyway and to implement a). Note, that converting doubles into text and vice versa are expensive operations. Better take care, that they need not to be done for each paint operation.

    Uwe

  3. #3
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Help with QwtData please~

    Hey, thanks for the reply~

    So the data is stored as a .txt, and it represents EEG data (not that important if you dont know what EEG is). So the structure of the data is 136 columns, each representing an EEG channel, and each channel has about 420k samples~ each sample is a double value. My aim is to plot the channels~

    If I take small amounts of the data my plots work fine and are correct, so the only real problem is reading the massive amounts of data >.<
    I will try look about to see where I can find some hints on how to solve this problem. Of course, if you know anything or have any suggestions where to look~ it would be much appreciated

    I think your suggestion "b" is what I will be trying to do once I figure out how to handle my data ^^ if I come across any problems, i'll be coming back here haha

    Cheers!

Similar Threads

  1. concurrency issues with QwtData
    By sun in forum Qwt
    Replies: 1
    Last Post: 28th January 2010, 10:08
  2. Level of Details QwtData Technique?
    By baray98 in forum Qwt
    Replies: 1
    Last Post: 4th September 2009, 08:51

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
  •  
Qt is a trademark of The Qt Company.