Results 1 to 3 of 3

Thread: How to handle NULL values in QwtMatrixRasterData for QwtSpectrogram based tool

  1. #1
    Join Date
    Dec 2008
    Location
    California, USA
    Posts
    18
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default How to handle NULL values in QwtMatrixRasterData for QwtSpectrogram based tool

    Can anybody provide a hint on how to handle NULL values in QwtMatrixRasterData for QwtPlotSpectrogram based tool?
    The NULL value that we've been using is -999999, but not clear on how to configure QwtLinearColorMap colorMaps so that the colorBar and final spectrogram image ignore these NULL values.

    In the past, when working with random point data, I just ignored these NULLs at load time, and didn't have any problem creating the various colorMaps that we use.

    Now that we are loading this data into a QwtMatrixRasterData object and need an nice ordered set of values, I need to account for every value, but I want to ignore NULLS in the final product.

    I'd appreciate any help you can give.
    Attached a screenshot of the image that includes these NULLS (see blue areas)Capture.jpg

    Thank you

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

    Default Re: How to handle NULL values in QwtMatrixRasterData for QwtSpectrogram based tool

    NaN ( f.e qQNaN ) is treated as what you call NULLs in the render code of the spectrogram.

    Uwe

  3. #3
    Join Date
    Dec 2008
    Location
    California, USA
    Posts
    18
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Smile Re: How to handle NULL values in QwtMatrixRasterData for QwtSpectrogram based tool

    That did it. I set my NULLs to qQNaN() and all is well.

    Many thanks Uwe.

Similar Threads

  1. Replies: 2
    Last Post: 25th November 2015, 04:39
  2. Set NULL values
    By LaTj in forum Newbie
    Replies: 1
    Last Post: 7th October 2013, 22:55
  3. How to adddata for qwtspectrogram
    By centroid in forum Qwt
    Replies: 2
    Last Post: 2nd August 2010, 14:36
  4. Replies: 3
    Last Post: 12th May 2010, 14:11
  5. QwtSpectrogram example program
    By cgifford in forum Qwt
    Replies: 3
    Last Post: 2nd July 2008, 07:46

Tags for this Thread

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.