[vtk-developers] VTK Examples and Wiki Strawman

Bill Lorensen bill.lorensen at gmail.com
Tue Dec 15 12:32:18 EST 2009


Folks,

As a test, I've added 4 of the VTK wiki examples to the VTK/Examples/
cvs repository. On the wiki I used a naming convention that directly
maps into the repository tree structure.

Take a look and please comment:
http://www.vtk.org/Wiki/VTK/Examples/Widgets/Cxx/Slider
http://www.vtk.org/Wiki/VTK/Examples/Widgets/Cxx/Slider2D
http://www.vtk.org/Wiki/VTK/Examples/Medical/Cxx/GenerateModelsFromLabels
http://www.vtk.org/Wiki/VTK/Examples/Medical/Cxx/GenerateCubesFromLabels

Provide feedback before we start to move more examples into the vtk repository.

As a caveat, I estimate it takes a minimum of an hour to take an
existing, working example on the wiki and move it into the repository.
If the example is not working or incorrect in another way, the time
can be much longer.

Here is the process I used for these 4 sample pages:

1) Decide where the example should reside in VTK/Examples
2) Copy the example from the wiki into VTK/Examples
3) Edit it for acceptable VTK style. This includes indentation and
using SmartPointer when possible.
4) Remove any non-portable code.
5) Replace std::cout, etc. with cout, etc.
6) Replace std::string,vector, ... to vtkstd::string, vector...
7) Modify the CMakeLists.txt file
8) Build and run the example, adjusting the code so the results are informative
9) Check comments and add more if the example need them.
10) Check in the example and modified CMakeLists.txt file.
11) Move (rename) the wiki page to correspond to its location in the repository.
12) Add the link to the repository.
13) Download the repository version and replace the old example text
with the repository version.
14) Check the continuous dashboard for troubles during the day.
15) The next day, check the dashboard for errors/warnings. For
example, today, two of my examples had warnings that needed attention.

Looking back at the process, one hour is a very conservative estimate.

Issues:
1) Synchronization between the wiki and cvs source is manual. It looks
as though some folks are investigatying a solution.
2) VTK/Examples are compiled if (BUILD_EXAMPLES is ON), not run. In
the future we should regression test the results, but that is way
beyond the scope of this initial effort.

Bill



More information about the vtk-developers mailing list