[vtkusers] Question about vtkRenderWindowInteractor

berk.geveci at kitware.com berk.geveci at kitware.com
Tue Dec 12 19:26:42 EST 2000


	Professor Biondini,

	You are not doing anything wrong. From the behaviour
	you are describing, I conclude that you are using 
	vtk on a Unix/Linux system. This is a problem that
	was fixed some time ago. The default exit callback
	used to call Exit() and would quit without calling
	the code after vtkRenderWindowInteractor::Start().
	This is not the case anymore.
	I recommend downloading a nightly release from vtk's
	web site. This should fix your problem.

	Berk

On Tue, 12 Dec 2000, Mario E. Biondini wrote:

> 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
> ________________________________________
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> 





More information about the vtkusers mailing list