Give this a try,<div><br></div><div>Instead of creating a new vtkRenderWindow like,</div><div>m_WindowAxial = vtkRenderWindow::New();</div><div><br></div><div>use instance inside QVTKWidget:</div><div><br></div><div>Like :</div>
<div><br></div><div>m_WindowAxia=m_AxialWidget->GetRenderWindow();</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On 4 November 2010 19:14, Erik Tuerke <span dir="ltr"><<a href="mailto:tuerke@cbs.mpg.de">tuerke@cbs.mpg.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi!<br>
<br>
I want to create an application with qt and vtk using the QVTKWidget. My problem is that for all QVTKWidgets i get an additional widget (decoupled from my application). It appears that vtk creates this window when i call the vtkRenderWindowInteractor::Initialize() function.<br>
<br>
So here is my pipeline:<br>
<br>
QVTKWidget *m_AxialWidget;<br>
m_Image = vtkImageData::New();<br>
m_ActorAxial = vtkActor::New();<br>
m_MapperAxial = vtkDataSetMapper::New();<br>
m_ExtractAxial = vtkImageClip::New();<br>
m_RendererAxial = vtkRenderer::New();<br>
m_WindowAxial = vtkRenderWindow::New();<br>
m_InteractorAxial = vtkRenderWindowInteractor::New();<br>
m_InteractionStyleAxial = new ViewerInteractor(this, m_RendererAxial); //my own interactor style<br>
<br>
m_InteractorAxial->SetInteractorStyle( m_InteractionStyleAxial );<br>
m_WindowAxial->SetInteractor( m_InteractorAxial );<br>
m_WindowAxial->AddRenderer( m_RendererAxial );<br>
m_ExtractAxial->SetInput( m_Image );<br>
(..) //configuring m_ExtractAxial<br>
m_ExtractAxial->Update();<br>
m_MapperAxial->SetInput( m_ExtractAxial->GetOutput() );<br>
m_ActorAxial->SetMapper( m_MapperAxial );<br>
m_RendererAxial->AddActor( m_ActorAxial );<br>
m_InteractorAxial->Initialize(); // <--------additional window appears<br>
m_AxialWidget->SetRenderWindow( m_WindowAxial );<br>
m_RendererAxial->ResetCamera();<br>
m_AxialWidget->update();<br>
<br>
<br>
How can i get rid of this window?<br>
<br>
Thanks a lot!!!<br>
<br>
-- <br>
Erik Tuerke<br>
Department of Neurophysics Max-Planck-Institute for Human Cognitive and Brain Sciences<br>
Stephanstrasse 1A<br>
04103 Leipzig<br>
Germany Tel: +49 341 99 40-2440<br>
Email: <a href="mailto:tuerke@cbs.mpg.de" target="_blank">tuerke@cbs.mpg.de</a><br>
<a href="http://www.cbs.mpg.de" target="_blank">www.cbs.mpg.de</a><br>
<br>
<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></div>