[vtkusers] vtkParallelCoordinatesView with Qt

Zoltan Kovacs Zoltan.Kovacs at esi-group.com
Wed Nov 28 06:28:38 EST 2018


Dear all,



Based on the example

https://www.vtk.org/Wiki/VTK/Examples/Cxx/InfoVis/ParallelCoordinatesView

I created a simple Qt project using the class vtkParallelCoordinatesView.  It has only a main window with a PushButton and a QWidget to launch a file

opening dialog for any CSV file and view its content. I also created a Qt Form Class called "ParallelCoordinatesView" with the public function "View", which contains the CSV file reading and the parallel coordinates visualization code from the example. I attached the files.

There are two issues with the functions setting up the render window and the interactor in the public function "View".



These function calls are commented out in the code:



    // Set up render window

    view->GetRenderer()->SetBackground(1.0, 1.0, 1.0);

    view->GetRenderer()->GradientBackgroundOff();

    view->GetRenderWindow()->SetSize(1200,600);

    //view->SetInteractor(renderWindowInteractor);

    //view->SetRenderWindow(renderWindow);

    view->ResetCamera();

    view->Render();

    //view->GetInteractor()->Start();



When I compile and run the code in this form, the parallel coordinates view appears in a window detached from the Qt MainWindow after the file test.csv has been read from the file opening dialog.



If I remove the comments only from

   //view->SetInteractor(renderWindowInteractor);

    //view->SetRenderWindow(renderWindow);

and compile and run the code then the view window appears in the QWidget in the MainWindow, as expected,

but as soon as I start to move the cursor, everything blacks out in the Mainwindow.



If remove the comment only from the line

 //view->GetInteractor()->Start();

the I can select lines in the parallel coodinates view vindow, as expected with starting the interactor,

but the Mainwindow hangs.



I would like to ask if there is a proper setup of the render window and the interactor for the class vtkParallelCoordinatesView with Qt? Thank you very much for your help.



Kind regards,

Zoltan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 172 bytes
Desc: main.cpp
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindow.cpp
Type: text/x-c++src
Size: 517 bytes
Desc: mainwindow.cpp
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment-0001.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindow.h
Type: text/x-chdr
Size: 479 bytes
Desc: mainwindow.h
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindow.ui
Type: application/x-designer
Size: 1474 bytes
Desc: mainwindow.ui
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parallelcoordinatesview.cpp
Type: text/x-c++src
Size: 3092 bytes
Desc: parallelcoordinatesview.cpp
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment-0002.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parallelcoordinatesview.h
Type: text/x-chdr
Size: 1817 bytes
Desc: parallelcoordinatesview.h
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment-0001.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parallelcoordinatesview.ui
Type: application/x-designer
Size: 416 bytes
Desc: parallelcoordinatesview.ui
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ParCoordView.pro
Type: application/octet-stream
Size: 4329 bytes
Desc: ParCoordView.pro
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.csv
Type: application/octet-stream
Size: 1335 bytes
Desc: test.csv
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181128/8d158421/attachment-0001.obj>


More information about the vtkusers mailing list