Results 1 to 3 of 3

Thread: Controlling y-coordinate values in QwtRasterData's value() method

  1. #1
    Join Date
    Mar 2025
    Posts
    2
    Platforms
    Windows

    Question Controlling y-coordinate values in QwtRasterData's value() method

    Hi,

    I am currently working on a project where I need to create a spectrogram using QwtPlotSpectrogram. My frequency range is from 9.1 kHz to 19.9 kHz with a bandwidth of 0.2 kHz. I am using QwtRasterData to manage my data.

    I am facing an issue where I want to ensure that the y-coordinate passed to the value() method of QwtRasterData only takes valid frequency values within my specified range. Is there any way to control or restrict the y-coordinates that are passed to this method? I am essentially trying to create a color map where each pixel corresponds to a specific frequency and time, and I want to avoid unnecessary computations for invalid frequencies.

    I would greatly appreciate any guidance or suggestions on how to achieve this.

    Thanks in advance

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

    Default Re: Controlling y-coordinate values in QwtRasterData's value() method

    Guess overloading QwtRasterData::interval is what you are looking for.
    You might also want to implement QwtRasterData::pixelHint to reduce the number of calculations.

    Note that returning qQNaN is allowed to indicate gaps, where you don't have values.

    HTH,
    Uwe
    Last edited by Uwe; 13th March 2025 at 12:23.

  3. #3
    Join Date
    Mar 2025
    Posts
    2
    Platforms
    Windows

    Default Re: Controlling y-coordinate values in QwtRasterData's value() method

    Thanks a lot! Your helpful suggestions solved my issue.

    Best regards
    Hussam

Similar Threads

  1. Replies: 6
    Last Post: 12th October 2015, 09:59
  2. Replies: 1
    Last Post: 9th October 2015, 12:44
  3. Coordinate space vs coordinate system
    By kangaba in forum General Programming
    Replies: 0
    Last Post: 10th December 2013, 15:38
  4. QwtRasterData and values
    By DKL1972 in forum Qwt
    Replies: 12
    Last Post: 10th March 2010, 10:53
  5. Replies: 3
    Last Post: 26th February 2010, 23:37

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.