[vtk-developers] vtkReader Help

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu May 12 15:17:00 EDT 2005


Brian Dotson wrote:
> Hi all,
> 
> Our CFD group at our lab would like to view their CFD results within
> Paraview.  I wrote a translator to convert their CFD results to the VTK
> file format, and that has been working pretty well, but they would
> prefer that we write a vtkReader for their results, so they don't have
> to translate everything.
> 
> I would like a little advice before I get started.
> 
> The output of the CFD simulation is an unstructured grid, and is stored
> in a single file.  The results are also transient, and they are not
> stored in a series of files.  One file may contain a 1000 timesteps.

A good example of class you can start reading is:

vtkGAMBITReader at:

http://www.vtk.org/doc/nightly/html/classvtkGAMBITReader.html

This should gives you the basic structure for a proper reader. Once you 
get it working for a dataset with no timestep...then come the fun :)

If you are in a hurry you might want to start reading class like:

vtkExtractDataOverTime at
http://www.vtk.org/doc/nightly/html/classvtkExtractDataOverTime.html

Which will show you how to play with TIME_STEPS/UPDATE_TIME_INDEX so 
that you can fully support dataset with timesteps.


As a side note in the next couple of weeks VTK will support TimeStep via 
there vtkXML* reader so you might want to wait a little.

My 2 cents
Mathieu



More information about the vtk-developers mailing list