[Insight-users] Is it possible to overwrite $ComputeUpdate()$ in
itkLevelSetFunction?
ning qian
ningqian37 at hotmail.com
Wed Aug 23 10:51:38 EDT 2006
Hi, all,
I was trying to overwrite the virtual function $ComputeUpdate()$
defined in itkLevelSetFunction.h. The first step I did was just to
copy the definition and body of $ComputeUpdate()$ from
LevelSetFunction to my derived class. (Of course I make the
corresponding changes for the template part. ) It compiled fine but
when i ran the algorithm, I get the "segmentation fault" error?
I tried to print some debug messages and it appears that the error
was from the calculation of $gd$ structure. I just don't understand why
copying $ComputeUpdate$ from LevelSetFunction to the derived
class can cause this problem since the parameters to calculate $gd$
are all still initilized in LevelSetFunction. (am I right on this?) Also, if
I commented out the $ComputeUpdate$ part(definition and body)
for the derived class, the program runs fine.
What could be the problem? What should I do to get rid of it?
Thanks again for your time and help.
Best, Ning
More information about the Insight-users
mailing list