SCM

Discussion Forums: help

Monitor Forum | Start New Thread Start New Thread

 

RE: QT5 et CamiTK [ reply ]
By: Emmanuel Promayon on 2017-03-15 10:05
[forum:3999]
Thanks for sharing the information.

From the trace you submitted, this seems to be a VTK/Qt/OpenGL2 bug.
At the moment we can only support VTK6.3, but we will look into it in the near future.

That said, if you want to investigate (which would be great!), I suggest you start with the bug report 181 [1]. There are a lot of links related to this problem (and probably to be updated).
Paraview also just released a new version (version 5.3) entitled "Paraview 5.3.0 Qt5 OpenGL2". I know that there was a similar problem in Paraview and other VTK-Qt dependent applications. So they might have found the bug and/or found the right way to use OpenGL2 with Qt and VTK (although I think they use the upstream VTK version).

So please feel free to dig into this (you may want to open a new bug report)!

Let us know about the ebuild, it can help other people to publish it.

[1] https://bugzilla-timc.imag.fr/show_bug.cgi?id=181

RE: QT5 et CamiTK [ reply ]
By: théophile tiffet on 2017-03-15 09:25
[forum:3998]
VTK 7.1.0 and QT 5.6.2-r1 (Qt 5.7 also tried)

The constant CAMITK_NO_OPENGL_RESET worked well. However, i have to activate the discrete graphics card (optirun) or i get an other error: http://pastebin.com/aE8k7zGc

RE: QT5 et CamiTK [ reply ]
By: Emmanuel Promayon on 2017-03-14 18:31
[forum:3997]
It might be due to QVTKWidget2 (a strange and hard to tackle bug, see [1]).

Can you try with:
CAMITK_NO_OPENGL_RESET=1 camitk-imp # or bin/camitk-imp if you run the application from the build directory

If the environment variable CAMITK_NO_OPENGL_RESET is set to 1, then the initial OpenGL context instanciated by VTK is kept.
If it is not set, the OpenGL format is reinitialized in the GL context after a first initialization (which is the only way we could find to get a proper display with VTK 6.3 on Linux integrated graphic cards).

Can you also give us the actual VTK and Qt version you are using?


RE: QT5 et CamiTK [ reply ]
By: théophile tiffet on 2017-03-14 18:07
[forum:3996]
#0 0x00007fffe638fc62 in QOpenGLContext::makeCurrent(QSurface*) () from /usr/lib64/libQt5Gui.so.5
#1 0x00007ffff7e370b2 in QGLContext::makeCurrent() () from /usr/lib64/libQt5OpenGL.so.5
#2 0x00007fffe6051067 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#3 0x00007fffe6d8dbe5 in ?? () from /usr/lib64/libvtkGUISupportQt.so.1
#4 0x00007fffe6d7aae3 in ?? () from /usr/lib64/libvtkGUISupportQt.so.1
#5 0x00007fffdbfd6319 in vtkCallbackCommand::Execute(vtkObject*, unsigned long, void*) () from /usr/lib64/libvtkCommonCore.so.1
#6 0x00007fffdc05ce89 in ?? () from /usr/lib64/libvtkCommonCore.so.1
#7 0x00007fffe113899d in vtkRenderWindow::AddRenderer(vtkRenderer*) () from /usr/lib64/libvtkRenderingCore.so.1
#8 0x00007ffff773fa84 in camitk::RendererWidget::RendererWidget (this=0x80f200, parent=0x0, mode=camitk::RendererWidget::TRACKBALL)
at /home/notfound404/Documents/camitk-dev/camitk/sdk/libraries/core/viewer/RendererWidget.cpp:458
#9 0x00007ffff77216b2 in camitk::InteractiveViewer::InteractiveViewer (this=0x80efa0, name=..., type=camitk::InteractiveViewer::GEOMETRY_VIEWER)
at /home/notfound404/Documents/camitk-dev/camitk/sdk/libraries/core/viewer/InteractiveViewer.cpp:204
#10 0x00007ffff7720bbd in camitk::InteractiveViewer::getNewViewer (name=..., type=camitk::InteractiveViewer::GEOMETRY_VIEWER)
at /home/notfound404/Documents/camitk-dev/camitk/sdk/libraries/core/viewer/InteractiveViewer.cpp:97
#11 0x00007ffff7720d24 in camitk::InteractiveViewer::getViewer (name=...) at /home/notfound404/Documents/camitk-dev/camitk/sdk/libraries/core/viewer/InteractiveViewer.cpp:116
#12 0x00007ffff77212f8 in camitk::InteractiveViewer::get3DViewer () at /home/notfound404/Documents/camitk-dev/camitk/sdk/libraries/core/viewer/InteractiveViewer.cpp:167
#13 0x00007ffff773a515 in camitk::MedicalImageViewer::getWidget (this=0x80bf00, parent=0x71f790) at /home/notfound404/Documents/camitk-dev/camitk/sdk/libraries/core/viewer/MedicalImageViewer.cpp:131
#14 0x00007ffff76c5b62 in camitk::MainWindow::setCentralViewer (this=0x71f790, theViewer=0x80bf00) at /home/notfound404/Documents/camitk-dev/camitk/sdk/libraries/core/application/MainWindow.cpp:179
#15 0x000000000041731b in ImpMainWindow::setCentralViewer (this=0x71f790, theViewer=0x80bf00) at /home/notfound404/Documents/camitk-dev/camitk/sdk/applications/imp/ImpMainWindow.cpp:134
#16 0x0000000000416ea8 in ImpMainWindow::ImpMainWindow (this=0x71f790) at /home/notfound404/Documents/camitk-dev/camitk/sdk/applications/imp/ImpMainWindow.cpp:77
#17 0x000000000041fd1a in main (argc=1, argv=0x7fffffffdd28) at /home/notfound404/Documents/camitk-dev/camitk/sdk/applications/imp/main.cpp:105

RE: QT5 et CamiTK [ reply ]
By: théophile tiffet on 2017-03-14 17:32
[forum:3995]
Well i manage to make an ebuild for camitk, however i get a segmentation fault when i run it.

The only error message i have with gdb is :
QOpenGLContext::makeCurrent(QSurface*) () from /usr/lib64/libQt5Gui.so.5

Maybe it is related to this issue (https://bugreports.qt.io/browse/QTBUG-45705) ?

RE: QT5 et CamiTK [ reply ]
By: Emmanuel Promayon on 2017-03-13 16:06
[forum:3988]
Hello,

For pml tools, it is an optional component, you can switch the PML_TOOLS option to OFF. I fixed the problem and pushed to origin/develop (this was branch bug/pmltool-compilation), please just git pull to update your source.

CAMITK_STRICT_CXX11 is an option that will ask xsdcxx to generate a strict c++11 code. It is a work in progress feature, and should not be activated yet (unless you want to check your compiler against C++11)!

SOFA is an open-source framework for biomechanical simulation. You need to have SOFA already compiled and install before activating the option (at the moment only version 16.03 is supported I think). This is completely optional.
It allows the CEP "modeling" to manage SOFA .scn or to call SOFA from .pml and run simulation (in the context of MML it means you can more easily compare, re-run and explore biomechanical simulations and their parameters)

I am curious about how you write an ebuild file (and also how you found all these secondary or tertiary compilation options!).
Was the cmake configuration line I gave you not enough for writing an ebuild?

If you manage to get a ebuild for CamiTK, please do not hesitate to share it!


RE: QT5 et CamiTK [ reply ]
By: théophile tiffet on 2017-03-13 14:42
[forum:3987]
I edited my ebuild file. Now those two components are deselected. I was using cmake version 3.7.2.

However, I encountered some problems when compiling PML_TOOLS:
ref to rank is ambiguous : possible definitions :
- pml2wrl.cpp l51
- g++-v5/type_traits: 1415
I am using gcc version 5.4.0. I think it is linked to "using namespace std" in pml2wrl.cpp.

I also have a question about SOFA. I saw some references to this library in the cmake files but i managed to compile everything without having it installed. Is it needed for something?

Last question, what is the impact of CAMITK_STRICT_CXX11?

RE: QT5 et CamiTK [ reply ]
By: Emmanuel Promayon on 2017-03-11 10:11
[forum:3986]
Hi!

dicomtree and dicomitk components are deprecated and should not be used. Both are replaced by the default dicom component (that can read any dicom series from a directory).

Although still in the source code, both extension are going to be cleaned up in the next CamiTK version, which wll remove all depecrated code.

What is strange is that both components are marked as DISABLED in the camitk_extension CMake macro (see imaging/components/dicomtree/CMakeLists.txt for instance). They should be part of the compilation process (and should automatically be skipped during the configuration phase).
What version of CMake are you using?

If you want to compile the whole opensource CEP set, the best is to just run a cmake configuration from the top directory.

The debian packaging Makefile [1] can be a good source of inspiration, but basically the following should be doing everything needed and not go into deprecated component:

wget https://forge.imag.fr/frs/download.php/808/camitk-4.0.4-red-Source.tar.gz
tar xzf camitk-4.0.4-red-Source.tar.gz
mkdir build
cd build
cmake ../camitk-4.0.4-Source \
-DCEP_IMAGING:BOOL=TRUE \
-DCEP_MODELING:BOOL=TRUE \
\
-DAPIDOC_SDK:BOOL=TRUE
make # use -j if you can build in parallel mode



Let us now!

[1] https://tracker.debian.org/media/packages/c/camitk/rules-4.0.4-2

RE: QT5 et CamiTK [ reply ]
By: Jean-Loup HABERBUSCH on 2017-03-10 15:55
[forum:3985]
As we discuss earlier, the first thing you can do is to follow the migration guide in the wiki [1] to fix the PLUGIN2 problem.

For the second question, in deed, it's the old inclusion form, replace it with "#include <QDialog>" and see if it compiles.

I don't know why you have these problems in DicomTree because they already should be fixed.

[1] : https://forge.imag.fr/plugins/mediawiki/wiki/camitk/index.php/Migration_Guide_3_to_4

QT5 et CamiTK [ reply ]
By: théophile tiffet on 2017-03-10 15:09
[forum:3984]
Bonjour,

j'ai quelques soucis lors de la compilation de CamiTK (version 4.0.4, qt 5.6.2, vtk 7.1.0 sous gentoo) :

- Component DicomTree, fichier DicomTreeComponentExtension.cpp ligne 37 : Q_EXPORT_PLUGIN2. Cette macro n'est plus supportée dans QT5 (remplacer par Q_PLUGIN_METADATA).

- Component DicomITK, fichier DicomITKComponentExtension.cpp ligne 38 : QtGui/QDialog no such file. Dans QT5, QDialog est dans le module QtWidgets et non QtGui.

   
Powered By FusionForge