Results 1 to 2 of 2

Thread: Irregular data and QwtPlotSpectrogram

  1. #1
    Join Date
    Jan 2008
    Location
    Silicon valley
    Posts
    15
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Irregular data and QwtPlotSpectrogram

    Hi there,

    Basically I have an irregular grid of three dimensional data, where x,y specify a point, and Z specifies elevation (some value in specific range), and I need to color it. Since the x,y coordinates in value() do not match mine, I have to interpolate them. What's the suggested way to plot the irregular data on the QwtPlotSpectrogram? My problem is that I have only few points, and the contours on the spectrogram looks too sharp. Is there any way to enable the interpolation for contours (i.e. have the Qwt draw an arc instead of a line between two points)?

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

    Default Re: Irregular data and QwtPlotSpectrogram

    Basically I have an irregular grid of three dimensional data, where x,y specify a point, and Z specifies elevation (some value in specific range), and I need to color it. Since the x,y coordinates in value() do not match mine, I have to interpolate them. What's the suggested way to plot the irregular data on the QwtPlotSpectrogram?
    I'm not sure what you mean by "irregular", but of course most applications will need to implement some sort of resampling in their raster data class.
    My problem is that I have only few points, and the contours on the spectrogram looks too sharp. Is there any way to enable the interpolation for contours (i.e. have the Qwt draw an arc instead of a line between two points)?
    With QwtRasterData::rasterHint() and QwtPlotSpectrogram::contourRasterSize() you have some effect on the contouring algo.

    Qwt implements the CONREC ( http://local.wasp.uwa.edu.au/~pbourke/papers/conrec ) algo. This one produces lines, nothing else. You can try to make polygons of them, but probably it's easier to generate a contour of points by running one by one over the raster data and to pass it to a vectorizer.

    An algorithm that produces polygons instead of lines would be great, because it could be used to replace the pixel matrix (QImage) by polygons for spectograms with fixed color maps. This could drastically reduce the amount of memory ( consider A0 images in high resolution ) that is needed for printing.

    Uwe

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.