Results 1 to 17 of 17

Thread: spectrogram questions

  1. #1
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default spectrogram questions

    Hello,

    I have some questions concerning spectrogram :

    * How can I enable color interpolation like Qcp (Qcp : spectro_qcp.jpg same data shown in Qwt : spectro_qwt.jpg)
    Should I change the color map ? I'm using this one :

    Qt Code:
    1. LinearColorMapRGB::LinearColorMapRGB() :
    2. QwtLinearColorMap(Qt::darkBlue, Qt::darkRed, QwtColorMap::RGB)
    3. {
    4. addColorStop(0.2, Qt::blue);
    5. addColorStop(0.4, Qt::cyan);
    6. addColorStop(0.6, Qt::yellow);
    7. addColorStop(0.8, Qt::red);
    8. }
    To copy to clipboard, switch view to plain text mode 
    However in Qcp, I'm setting a "gradient" called "gpJet" (gradient = HSV ?)

    * Is the number of colors limited to 256 ? is it possible to change it (increase it / decrease it) ?
    (e.g. in VTK the number of colors in the discretizable look-up table can be changed.)

    * When I rescale Z (spectrogram data), the color bar enabled on the Y right axis is changing, I don't want that. So I'm obliged to assign a new LinearColorMapRGB each time I rescale Z data range.

    Qt Code:
    1. m_pChart->setAxisScale(QwtPlot::yRight, dLower, dUpper);
    2.  
    3. QwtScaleWidget* axis = m_pChart->axisWidget(QwtPlot::yRight);
    4. if (axis->isColorBarEnabled())
    5. {
    6. // Need a proper method to get a reference to the QwtInterval
    7. // instead of resetting a new color map to the axis !
    8. axis->setColorMap(QwtInterval(dLower, dUpper), new LinearColorMapRGB());
    9. }
    To copy to clipboard, switch view to plain text mode 

    Is there a clean way ?

    * I have a curve and a spectrogram plot arranged in a vertical layout, I used the code in the "plotmatrix" example to keep the vertical axis aligned and the Xaxis ranges the same.
    When I zoom out so that we can not see the plots, the spectrogram crashes.Below, the callstack of the crash :

    Thread 14 (Thread 0x7fff9f7fe700 (LWP 30601)):
    #0 0x00007fffea763a38 in QwtMatrixRasterData::value(double, double) const (col=0, row=127, this=0xdd0b50) at ../../src/qwt_matrix_raster_data.cpp:25
    row = 127
    col = 0
    xInterval = {d_minValue = 0, d_maxValue = 500, d_borderFlags = {i = 2}}
    yInterval = {d_minValue = 9750, d_maxValue = 10750, d_borderFlags = {i = 2}}
    #1 0x00007fffea763a38 in QwtMatrixRasterData::value(double, double) const (this=0xa25700, x=<optimized out>, y=<optimized out>) at ../../src/qwt_matrix_raster_data.cpp:274
    row = 127
    col = 0
    xInterval = {d_minValue = 0, d_maxValue = 500, d_borderFlags = {i = 2}}
    yInterval = {d_minValue = 9750, d_maxValue = 10750, d_borderFlags = {i = 2}}
    #2 0x00007fffea73f79c in QwtPlotSpectrogram::renderTile(QwtScaleMap const&, QwtScaleMap const&, QRect const&, QImage*) const (this=0xd92830, xMap=..., yMap=..., tile=..., image=0x7fffffffac00) at ../../src/qwt_plot_spectrogram.cpp:508
    tx = <optimized out>
    x = 0
    ty = 10746.09375
    line = 0xe6a824
    y = 0
    range = {d_minValue = -0.021730000153183937, d_maxValue = 1.2283560037612915, d_borderFlags = {i = 0}}
    #3 0x00007fffea7412eb in QtConcurrent::RunFunctionTask<void>::run() (this=0xe6aa30) at /usr/include/qt5/QtConcurrent/qtconcurrentrunbase.h:136
    #4 0x00007fffdd5a9d0e in QThreadPoolThread::run() () at /lib64/libQt5Core.so.5
    #5 0x00007fffdd5acb71 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
    #6 0x00007fffe802be25 in start_thread () at /lib64/libpthread.so.0
    #7 0x00007fffdcd1d34d in clone () at /lib64/libc.so.6
    Thanks.

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

    Default Re: spectrogram questions

    Quote Originally Posted by embeddedmz View Post
    How can I enable color interpolation like Qcp
    Don't know - ask the author or look into the code what it does.

    But in general things are pretty simple: the raster data provides a value at a specific point, that its mapped into the range [0-1], using the interval from QwtPlotSpectrogram::interval( Qt::ZAxis ).
    Then this value goes into the color map, that returns a RBG value or an index for a color table ( depending on QwtColorMap::Format ).
    Qwt offers a couple of standard color maps, but you are free to implement your own.

    Note, that https://sourceforge.net/p/qwt/code/H...nches/qwt-6.2/ offers some more standard color maps and you can work with precalculated RGB tables, what can be a good performance improvement. If you enable DEBUG_RENDER in qwt_plot_spectrogram.cpp and play with the color maps in the spectrogram example you can see which color map takes how long.

    In general you need to be very careful with an implementation of a color map as it is called for each pixel of the resulting image. So for 1280x1024 this will be 1310720 calls.

    In case you are not using QwtMatrixRasterData ( what can be a good idea if you don't want to copy your data ) you should also be very careful with your implementation of YourRasterData::value for the same reason. If YourRasterData has a resolution it also makes a lot of sense to return a QwtRasterData:pixelHint, so that the spectrogram can limit the resolution of the image to the resolution of the data.

    Is the number of colors limited to 256 ?
    No, when working with QwtColorMap::RGB ( default setting ), there is no limitation for colors at all.

    The advantage of using QwtColorMap::Indexed is, that it allows to create an QImage::Format_Indexed8 image, what can be interesting to save memory. Calculating the index is also faster, than interpolating between color stops.

    is it possible to change it (increase it / decrease it) ?
    In Qwt 6.2 you find a method QwtPlotSpectrogram::setMaxRGBTableSize. This is different to using QwtColorMap::Indexed as it also creates an QImage::Format_ARGB32 image.
    But it also uses a table of colors ( precalculated using the color map ), what leads to a faster interpolation for finding the RGB values at the cost of being not accurate.

    Again - check the spectrogram example to see the effects.

    When I rescale Z (spectrogram data), the color bar enabled on the Y right axis is changing.
    No, the color bar on the scale is totally unrelated to the Z values of the spectrogram data.
    But your following sentence indicates, that you want the opposite - the color bar should adjust to the data.

    So I'm obliged to assign a new LinearColorMapRGB each time I rescale Z data range.
    You have to synchronize the intervals manually, what is a design flaw. But that does not mean, that you also have to create a new color map.

    Qt Code:
    1. axis->setColorMap( QwtInterval(dLower, dUpper), axis->colorMap() );
    To copy to clipboard, switch view to plain text mode 
    Never forget, that Qwt is open source. Looking into the code and you would have solved this in 5 seconds on your own.

    Uwe
    Last edited by Uwe; 8th July 2019 at 19:13.

  3. The following user says thank you to Uwe for this useful post:

    embeddedmz (9th July 2019)

  4. #3
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: spectrogram questions

    Hi Uwe,

    Thanks for your reply and sorry for my laziness

    Qt Code:
    1. axis->setColorMap( QwtInterval(dLower, dUpper), axis->colorMap() );
    To copy to clipboard, switch view to plain text mode 

    I share my workaround :

    Qt Code:
    1. QwtScaleWidget* axis = m_pChart->axisWidget(QwtPlot::yRight);
    2. if (axis->isColorBarEnabled())
    3. {
    4. QwtColorMap* colorMap;
    5. if (m_bColorBarInitialized)
    6. {
    7. colorMap = const_cast<QwtColorMap*>(axis->colorMap()); // <==== const cast needed here !
    8. }
    9. else
    10. {
    11. colorMap = new LinearColorMapRGB();
    12. m_bColorBarInitialized = true;
    13. }
    14. axis->setColorMap(QwtInterval(dLower, dUpper), colorMap);
    15. }
    To copy to clipboard, switch view to plain text mode 

    The crash (seg fault) that occurs in QwtMatrixRasterData::value(double, double) is very strange :

    Qt Code:
    1. inline double value(int row, int col) const
    2. {
    3. return values.data()[ row * numColumns + col ];
    4. }
    To copy to clipboard, switch view to plain text mode 

    In debug mode, the values are correct (row * numColumns + col = 127 * 250 + 0 = 31750 which is < to 32000 - number of elements), I don't understand why it crashes (after an extreme zoom out on the spectrogram where this last appears like a thin line) :

    crash.png

    I even set the numbers of threads to 1 (instead 0 - system dependent). It crashes always in the same place.

  5. #4
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: spectrogram questions

    I found what Qcp's color interpoalation corresponds in Qwt ! I only have to call setResampleMode(QwtMatrixRasterData::BilinearInter polation); on my QwtMatrixRasterData data object ! The result is less "pixelated" : spectro_qwt_bilinear.jpg

    Amusing fact :
    With the QwtMatrixRasterData::BilinearInterpolation I don't have crashes when the spectrogram is extermely zoomed out ! What do you think about that ??!!??
    Last edited by embeddedmz; 9th July 2019 at 17:57.

  6. #5
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,200
    Thanked 848 Times in 797 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: spectrogram questions

    Quote Originally Posted by embeddedmz View Post
    I found what Qcp's color interpoalation corresponds in Qwt ! I only have to call setResampleMode(QwtMatrixRasterData::BilinearInter polation);
    IIRC Qcp does not do any interpolation - it is generating the image first and then uses image processing operations offered by QImage( Qt::SmoothTransformation ). This is different to Qwt, that does a resampling ( in this case interpolation ) on the data before creating the image. When the resolution of the screen is below the resolution of the data this makes a difference as you don't lose values when downsampling.

    With the QwtMatrixRasterData::BilinearInterpolation I don't have crashes when the spectrogram is extermely zoomed out ! What do you think about that ??!!??
    Asking me to speculate does not make much sense - use the debugger and/or sanitizer and you will know the truth. If you have understood the problem and believe, that there is a bug in Qwt - please file a bug report.

    Uwe

  7. The following user says thank you to Uwe for this useful post:

    embeddedmz (10th July 2019)

  8. #6
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: spectrogram questions

    Uwe,

    The "rasterview" example crashes when I do the same : when zooming out and making the raster disappear, boom !

    you will know the truth.
    Nothing useful with Valgrind, there's an invalid read, the one that probably caused the crash, but in debug mode, the indexes values are correct ! it's maybe a QVector bug or there's a memory corruption that cannot be detected with Valgrind.

    please file a bug report.
    Where can I do that ?

    Thanks.
    Last edited by embeddedmz; 10th July 2019 at 12:29.

  9. #7
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,200
    Thanked 848 Times in 797 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: spectrogram questions

    The "rasterview" example crashes when ...
    ... reaching a image width or height of 1, leading to an invalid map that devides by 0. Fixed in all branches >= 6.1
    Where can I do that ?.
    https://sourceforge.net/p/qwt/bugs.

    Uwe

  10. #8
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: spectrogram questions

    The issue is already posted here : https://sourceforge.net/p/qwt/bugs/272/

    Otherwise, I'm still curious why is there a segfault whereas the read bounds are correct (existential question) ???!!!???

    Fixed in all branches >= 6.1
    Are you sure, I'm having crashes with Qwt 6.1
    Last edited by embeddedmz; 11th July 2019 at 10:40.

  11. #9
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,200
    Thanked 848 Times in 797 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: spectrogram questions

    Quote Originally Posted by embeddedmz View Post
    Are you sure, I'm having crashes with Qwt 6.1
    With this one ?
    Qt Code:
    1. svn export https://svn.code.sf.net/p/qwt/code/branches/qwt-6.1
    To copy to clipboard, switch view to plain text mode 
    Uwe

  12. #10
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: spectrogram questions

    Hi Uwe,

    No crash with this one.

    So, what is the recommended branch (link please) should I use (We package Qwt in a RPM file, especially for Centos 7. Sadly, for the machine running Ubuntu, the package downloaded with apt is not patched).

    UPDATE:
    I will need the 6.2 version as it contains the features you described in your first reply.
    Last edited by embeddedmz; 11th July 2019 at 17:32.

  13. #11
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: spectrogram questions

    Going back to your first reply, I want to do an analogy with VTK color mapping classes : vtk_color_mapping.png

    From what I understood, using QwtColorMap::RGB format, is like using the VTK class vtkColorTransferFunction (take a look at the picture above), which requires the computation of an RGB color based on the value of the raster pixel.

    This is slower than looking up colors in a 256 color array which can be done by setting the format to QwtColorMap::Indexed. In VTK, the corresponding class would be vtkLookupTable. However, the VTK's look up table size can be changed which is not possible with QwtColorMap::Indexed.

    In Qwt 6.2, as you said, you added a method QwtPlotSpectrogram::setMaxRGBTableSize, I took a look to the code, and, from what I understood, the mode QwtColorMap::RGB now uses a look up table (like vtkLookupTable) instead of computing RGB values (interpolation) with each replot (if the data changes), so it's a little bit faster than the older versions.

    Is DEBUG_RENDER a compilation macro ? Do I need to rebuild the library in order to use it ?

    I tried changing the format from RGB to Indexed and the replot crashes only if the QwtMatrixRasterData's setResampleMode is set to NearestNeighbour. Otherwise, with BilinearInterpolation the replot doesn't crash. Below the callstack of the crash :

    Thread 1 (Thread 0x7fffcf98f980 (LWP 26954)):
    #0 0x00007fffddc44348 in convertIndexedToARGB32PM(unsigned int*, unsigned int const*, int, QVector<unsigned int> const*, QDitherInfo*) () at /lib64/libQt5Gui.so.5
    #1 0x00007fffddc4e581 in blend_untransformed_generic(int, QT_FT_Span_ const*, void*) () at /lib64/libQt5Gui.so.5
    #2 0x00007fffddc7b6c6 in fillRect_normalized(QRect const&, QSpanData*, QRasterPaintEnginePrivate*) () at /lib64/libQt5Gui.so.5
    #3 0x00007fffddc80d9d in QRasterPaintEngine::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) [clone .part.109] () at /lib64/libQt5Gui.so.5
    #4 0x00007fffddc9a3b7 in QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) () at /lib64/libQt5Gui.so.5
    #5 0x00007fffea6f5ef8 in QwtPainter::drawImage(QPainter*, QRectF const&, QImage const&) (image=..., r=<synthetic pointer>, this=0x7fffffffb540) at /usr/include/qt5/QtGui/qpainter.h:848
    #6 0x00007fffea6f5ef8 in QwtPainter::drawImage(QPainter*, QRectF const&, QImage const&) (painter=painter@entry=0x7fffffffb540, rect=..., image=...) at ../../qwt-6.1/src/qwt_painter.cpp:665
    #7 0x00007fffea7581b2 in QwtPlotRasterItem::draw(QPainter*, QwtScaleMap const&, QwtScaleMap const&, QRectF const&) const (this=<optimized out>, painter=0x7fffffffb540, xMap=..., yMap=..., canvasRect=...) at ../../qwt-6.1/src/qwt_plot_rasteritem.cpp:761
    yInterval = {d_minValue = 9750, d_maxValue = 10750, d_borderFlags = {i = 2}}
    paintRect = {xp = 0, yp = 0, w = 1229, h = 714}
    area = {xp = 0, yp = 9750, w = 500, h = 1000}
    imageRect = {xp = 0, yp = 1, w = 1228, h = 713}
    yyMap = {d_s1 = 9750, d_s2 = 10750, d_p1 = 713, d_p2 = 0, d_cnv = -0.71299999999999997, d_ts1 = 9750, d_transform = 0x0}
    xInterval = {d_minValue = 0, d_maxValue = 500, d_borderFlags = {i = 2}}
    xxMap = {d_s1 = 0, d_s2 = 500, d_p1 = 0, d_p2 = 1228, d_cnv = 2.456, d_ts1 = 0, d_transform = 0x0}
    br = {xp = 0, yp = 9750, w = 500, h = 1000}
    image = <incomplete type>
    pixelRect = {xp = 0, yp = 9750, w = 2, h = 7.8125}
    #8 0x00007fffea740495 in QwtPlotSpectrogram::draw(QPainter*, QwtScaleMap const&, QwtScaleMap const&, QRectF const&) const (this=this@entry=0xd92010, painter=painter@entry=0x7fffffffb540, xMap=..., yMap=..., canvasRect=...) at ../../qwt-6.1/src/qwt_plot_spectrogram.cpp:645
    #9 0x00007fffea721c00 in QwtPlot::drawItems(QPainter*, QRectF const&, QwtScaleMap const*) const (this=<optimized out>, painter=0x7fffffffb540, canvasRect=..., maps=0x7fffffffb320) at ../../qwt-6.1/src/qwt_plot.cpp:790
    item = 0xd92010
    it = {i = 0xd92b18}
    itmList = @0xaf5e50: {<QListSpecialMethods<QwtPlotItem*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {_M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0xd92b00}, d = 0xd92b00}}
    #10 0x00007fffea721e75 in QwtPlot::drawCanvas(QPainter*) (this=0x976300, painter=0x7fffffffb540) at ../../qwt-6.1/src/qwt_plot.cpp:755
    maps = {{d_s1 = 9750, d_s2 = 10750, d_p1 = 713, d_p2 = 0, d_cnv = -0.71299999999999997, d_ts1 = 9750, d_transform = 0x0}, {d_s1 = -0.021730000153183937, d_s2 = 1.2283560037612915, d_p1 = 713, d_p2 = 0, d_cnv = -570.36075739376076, d_ts1 = -0.021730000153183937, d_transform = 0x0}, {d_s1 = 0, d_s2 = 500, d_p1 = 0, d_p2 = 1228, d_cnv = 2.456, d_ts1 = 0, d_transform = 0x0}, {d_s1 = 0, d_s2 = 1000, d_p1 = 0, d_p2 = 1228, d_cnv = 1.228, d_ts1 = 0, d_transform = 0x0}}
    #11 0x00007fffea75176a in QwtPlotCanvas::drawCanvas(QPainter*, bool) (this=this@entry=0xa9ba40, painter=painter@entry=0x7fffffffb540, withBackground=withBackground@entry=false) at ../../qwt-6.1/src/qwt_plot_canvas.cpp:920
    hackStyledBackground = <optimized out>
    #12 0x00007fffea75398e in QwtPlotCanvas:aintEvent(QPaintEvent*) (this=0xa9ba40, event=<optimized out>) at ../../qwt-6.1/src/qwt_plot_canvas.cpp:761
    p = {static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x7fffdddc5de0, data = 0x7fffdddc5d20, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0xea0290}}
    bs = @0xa9b4b0: <incomplete type>
    pixelRatio = <optimized out>
    painter = {static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x7fffdddc5de0, data = 0x7fffdddc5d20, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0xb81410}}

  14. #12
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,200
    Thanked 848 Times in 797 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: spectrogram questions

    I tried changing the format from RGB to Indexed and the replot crashes only...
    I can see a call stack of an application ( Qwt 6.1 ) that is somewhere inside of the Qt raster paint engine ?
    Like always: use your debugger/sanitizer and/or come up with a small demo code showing the problem.

    When using qmake use:

    CONFIG += sanitizer
    CONFIG += sanitize_address

    otherwise have a look at -fsanitize... in the gcc/clang docs.

    Uwe

    PS1: doing bilinear interpolation is more expensive, than what you get from using a color table
    PS2: Please allow me not respond to questions, where I have nothing to add to what I already wrote before

  15. The following user says thank you to Uwe for this useful post:

    embeddedmz (12th July 2019)

  16. #13
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: spectrogram questions

    Hi Uwe,

    You can easily reproduce the crash with the "rasterview" example, the binary will crash at startup :

    Qt Code:
    1. class ColorMap: public QwtLinearColorMap
    2. {
    3. public:
    4. ColorMap():
    5. QwtLinearColorMap(Qt::darkBlue, Qt::darkRed, QwtColorMap::Indexed) // <=== add this
    6. {
    7. addColorStop( 0.2, Qt::blue );
    8. addColorStop( 0.4, Qt::cyan );
    9. addColorStop( 0.6, Qt::yellow );
    10. addColorStop( 0.8, Qt::red );
    11. }
    12. };
    To copy to clipboard, switch view to plain text mode 

    The 6.2 is in beta right ? is it right to use it in production ?

  17. #14
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,200
    Thanked 848 Times in 797 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: spectrogram questions

    Quote Originally Posted by embeddedmz View Post
    You can easily reproduce the crash with the "rasterview" example, the binary will crash at startup
    Indeed the raster paint engine is running on a nullptr for the color map of the backing store of the canvas. It happens in convertIndexedToARGB32PM painting/qdrawhelper.cpp.
    Seems like there is a bug, when drawing an Indexed8 QImage to a QPixmap. But as this does not happen with the spectrogram example it needs more investigation, what additional side effects are relevant here.

    Like expected the problem does not happen, when using the X11 paint engine, that has been reintroduced with Qt 5.10. Using the X11 paint engine is recommended for all type of vector data ( curves ) as it makes use of hardware acceleration - in opposite to the raster paint engine, that is a pure software renderer. X11 can be enabled with "export QT_XCB_NATIVE_PAINTING=1" ( or "export QT_GRAPHICSSYSTEM=native" with Qt4 ).

    Using X11 for a spectrogram ( or other raster data ) does not make the same difference as for vector data, beside you are running remote X11.
    Note, that using setMaxRGBTableSize is not affected by this problem, as it does not create a Indexed8 image.

    But anyway - there is a crash in the raster paint engine, that needs to understood. Maybe I can find a workaround and/or create a bug report for Qt, but it is kind of random when Qt development does fixes.

    Uwe

  18. The following user says thank you to Uwe for this useful post:

    embeddedmz (12th July 2019)

  19. #15
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: spectrogram questions

    I set DEBUG_RENDER to 1 and compiled/tested Qwt in debug and release mode but qDebug won't work ! any idea how to fix that ? (the stuff in StackOverflow is outdated...) I could change qDebug by std::cout, but I want to know why this kind of stuff doesn't work when needed
    Last edited by embeddedmz; 15th July 2019 at 11:44.

  20. #16
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,200
    Thanked 848 Times in 797 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: spectrogram questions

    Quote Originally Posted by Uwe View Post
    But anyway - there is a crash in the raster paint engine, that needs to understood.
    Bug is understood now and a fix/workaround has been added to all versions of Qwt >= 6.1

    Uwe

  21. #17
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: spectrogram questions

    Cool are the bugfixes included in the qwt downloaded via :

    Qt Code:
    1. svn export svn://svn.code.sf.net/p/qwt/code/branches/qwt-6.1
    To copy to clipboard, switch view to plain text mode 

    ?

Similar Threads

  1. QWT Spectrogram
    By iamzen in forum Qwt
    Replies: 2
    Last Post: 29th March 2012, 21:31
  2. How to use QWT spectrogram in QML
    By jg in forum Qt Quick
    Replies: 1
    Last Post: 20th May 2011, 10:07
  3. Spectrogram
    By Ronayn in forum Qwt
    Replies: 4
    Last Post: 25th April 2011, 21:14
  4. get min and max value from spectrogram
    By rambo83 in forum Qwt
    Replies: 1
    Last Post: 2nd December 2009, 15:25
  5. qwt spectrogram example
    By rambo83 in forum Qwt
    Replies: 2
    Last Post: 17th November 2009, 22:13

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.