[vtkusers] CentOS 6, VTK 6, Qt 5 -- issues with volume rendering and libvtkGUISupportQt

Marcus D. Hanwell marcus.hanwell at kitware.com
Thu Apr 17 10:13:53 EDT 2014


On Thu, Mar 6, 2014 at 3:08 PM, alketi <rc5 at verizon.net> wrote:
> Hi All,
>
> My Setup:  CentOS 6, VTK 6.1.0, Qt 5.2.1
>
> Qt & VTK were both compiled from source and installed in /opt.
>
> I built VTK with cmake, but despite selecting Qt5, many things still tried
> to point to the standard Qt4 installation on CentOS.  I hand-corrected as
> many of those as I found.
>
> Application Code:
>
> 1.  I have a Qt app and am using a PRO file (not cmake).  My Qt app compiles
> and I'm running the vtk-slider demo inside of Qt.  The VTK code uses a
> "vtkSphereSource".
>
> 2.  The Qt PRO file has includes and libraries pointing to my VTK
> installation.
>
> 3.  In order to compile successfully, at the top of my CPP I have:
> #include <vtkAutoInit.h>
> VTK_MODULE_INIT(vtkRenderingOpenGL);
> VTK_MODULE_INIT(vtkRenderingVolumeOpenGL);  // Added this recently
> VTK_MODULE_INIT(vtkInteractionStyle);
>
>
> MAIN ISSUE:
> The main issue is that the Sphere does not render it's front face correctly,
> i.e. it doesn't appear fully solid, especially when rotated.  The front face
> clips in different ways as you rotate.
>
This indicates that your executable was able to find and resolve all
libraries, otherwise it would never have started/rendered anything.
The output of ldd on your executable is what matters, this sounds like
an OpenGL/driver issue to me.

> In investigating, I noticed that libvtkGUISupportQt-6.1.so is unable to find
> any other VTK libraries, even though they all reside in the same directory.
>
> Here's the output from an ldd of /opt/vtk-6.1.0/lib/libvtkGUISupport

It doesn't matter too much what individual shared libraries see, it
matters what the executable is able to resolve. You would have to add
/opt/vtk-6.1.0/lib to your linker path to have it always resolve, any
given executable can set its rpath or use environment variables. I
would investigate your driver, does glxgears run as expected for
example? If you have something that starts the output of ldd on that
is a better indication of what is actually being linked/used.

Marcus


More information about the vtkusers mailing list