[vtkusers] Off screen rendering problem

mathieu coursolle mcoursolle at gmail.com
Mon Mar 21 10:22:34 EST 2005


Hi,
I am currently using off screen rendering to export a vtk window to
a jpeg format. The window contains a 2d image and a color scale 
widget. The problem is that when the off screen rendering occurs,
the 2d image hides the color scale, while on screen the color
scale is over the image. The color scale text if however always
visible. Here is how I do it...Any idea on what's wrong???
Thanx a lot!

vtkRenderWindow* render_window = m_Window->GetRenderingWindow();
render_window->OffScreenRenderingOn();
            
vtkWindowToImageFilter* filter = vtkWindowToImageFilter::New();
filter->SetInput(render_window);
            
vtkImageWriter* writer = vtkJPEGWriter::New();
writer->SetInput(filter->GetOutput());
writer->SetFileName(filename);

render_window->Render();
filter->Modified();
writer->Write();

render_window->OffScreenRenderingOff();



More information about the vtkusers mailing list