[vtk-developers] Examples Guidelines

Bill Lorensen bill.lorensen at gmail.com
Sun Dec 20 17:11:39 EST 2009


Folks,

In preparation for a major upgrade to the VTK/Examples (both on the
wiki and repository), I've started to generate an Examples guideline
page on the wiki:
http://www.vtk.org/Wiki/VTK/Examples/GuideLines

Suggestions/comments are welcome.

I've also been working on a mechanism for building and regression
testing the examples once they migrate to the VTK repository. This
mechanism uses the vtkTesting framework to regression test examples
without changing the examples code. It uses a vtkTestingObjectFactory
and the vtk factory facility to override the Start() method of
vtkRenderWindowInteractor. This override allows interactive examples
to exit with code modification. It also grabs the screen and compares
the result to a  baseline image in VTKData/Baseline.

I've tested this locally on about a 1/2 dozen examples.

The factory code is checked in:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/vtkTestingObjectFactory.cxx?view=log
http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/vtkTestingObjectFactory.h?view=log

This .cmake file contains the magic mojo to integrate the factory with
the existing testing framework:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/vtkTestingObjectFactory.cmake?view=log

The changes to the CMakeLists.txt files re not checked in yet.

Still some refining to do, we're getting close.

Thanks to Dave Dorria for the moivation (and most of the examples work),

Bill



More information about the vtk-developers mailing list