Ah, yeah, sorry, totally forgot about these lines at the very beginning of 
program execution. Good catch!

From: LOPEZ VELAZCO, ROCIO [mailto:rocio.lo...@upf.edu]
Sent: Dienstag, 17. Juli 2018 14:22
To: Dinkelacker, Stefan
Cc: mitk-users@lists.sourceforge.net
Subject: Re: [mitk-users] MITK based app problems with new release2018

Hello again,

I solved it!! :)
By reading the QVTKOpenGLWidget Class 
Reference<https://www.vtk.org/doc/nightly/html/classQVTKOpenGLWidget.html#details>,
 it says:
[cid:image002.png@01D41DD9.D8DFEE90]
So, I added that line and now it runs perfectly.

Thank you!
Best regards,

Rocio

2018-07-17 13:57 GMT+02:00 LOPEZ VELAZCO, ROCIO 
<rocio.lo...@upf.edu<mailto:rocio.lo...@upf.edu>>:
OK,

- I checked that  the VTK_RENDERING_BACKEND is set to OpenGL2
- I changed my includes to QVTKOpenGLWidget.h file.
- How can I make sure I just use VTK and not OpenGL directly?
- I also followed the warning and added in my app's CMakeLists the changes to 
solve that:
cmake_policy(SET CMP0072 NEW)
set(OpenGL_GL_PREFERENCE GLVND)

It still desn't work. I guess it is something related to the new vtk 8, qt and 
my app... I am trying with a very little example but it does not work either.

Thanks for all!



2018-07-17 12:51 GMT+02:00 Dinkelacker, Stefan 
<s.dinkelac...@dkfz-heidelberg.de<mailto:s.dinkelac...@dkfz-heidelberg.de>>:
Also you should ensure to link against the OpenGL2 VTK components instead of 
the OpenGL VTK components. The VTK backend in VTK’s CMake should be set to 
OpenGL2 by default. But just double check. Yes, you need to use 
QVTKOpenGLWidget.h. You should also make sure to just use VTK and not OpenGL 
directly. You can also try to follow the CMake warning you posted earlier and 
set the variable that allows for using GLVND instead of legacy OpenGL.

From: LOPEZ VELAZCO, ROCIO 
[mailto:rocio.lo...@upf.edu<mailto:rocio.lo...@upf.edu>]
Sent: Dienstag, 17. Juli 2018 11:56

To: Dinkelacker, Stefan
Cc: mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: Re: [mitk-users] MITK based app problems with new release2018

Hello Stefan,

Thank you for your fast reply. Yes, I think that the main point here is that I 
developed my app based in the source code of MITK old release 2016 (vtk 7). And 
now I want to "adapt" the app for the new MITK release 2018 (vtk 8). I found 
that I should use QVTKOpenGLWidget.h in spite of QVTKWidget.h, is that right? I 
changed that but it still gives me the error. Could you give me some tips on 
how should I modify my app? What should I take into account with the new vtk?

Thank you very much again!
Regards,

Rocío

2018-07-17 11:40 GMT+02:00 Dinkelacker, Stefan 
<s.dinkelac...@dkfz-heidelberg.de<mailto:s.dinkelac...@dkfz-heidelberg.de>>:
Well, at least I can tell you that there is a big difference between the last 
release and the master/upcoming release. We’re now based on VTK 8.x which is 
using a “modern” version of OpenGL. So if the workbench that works for you is 
based on the last release, whereas your application is based on our source code 
that depends on VTK 8.x, that’s most probably the explanation for the 
difference.

From: LOPEZ VELAZCO, ROCIO 
[mailto:rocio.lo...@upf.edu<mailto:rocio.lo...@upf.edu>]
Sent: Dienstag, 17. Juli 2018 10:56
To: Dinkelacker, Stefan
Cc: mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: Re: [mitk-users] MITK based app problems with new release2018

Hello all again,

I discover two different things that may affect this error. I checked the 
versions of the drivers in the computer and they are all correct, so the error 
I posted is caused by other reason... I found this warning when compiling MITK, 
do you think it has something to do? But again, if the workbench works properly 
it must be fine...

CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenGL.cmake:270 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib64/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib64/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib64/libGLX.so

OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.


The other issue is related with the QVTKWidget.h file. When I compile my 
application it gives me the error "fatal error: QVTKWidget.h: No such file or 
directory
 #include "QVTKWidget.h", whereas it exists and  is located in the folder: 
/.../mitk2018/build-release/ep/src/VTK/GUISupport/Qt but the compiler does not 
find it.

In last version of MITK this file was located in 
/home/.../mitk2016/build-release/ep/include/vtk-7.0  could this have something 
to do?

Any help will be very welcome!

Thank you in advance.
Best regards,

Rocío



2018-07-14 2:19 GMT+02:00 Dinkelacker, Stefan 
<s.dinkelac...@dkfz-heidelberg.de<mailto:s.dinkelac...@dkfz-heidelberg.de>>:

​Hi,



the OpenGL entry points are determined during runtime, so most probably this IS 
related to your graphics driver. My advise is to follow the hint of the error 
message. Just in case if you're running a VM: you also get the same error 
message when running the Workbench in VirtualBox, as the vbox graphics driver 
can't handle the higher requirements.



Best,

Stefan

________________________________
Von: LOPEZ VELAZCO, ROCIO <rocio.lo...@upf.edu<mailto:rocio.lo...@upf.edu>>
Gesendet: Freitag, 13. Juli 2018 17:40
An: mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Betreff: [mitk-users] MITK based app problems with new release2018

Hello all,

I work with Fedora 27. I compiled a new branch of mitk2018 
T24059-IGTRelease-2018.03<https://phabricator.mitk.org/source/mitk/browse/T24059-IGTRelease-2018.03/>
 and it works perfectly.

I have a MITK-based application that worked with MITK last release (2016). 
However I now link it to the new mitk2018 and I have weird errors regarding 
OpenGL2 and vtkShaderProgram:

ERROR: In 
/.../mitk2018/build-release/ep/src/VTK/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx,
 line 797
vtkGenericOpenGLRenderWindow (0x2d07cf0): GL version 2.1 with the gpu_shader4 
extension is not supported by your graphics driver but is required for the new 
OpenGL rendering backend. Please update your OpenGL driver. If you are using 
Mesa please make sure you have version 10.6.5 or later and make sure your 
driver in Mesa supports OpenGL 3.2.
I can compile the source but the error appears when executing the application 
and in runtime vtk, the interface looks like this:

[cid:image003.png@01D41DD9.D8DFEE90]

You could reproduce this error using the code: 
https://github.com/RocioLO/MITK2018-based-app. You should first give it the 
MITK-build directory path in cmake and then just compile and execute.

I don't think this is not about updating my OpenGL driver, but more related 
with linking libraries...
Would you have any idea on what might be happening?
Any comment would be very welcome.

Thank you very much in advance.

Best regards,

Rocío


--

Rocío López Velazco

SimbioSYS group, BCN MedTech

UniversityPompeu Fabra

Department of Information and Communication Technologies
Roc Boronat, 
122<https://maps.google.com/?q=Roc+Boronat,+122&entry=gmail&source=g> (Tànger 
Building),  08018 Barcelona
Office 55 119
https://bcn-medtech.upf.edu/






--

Rocío López Velazco

SimbioSYS group, BCN MedTech

UniversityPompeu Fabra

Department of Information and Communication Technologies
Roc Boronat, 
122<https://maps.google.com/?q=Roc+Boronat,+122&entry=gmail&source=g> (Tànger 
Building),  08018 Barcelona
Office 55 119
https://bcn-medtech.upf.edu/






--

Rocío López Velazco

SimbioSYS group, BCN MedTech

UniversityPompeu Fabra

Department of Information and Communication Technologies
Roc Boronat, 
122<https://maps.google.com/?q=Roc+Boronat,+122&entry=gmail&source=g> (Tànger 
Building),  08018 Barcelona
Office 55 119
https://bcn-medtech.upf.edu/






--

Rocío López Velazco

SimbioSYS group, BCN MedTech

UniversityPompeu Fabra

Department of Information and Communication Technologies
Roc Boronat, 122 (Tànger Building),  08018 Barcelona
Office 55 119
https://bcn-medtech.upf.edu/






--

Rocío López Velazco

SimbioSYS group, BCN MedTech

UniversityPompeu Fabra

Department of Information and Communication Technologies
Roc Boronat, 122 (Tànger Building),  08018 Barcelona
Office 55 119
https://bcn-medtech.upf.edu/



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to