[Insight-developers] Image-based Testing in Tcl
Lorensen, William E (Research)
lorensen@crd.ge.com
Wed, 4 Sep 2002 14:33:14 -0400
I'll look into add the functionality to the c++ tests.
Bill
-----Original Message-----
From: Brad King [mailto:brad.king@kitware.com]
Sent: Wednesday, September 04, 2002 1:45 PM
To: Miller, James V (Research)
Cc: Insight Developers; Ken Martin
Subject: RE: [Insight-developers] Image-based Testing in Tcl
> Do we need all that complexity in the DifferenceImage. The pixel
> shifting code in VTK's regression code was to get around the fact that
> OpenGL is not pixel specific. In ITK, we might be able to do a straight
> "difference".
I talked for a few minutes with Ken about this while designing it. We
decided it may be needed due to numeric instability on floating-point
algorithms. If the segmentation's boundary of an object is off by a pixel
due to a value bordering the threshold, the test should still pass.
It is up to the test to choose the threshold radius, and the default is
zero (for pixel-for-pixel matching).
> The other question is how do we want to measure the difference
> between two pixels. Grayscale images are not a problem. Color images
> should probably use a distance in Luv space. Vector images ????
Right now the DifferenceImageFilter assumes that this pixels have
operator- and operator< available. That pretty much restricts us to
scalar pixel types. However, the implementation can be extended to use a
"DifferencePixelTraits" class that can let us program the operations for
different pixel types.
> Also we might want to report "how many pixel differed" as opposed to the
> average "difference" between pixels.
This can be another piece of information collected by the inner loop and
reported as an ivar. Then different tests can report whatever is
appropriate.
> Can we provide this framework to the Cxx tests (so Tcl binding are not
> required)?
Tcl binding's are not required. It just happens that I used Tcl bindings
to experiment due to the quick development turnaround time. Once I've
found a good way to automate the testing process, I'll provide C++
equivalents.
However, I suggest that we implement new tests in Tcl because it will
encourage filter writers to add their classes to the Tcl bindings. Also,
I uncovered several problems with a variety of classes when I added them
to the Tcl bindings. When a method in a templated class is left
unimplemented, there is no way to tell unless there is an actual call to
the method. Not even explicit instantiation will catch it. The Tcl
bindings uncover these problems, as well as any problems that explicit
instantiation would normally uncover.
Finally, the itktcl executable can be distributed in binary form on a CD
to allow instantaneous usage of ITK. The more classes that can be used
this way, the better.
-Brad
_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers