[vtkusers] using generic datasets with VTK

David C. Thompson dcthomp at sandia.gov
Thu Jun 2 18:44:13 EDT 2005

> It is my understanding that in the development version of VTK, there
> is a framework that allows one to adapt generic datasets for use with
> VTK.
> I am currently working on a project in which I have access to a
> dataset whose API incompatible with VTK's.  We would like to create an
> Adapter that looks like a vtkDataSet, but  will forward requests for
> point data to our API (so that we can use VTK's rendering algorithms
> with our database).
> I'm farily new to VTK...  What is the best way to get started learning
> how to use the Adapter framework?
The Filtering/vtkGeneric{DataSet,AdaptorCell,...} classes are intended
to serve as an abstraction for higher order finite element meshes. If
your mesh is composed of linear cells, you are probably better off
writing your own subclass of vtkDataSet. 

>   Is there any example code that
> might help?  Or is this still "bleeding edge" stuff? :-)
If there is a really good reason to put up with the overhead of
vtkGenericDataSet, you can take a look in the
GenericFiltering/Testing/Cxx directory for a simple implementation of
the API used for testing: vtkBridge{DataSet,Cell,...}.

	Hope this helps,

More information about the vtkusers mailing list