You should use the Qt based vtkRenderWindowInteractor, QVTKInteractor. QVTKWidget makes one for you already, or you can specify one yourself.<br><br>Clint<br><br>----- Reply message -----<br>From: "florian" <florian@tricksoft.de><br>Date: Thu, Jun 16, 2011 5:39 am<br>Subject: [vtkusers] QVTKWidget + vtkRectilinearWipeWidget<br>To: <vtkusers@vtk.org><br><br>Hallo,<br><br>Im trying to use a vtkRectilinearWipeWidget in my Qt Application.<br><br>When I create a new vtkRenderWindowInteractor everything works fine and <br>i get a completely working widget in a seperate window. But I want the <br>widget to be within my Application, where i created a qvtkwidget.<br><br>The problem is, when i run my application the vtkRectilinearWipe <br>appears, but all the widget features are missing (like the sliders to <br>move the split).<br><br>Instead i'm able to rotate the 2D Image with the mouse.<br><br><br>Below I pasted my code (Pastebin alternatively)<br>I would be really thankful if somebody could take a look at it and maybe <br>figure out what I'm doing wrong.<br><br><a href="http://pastebin.com/ufaiyPzv">http://pastebin.com/ufaiyPzv</a><br><br><br> vtkWidgetFixed1 = new QVTKWidget();<br><br> m_pMainWindow->setCentralWidget(vtkWidgetFixed1);<br><br> vtkImageConstantPad* pad1 = <br>vtkImageConstantPad::New();<br> pad1->SetInput(volume1->getData());<br> pad1->SetConstant(0.0);<br> pad1->SetOutputWholeExtent(0, 511, 0, 511, 0, 0);<br><br> vtkImageConstantPad* pad2 = vtkImageConstantPad::New();<br> pad2->SetInput(volume2->getData());<br> pad2->SetConstant(0.0);<br> pad2->SetOutputWholeExtent(0, 511, 0, 511, 0, 0);<br><br> wipe = vtkSmartPointer<vtkImageRectilinearWipe>::New();<br> wipe->SetInput(0,pad1->GetOutput());<br> wipe->SetInput(1,pad2->GetOutput());<br> wipe->SetPosition(10,256);<br> wipe->SetWipe(0);<br><br> vtkSmartPointer<vtkRenderer> ren1 = <br>vtkSmartPointer<vtkRenderer>::New();<br> vtkSmartPointer<vtkRenderWindow> renWin = <br>vtkWidgetFixed1->GetRenderWindow();<br> vtkSmartPointer<vtkRenderWindowInteractor> iren = <br>vtkWidgetFixed1->GetInteractor();<br> renWin->AddRenderer(ren1);<br> renWin->SetInteractor(iren);<br><br> vtkImageMapToWindowLevelColors *m_WLFilter = <br>vtkImageMapToWindowLevelColors::New();<br> m_WLFilter->SetOutputFormatToLuminance();<br> m_WLFilter->SetInput( wipe->GetOutput() );<br> m_WLFilter->SetWindow(1000.0);<br> m_WLFilter->SetWindow(400.0);<br> m_WLFilter->UpdateWholeExtent();<br><br> vtkSmartPointer<vtkImageActor> wipeActor = <br>vtkSmartPointer<vtkImageActor>::New();<br> wipeActor->SetInput(m_WLFilter->GetOutput());<br><br> vtkSmartPointer<vtkRectilinearWipeWidget> wipeWidget = <br>vtkSmartPointer<vtkRectilinearWipeWidget>::New();<br> wipeWidget->SetInteractor(iren);<br><br> vtkRectilinearWipeRepresentation *wipeWidgetRep= <br>static_cast<vtkRectilinearWipeRepresentation <br>*>(wipeWidget->GetRepresentation());<br><br> wipeWidgetRep->SetImageActor(wipeActor);<br> wipeWidgetRep->SetRectilinearWipe(wipe);<br> wipeWidgetRep->GetProperty()->SetLineWidth(2.0);<br> wipeWidgetRep->GetProperty()->SetOpacity(0.75);<br><br> ren1->AddActor(wipeActor);<br> ren1->SetBackground(0.1, 0.2, 0.4);<br><br> iren->Initialize();<br> renWin->Render();<br> wipeWidget->On();<br>_______________________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">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">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">http://www.vtk.org/mailman/listinfo/vtkusers</a><br><br><br>