[vtkusers] Problem with bugging additional window (QVTKWidget)
Ashika Umanga Umagiliya
aumanga at biggjapan.com
Thu Nov 4 06:20:08 EDT 2010
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> 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
> www.cbs.mpg.de
>
>
> _______________________________________________
> Powered by 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101104/dcf17c51/attachment.htm>
More information about the vtkusers
mailing list