[vtkusers] Question about vtkRenderWindowInteractor

Mario E. Biondini Mario_Biondini at ndsu.nodak.edu
Tue Dec 12 17:50:15 EST 2000


I have the following problem:

I would like to manipulate an image on screen (mainly rotate) using
vtkRenderWindowInteractor and then after manipulation save the image to
a file. For that purpose I do the following
....
....
renWin->Render();
SAVEIMAGE (renWin);

iren->Start();

// Write Image to file

vtkRendererSource *renSrc = vtkRendererSource::New();
 renSrc->SetInput(ren1);
 renSrc->WholeWindowOn();

vtkBMPWriter *writer = vtkBMPWriter::New();
 writer->SetInput(renSrc->GetOutput());
 writer->SetFileName("out.bmp");
 writer->Write();

....
....

The problem is that after I interact with the image to make it look the
way I want it and proceed to type "q" to get out of the interaction
mode, the program terminates without writing the image to file. Needless
to say that if I put the commands for writing the image to file before
iren->Start() it works but I get the image as it was prior to my
interactions with it. So what I am doing wrong!!!
_____________________________________

Mario E. Biondini
Professor
Department of Animal and Range Sciences
North Dakota State University
Fargo, ND 58105
Phone: (701) 231-8208
Fax: (701) 231-7590
e-mail: Mario_Biondini at ndsu.nodak.edu
http://www.ndsu.nodak.edu/instruct/biondini/vita/mebvita.htm
________________________________________




More information about the vtkusers mailing list