Have you tried ImageViewer.Render()?<br><br>And, you should set the windowtitle after Render()/Show(), I think....<br><br>Jothy<br><br><br><br><div class="gmail_quote">On Mon, Feb 22, 2010 at 1:34 PM, Peter von Niederhaeusern <span dir="ltr"><<a href="mailto:pvonnied@gmail.com">pvonnied@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br>
<br>
I googled around to find a solution for the following issue but without success:<br>
In a slot of my MainGui class I create a QVTKWidget and a VtkImageViewer.<br>
The image viewer receives a volume from an itk to vtk filter (to read<br>
in some DICOM data).<br>
<br>
Upon signaling the slot, the QVTKWidget gets painted but NOT its content<br>
(the volume from the image viewer). The widget just hangs there with a<br>
stale background<br>
(when dragged around)...<br>
<br>
================<br>
void MainWindow::OnButtonPressed( void )<br>
{<br>
...<br>
this->mQvtkWidget = new QVTKWidget();<br>
this->mQvtkWidget->setWindowTitle( "Test" );<br>
<br>
this->mVtkImageViewer = vtkImageViewer::New();<br>
this->mVtkImageViewer->SetInput( obj.VtkUnsigned8BitVolume );<br>
<br>
this->mQvtkWidget->SetRenderWindow( this->mVtkImageViewer->GetRenderWindow() );<br>
this->mVtkImageViewer->SetupInteractor(<br>
this->mQvtkWidget->GetRenderWindow()->GetInteractor() );<br>
<br>
this->mQvtkWidget->update();<br>
his->mQvtkWidget->show();<br>
...<br>
}<br>
================<br>
<br>
Frameworks: Qt 4.5.2 (2009.03), vtk-5.4.2, gcc (GCC) 3.4.5<br>
(mingw-vista special r3), Itk 3.16<br>
Platform: Windows Vista (64bit)<br>
<br>
I know that this is a rather often occuring issue, but I'm unable to<br>
find a solution/workaround.<br>
<br>
Thank you for your help.<br>
<br>
Best regards,<br>
Peter<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>