[vtkusers] Help with vtkWindowToImageFilter

Andy Cedilnik andy.cedilnik at kitware.com
Fri Apr 26 15:57:30 EDT 2002


On Fri, 2002-04-26 at 15:51, Michael Györffy wrote:
> Hello:
> 	I'm a new user and am trying to save images from generated
> PolyData.
> Through the excellent help I've received from this forum (Thank you) I'm
> trying to take the screenshot and convert it to ImageData using
> vtkWindowToImageFilter.
> 	 I get an error of:"no matching function for call
> to
> `vtkRenderWindow::GetOutput ()'".
> 	I don't understand why this doesn't work, but works in examples
> such as OffScreenCone.tcl.
> 
> 	Briefly, the layout of my program is:
> 		PolyDataReader
> 		PolyDataMapper
> 		Actor
> 		Renderer
> 		Renderwindow
> then I use the following:
> 	vtkWindowToImageFilter *w2if = vtkWindowToImageFilter::New();
>   		w2if->SetInput(renWin->GetOutput());

This should be:

   		w2if->SetInput(renWin);

Input to w2if is window.

> 
> 	vtkPNMWriter *pnmwriter=vtkPNMWriter::New();
>   		pnmwriter->SetInput(w2if->GetOutput());
> 		pnmwriter->SetFileName("3Dimagedata.pnm");
>   		pnmwriter->Write();
> 	Any suggestions would be very much appreciated.
> Thanks,
> 
> Mike
> 
> 
> _______________________________________________
> 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
> 


				Andy Cedilnik




More information about the vtkusers mailing list