[vtkusers] Problem with bugging additional window (QVTKWidget)

Erik Tuerke tuerke at cbs.mpg.de
Thu Nov 4 07:01:34 EDT 2010


Ashika Umanga Umagiliya wrote:
> Give this a try,
>
> Instead of creating a new vtkRenderWindow like,
> m_WindowAxial = vtkRenderWindow::New();
>
> use instance inside QVTKWidget:
>
> Like :
>
> m_WindowAxia=m_AxialWidget->GetRenderWindow();
>
>
>
>
>
>
> On 4 November 2010 19:14, Erik Tuerke <tuerke at cbs.mpg.de 
> <mailto:tuerke at cbs.mpg.de>> wrote:
>
>     Hi!
>
>     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.
>
>     So here is my pipeline:
>
>     QVTKWidget *m_AxialWidget;
>     m_Image = vtkImageData::New();
>     m_ActorAxial = vtkActor::New();
>     m_MapperAxial = vtkDataSetMapper::New();
>     m_ExtractAxial = vtkImageClip::New();
>     m_RendererAxial = vtkRenderer::New();
>     m_WindowAxial = vtkRenderWindow::New();
>     m_InteractorAxial = vtkRenderWindowInteractor::New();
>     m_InteractionStyleAxial = new ViewerInteractor(this,
>     m_RendererAxial); //my own interactor style
>
>     m_InteractorAxial->SetInteractorStyle( m_InteractionStyleAxial );
>     m_WindowAxial->SetInteractor( m_InteractorAxial );
>     m_WindowAxial->AddRenderer( m_RendererAxial );
>     m_ExtractAxial->SetInput( m_Image );
>     (..) //configuring m_ExtractAxial
>     m_ExtractAxial->Update();
>     m_MapperAxial->SetInput( m_ExtractAxial->GetOutput() );
>     m_ActorAxial->SetMapper( m_MapperAxial );
>     m_RendererAxial->AddActor( m_ActorAxial );
>     m_InteractorAxial->Initialize(); // <--------additional window appears
>     m_AxialWidget->SetRenderWindow( m_WindowAxial );
>     m_RendererAxial->ResetCamera();
>     m_AxialWidget->update();
>
>
>     How can i get rid of this window?
>
>     Thanks a lot!!!
>
>     -- 
>     Erik Tuerke
>     Department of Neurophysics Max-Planck-Institute for Human
>     Cognitive and Brain Sciences
>     Stephanstrasse 1A
>     04103 Leipzig
>     Germany Tel: +49 341 99 40-2440
>     Email: tuerke at cbs.mpg.de <mailto:tuerke at cbs.mpg.de>
>     www.cbs.mpg.de <http://www.cbs.mpg.de>
>
>
>     _______________________________________________
>     Powered by www.kitware.com <http://www.kitware.com>
>
>     Visit other Kitware open-source projects at
>     http://www.kitware.com/opensource/opensource.html
>
>     Please keep messages on-topic and check the VTK FAQ at:
>     http://www.vtk.org/Wiki/VTK_FAQ
>
>     Follow this link to subscribe/unsubscribe:
>     http://www.vtk.org/mailman/listinfo/vtkusers
>
>

Hi!

First thanks for your reply.

Replacing m_WindowAxial = vtkRenderWindow::New();
with
m_WindowAxia=m_AxialWidget->GetRenderWindow();
did not work. :-(

Unfortunately now the QVTKWidgets do not appear in the applications and 
the additional widgets show a very small image. :-(

Greetings!

-- 
Erik Tuerke
Department of Neurophysics 
Max-Planck-Institute for Human Cognitive and Brain Sciences
Stephanstrasse 1A
04103 Leipzig
Germany 
Tel: +49 341 99 40-2440
Email: tuerke at cbs.mpg.de
www.cbs.mpg.de





More information about the vtkusers mailing list