[vtkusers] How to open multiple VTK windows at once?
Maxima Mustermann
Maxima.M at gmx.de
Thu Aug 20 06:11:53 EDT 2009
Hi,
I want to show 2 images at once in 2 separate windows but that does not seem to be possible.
When I open the first viewer, the interactor takes control over the program and the other viewer opens only when I have closed the first one.
To be true, I don't really need an interactor (I only want to show the image), but without interactor the window disappears immediately.
My code:
vtkImageViewer2* viewerA = vtkImageViewer2::New();
vtkRenderWindowInteractor* interactorA = vtkRenderWindowInteractor::New();
viewerA->SetupInteractor(interactorA);
vtkImageViewer2* viewerB = vtkImageViewer2::New();
vtkRenderWindowInteractor* interactorB = vtkRenderWindowInteractor::New();
viewerB->SetupInteractor(interactorB);
viewerA->SetInput(imageA);
viewerB->SetInput(imageB);
viewerA->Render();
interactorA->Start();
viewerB->Render();
interactorB->Start();
This is a *very* simple problem, but I did not found a corresponding topic in the FAQ or the mailing list.
I want to keep my code as simple as possible, so if there is a way I would prefer to do it without the use of additional GUI toolkits.
Thank you very much.
--
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
More information about the vtkusers
mailing list