[vtkusers] Offscreen rendering (win32)
Janny Dong
janny.dong at gmail.com
Mon Jun 11 11:11:52 EDT 2007
Hi, Dov,
I am using offscreen rendering without problem. In my code theres something
like
renWin->SetOffScreenRendering(1);
The input to vtkJPEGWriter should be
writeJPEG->SetInputConnection(w2if->GetOutput() );
Janny
On 6/11/07, Dov Mayzlish <dov.mayzlish at philips.com> wrote:
>
>
> Hi,
>
>
> In win32 OS, vtk version 5.0.3 I'm trying to create an offscreen rendered
> image, and get a black image (when onscreen the actor appears perfect).
>
> My code is similar to this:
>
> vtkRenderer *ren1 = vtkRenderer::New();
> ren1->AddActor(actor);
> vtkRenderWindow *renWin = vtkRenderWindow::New();
> renWin->OffScreenRenderingOn();
> renWin->AddRenderer(ren1);
> renWin->Render();
>
> vtkWindowToImageFilter *w2if = vtkWindowToImageFilter::New();
> w2if->SetInput( renWin);
>
> vtkJPEGWriter *writeJPEG = vtkJPEGWriter::New();
> writeJPEG->SetInput (w2if->GetOutput() );
> writeJPEG->SetQuality(100);
> writeJPEG->SetFileName("out.jpg");
> writeJPEG->ProgressiveOff();
> writeJPEG->Write();
>
> Can anyone help with ideas?
>
> Thanks,
> Dov
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070611/fa4614ae/attachment.htm>
More information about the vtkusers
mailing list