[vtkusers] I think this is the problem......

Goodwin Lawlor goodwin.lawlor at ucd.ie
Thu Mar 18 13:19:39 EST 2004


Hi Jim,

I agree with Joey- it would be impracticle to have a step-by-step guide
to every possible pipeline (or pipeline type) in VTK. A wiki would be a
good way to have a stab at it though...

If you're relying on the online documentation to learn VTK I'm not
surprised you're frustrated. Its really just a quick reference for class
methods and properties. The user guide only really talks you though
examples.

To learn the theory/concept of VTK you have to get the VTK textbook.

The best way to learn VTK is to look at and run the example tcl (or
python) scripts. Then start editing them and seeing the affects.

One good thing about open source software is that the source code itself
is documentation... Do a string search for a class name in the source
tree to see how the developers used the class. There are also some
comments in the .cxx files that may be helpful.

Also it may help to prototype your pipeline in tcl before you starting
coding in c++... Its much quicker to edit and run scripts.

One area where I found a derth of information is managing VTK pipelines
inside an application and what the correct way to do this. You may know
MFC or tcl/tk and know VTK well but putting them together....

Just on your mapper questions:

One rule of thumb: 
vtkUnstructuedGrid/vtkStructuredGrid... Use vtkDataSetMapper
vtkPolyDataMapper... Use vtkPolyDataMapper

If fact you can think of vtkDataSetMapper as a helper class that
contains a vtkPolyDataMapper and a vtkDataSetSurfaceFilter. Inside
vtkDataSetMapper, vtkDataSetSurfaceFilter extracts cells for the
internal instance of vtkPolyDataMapper. Why do this? vtkPolyDataMapper
is the interface to OpenGL... A vtkUnstructuredGrid contains (3d) cells
that OpenGL doesn't recognise so in order to render a hex, it must be
broken down into its constituent quads which OpenGL can render.

So...

vtkUnstructuredGrid->vtkDataSetMapper-> is the same as
vtkUnstructuredGrid->vtkDataSetSurfaceFilter->vtkPolyDataMapper->

vtkDataSetSurfaceFilter is a quicker version of vtkGeometryFilter. As
far as I can remember, vtkDataSetMapper used to contain
vtkGeometryFilter instead.

Hope this helps... If the birth of a good wiki is the product of you
frustrations then they wont have been in vain!

Goodwin




More information about the vtkusers mailing list