[Insight-developers] Image-based Testing in Tcl

Brad King brad . king at kitware . com
Wed, 4 Sep 2002 11:12:33 -0400 (EDT)


Hello, all:

Recently I've been working on image-based testing for ITK.  I've written a
Tcl test that uses a new DifferenceImageFilter to test the
CurvatureFlowImageFilter.  I generated a valid image and then changed the
number of iterations in the test to purposely fail.  The results of this
are available in an experimental dashboard submission:

http://www.itk.org/Testing/Sites/hythloth.kitwarein.com/Linux-2.4.18-c++/20020904-1439-Experimental/Results/__Testing_Code_Algorithms_itkCurvatureFlowTestTcl.html

There are some difference image statistics available at the bottom of the
test output:

  MeanDifference = The average pixel difference (absolute value).
  TotalDifference = The sum of all pixel differences.

The difference image has been scaled to the full 0-255 range to make it
easy to see, but the shift/scale parameters used for this adjustment are
displayed as

  DifferenceShift = The shift used to adjust the difference image.
  DifferenceScale = The scale used to adjust the difference image.

The test is in

Insight/Testing/Code/Algorithms/itkCurvatureFlowTestTcl.tcl

and the valid image is in

Insight/Testing/Data/Baseline/Algorithms/itkCurvatureFlowTestTcl.png

Please let me know if you have any suggestions.  Once the testing is
slightly more automated (to reduce per-test code duplication) I'll send
out instructions for writing an image-based test in Tcl.  We can also talk
about this on the next TCON.

-Brad