<div dir="ltr">Hello,
<br><br>I have a strange problem with showing VTK volume in QVTKWidget. I can compile example such as as:
<br><a href="http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Medical/Cxx/Medical4.cxx" target="_top" rel="nofollow">http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Medical/Cxx/Medical4.cxx</a><br>and
it work fine. But when I want to use exactly the same code in my sample
Qt application (let's say - render only after user press a button)
nothing is shown in QVTKWidget (I tried also with QVTKInteractor instead
of the one from example). I have this problem only when I want to use
vtkVolume and than add the volume to renderer with AddVolume. If I make
other 3D visualisation for example with vtkContourFilter and than I add
it to renderer with AddActor method - everything works fine.
<br>I was trying to solve this problem for a couple of days but I found
some things that I can't understand in any way. If I take, for example,
Medical4.cxx file and add there
<br>#include <QApplication>
<br>and than
<br>QApplication a(argc, argv); as a first instruction in main - nothing
is rendered. But if I move this line after iren->Start() - it
renders well again. So my question is - is it some kind of known issue
that I have to make some part of VTK pipeline initialization before Qt
application could start? Or maybe I am doing somthing totaly wrong?
Thanks in advance if someone could help me, I would also apreciate if
someone could check the behaviour with this
<br>QApplication a(argc, argv);
<br>instruction inside (for example) Medical4.cxx - if nobody will be
able to reproduce it, maybe I will try to build on other OS. Currently I
am working on Ubuntu 12.04 with VTK 5.8 and Qt 4.8.1.
<br><br>Best regards,
<br>Jakub
</div>