[vtkusers] Geometric object source examples

David Doria daviddoria+vtk at gmail.com
Sun Jan 3 15:24:11 EST 2010


Hi all,

In the "Geometric Objects" section of the examples
(http://www.cmake.org/Wiki/VTK/Examples#Geometric_Objects), you will
notice quite a bit of redundancy between the "Display" section and the
"Write to file" section. Let's take, for example, the Cube examples
(http://www.cmake.org/Wiki/Cube and
http://www.cmake.org/Wiki/VTK_Examples_Display_Cube). All of the
"Display X" examples are actually demonstrating how to use
vtkPolyDataMapper and setup a renderer/render window/interactor. It
seemed much more compact to make a version of the example (simply
"Cube" in this case) that did not have all of the display code, but
rather simply wrote the object (the cube) to a file. As we start to
move the wiki examples into the CVS, I think we should discuss this
redundancy and the advantages and disadvantages of having it or
removing it.

With redundancy (a "write to file" example AND a display example)
------------
* Display example - User can learn to use the vtk rendering classes at
the same time as using the object source. User can feel instantly
gratified by seeing a cube on the screen.
* Write to file example - user may not be interested in actually using
the VTK display functionality (which is the majority of the code in
Display Cube), but would like to ensure their object has been created
correctly so looking at the vtp file in paraview is the preferred
method.

Without redundancy (having only a Display Cube OR a "write to file Cube")
-----------------
* Fewer files (does this actually matter?)
?

I'd like to gather some feedback on whether people would like to see
one or both of these for all of the geometric object sources? If one,
which one and why?

Thanks,

David



More information about the vtkusers mailing list