[Insight-developers] Problems with
CannySegmentationLevelSetImageFilter.cxx example
Zachary Pincus
zpincus at stanford.edu
Wed Feb 16 15:40:09 EST 2005
Hello,
As long as the Canny level sets stuff is on my mind, I've noticed a few
deceptive problems with the CannySegmentationLevelSetImageFilter.cxx
example code and the ITK software guide.
First, the input level set is positive-inside, which is at variance
with most of the other level set examples. This does not manifest as a
problem, though, because in the example the propagation scaling is set
to zero, so you don't see the inside shrinking where it should be
expanding. To be fully correct, and work properly for the case where
the user sets a nonzero propagation scaling,
ReverseExpansionDirectionOn() should be called.
Second, you might be wondering why this example works, given the
problems I've reported about the Canny level set implementation.
Basically the answer is that the Canny edge parameters aren't set quite
right, so too many edges get found in the image. This plethora of edges
basically locks the level set in place (by pushing it away from every
edge), so not too much damage gets done.
If you set the Canny edge detection parameters more appropriately
(threshold 10, variance 1) and inspect the resulting speed image,
you'll see that it is much more smooth, and the ventricle edges are
clearly present. This is not the case for the Canny parameters as given
(threshold 7, variance 0.1). However, with the Canny edge parameters
set properly, the bug in CannySegmentationLevelSetFunction.txx becomes
apparent and you see the level set shrink to nothing. (I can post
movies of this if you like.)
So, to fix the example and make the software guide more correct, these
parameters need to be fixed, and ReverseExpansionDirectionOn() should
be called and explained. I'd be happy to make these changes if people
agree with me.
Zach Pincus
Department of Biochemistry and Program in Biomedical Informatics
Stanford University School of Medicine
More information about the Insight-developers
mailing list