Hi All,<br><br>I have developed a GUI with Qt and I am using the QVTKWidget to display a 2D image.<br><br>This 2D image cames from a 3D image. I have a slider to control what is the slice to be displayed.<br><br>The problem is that I am getting a flickering effect every time the image is changed.<br>
<br>Here is a piece of code of what I am doing:<br><br>void MyGui::moveBar() {<br> ImageType2D::Pointer img = myImage->getImage2DFrom3D(horizontalScrollBar->value());<br><br> vtkImageViewer* image_view = vtkImageViewer::New();<br>
image_view->SetInput(myImage->convertITKtoVTK(img));<br><br> vtkWidget->SetRenderWindow(image_view->GetRenderWindow());<br><br> image_view->SetColorLevel(138.5);<br> image_view->SetColorWindow(233);<br>
<br> vtkWidget->show();<br>}<br><br>This method is called every time the slider is moved.<br><br>Does anybody knows how to get rid of this flickering effect?<br><br>I'm using VTK 5.2.0 and Qt4.<br><br>I have already tried to use the QTVTKWidget (a subclass of the QVTKWidget) as suggested here (<a href="http://www.vtk.org/pipermail/vtkusers/2006-November/088194.html">http://www.vtk.org/pipermail/vtkusers/2006-November/088194.html</a>), but it didn't work.<br>
<br>Is this really a "double buffering" problem?<br><br>Is Qt a good framework to create GUIs for VTK applications?<br><br>Thanks in advance,<br>Luis<br>