[vtkusers] Trying to understand data flow in the VTK pipeline

Ben Medina ben.medina at gmail.com
Tue Feb 23 19:42:57 EST 2010


Hello all,

I'm trying to understand how data flows in the VTK pipeline, in
particular with regard to file readers. My concern is that the
pipeline seems to force the reader to load more data from the file
than is necessary to create the plot.

Here's my reference pipeline for this discussion:

Reader -> vtkContourFilter -> vtkPolyDataMapper -> vtkActor

Where "Reader" is some type of file reader (vtkDataReader,
vtkFLUENTReader, etc.).

In my mind, this is how I hoped VTK would work:
1. An Update() request is sent upstream from the actor.
2. vtkContourFilter knows that it needs a certain amount of
information from the Reader (e.g. points and a scalar), so it requests
that information from the Reader.
3. The Reader loads just that data from the file. There may be much
more scalar and vector data in the file, but since no one has
requested it, it does not get loaded into memory.
4. vtkContourFilter completes, and the mapper and actor do their part
to get the plot rendered.

However, this does not seem to be the case. It seems that there is no
way to communicate to the Reader that only particular data is required
(and most readers seem to ignore the first parameter to RequestData
that I hoped could specify this). And the Readers seem to have no way
to "publish" what data is available, other than loading data into
memory in a vtkDataObject.

If this is the case, then what is the solution when VTK is used on
systems that can't load an entire data file into memory (but could
load enough of a subset of scalar data to create a visualization)?

Thanks,
Ben



More information about the vtkusers mailing list