[vtkusers] Help with vtkWindowToImageFilter
Berk Geveci
berk.geveci at kitware.com
Fri Apr 26 16:08:21 EDT 2002
The input to the filter is the render window not it's output
(which does not exist). Using
w2if->SetInput(renWin);
instead of
w2if->SetInput(renWin->GetOutput());
should fix your problem.
-Berk
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());
>
> 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
More information about the vtkusers
mailing list