[vtkusers] vtkRenderLargeImage and multiple renders

Gerrick Bivins gbivins at objectreservoir.com
Tue Jul 29 15:59:47 EDT 2008


Hello,
I've been using vtkRenderLargeImage to obtain hi-res screen caps from my
app.
I ran into a problem when I added a second vtkRenderer to my renderer
window, the output image is split into "n" images with the second renderer's
actor incorrectly split across the images. For instance, I added a
vtkXYPlotActor to a second renderer and here are the comparative results. 
Single renderer:
http://www.nabble.com/file/p18720160/test-single-renderer.jpg 

Two renderers with XYPlot:
http://www.nabble.com/file/p18720160/test-two-renderers.jpg 

Here's my image capture code:
public void captureImage(String fileName )
    {
     
       //This produces errors 
       vtkRenderLargeImage hiRes = new vtkRenderLargeImage();
       hiRes.SetInput(vtkWindow.getRenderWindow().GetRenderer());
       hiRes.SetMagnification(4);
      
      /*This works
      vtkWindowToImageFilter imageCapture = new vtkWindowToImageFilter();
       imageCapture.SetInput(
vtkWindow.getRenderWindow().GetRenderWindow());
       imageCapture.Update();*/

       vtkJPEGWriter jpgWriter = new vtkJPEGWriter();
       //jpgWriter.SetInputConnection( imageCapture.GetOutputPort() );

       jpgWriter.SetInputConnection( hiRes.GetOutputPort() );
       jpgWriter.SetFileName( fileName );
       jpgWriter.SetQuality(100);
       jpgWriter.ProgressiveOn();
       jpgWriter.Write();

    }

Is this a bug or am I doing something incorrectly?
Thanks,
Gerrick
-- 
View this message in context: http://www.nabble.com/vtkRenderLargeImage-and-multiple-renders-tp18720160p18720160.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list