[vtkusers] vtkRendererSource and vtkRenderWindow.

Eloisa Bentivegna bentivegna at cct.lsu.edu
Mon Jun 21 07:38:59 EDT 2010


Hello,

I would like to visualize some data on the fly, by calling, from my 
scientific code, a C++ function with a VTK pipeline, ending in an image 
writer of some sort. In other words, I'd like to dump periodic 
visualization snapshots as soon as some data becomes available during 
the simulation.

So far, I've managed to write a pipeline where my data is used to 
populate a dataset, which is then visualized using scalar coloring. The 
problem occurs when I try to write an image with this visualization: for 
obvious reasons, I would like to have no interaction with any window 
manager (the code may be running remotely and through batch submission) 
- all I need is to have the renderings saved to images. I've found the 
vtkRendererSource class which seems to be doing what I'm looking for: 
connecting a renderer to an image writer such as, say, vtkJPEGEWriter. 
However, if I construct a pipeline:

vtkRenderer -> vtkRendererSource -> vtkJPEGWriter

without any mention to a vtkRenderWindow, I get an error from 
vtkRendererSource::RequestInformation saying that "The input renderer 
has not been set yet". If I do define a vtkRenderWindow, then this 
window will keep trying to pop up during the execution of my code. Any 
suggestions to avoid this?

Many thanks!
Eloisa



More information about the vtkusers mailing list