[vtkusers] Closing vtkwindow with interactor

ChiaWeng Boon chiaweng at gmail.com
Fri Nov 12 09:52:19 EST 2010


Hi,

I have created a vtkRenderWindowInteractor.  To stop the interactor
from working further, I can type 'e' or 'q'.   But after that I cannot
close the RenderWindow.

ren1 = vtkRenderer::New();
renWin = vtkRenderWindow::New();
renWin->AddRenderer(ren1);
iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
ren1->AddActor(contActor);
ren1->SetBackground(1,1,1); // Background color white
renWin->Render();
iren->Start();

After I am done, I press 'e'.  Then I call python to run:
iren->GetRenderWindow()->Finalize();  This does not work.  Everything
works fine when I do not have the interactor, i.e., the renderWindow
closes nicely.  I hope someone can help me out.

Boon



More information about the vtkusers mailing list