[Insight-users] Mean Curvature Calculation in Level Set

Sah Rayman sahrayman at yahoo . com
Sun, 16 Nov 2003 20:34:15 -0800 (PST)


A related question: when I implement
ComputeMeanCurvature() in class MyLevelSetFunction.txx

If I write as
ComputeMeanCurvature(const NeighborhoodType
&itkNotUse(neighborhood), ...)
as it is in itkLevelSetFunction.txx, I will get a lot
syntax error (VC 6.0), and I have to write as
ComputeMeanCurvature(const NeighborhoodType
&neighborhood, ...)

I checked the definition of itkNotUse(x), it is a
macro to nothing, (#define itkNotUse(x) )

Then how come in itkLevelSetFunction.txx there is no
syntax error?







--- Sah Rayman <sahrayman at yahoo . com> wrote:
> I am now 90% sure that this is a bug of
> itkLevelSetFunction.txx as of ITK 1.4.
> 
> I rewrote my ComputeMeanCurvature() in my derived
> LevelSetFunction class, and the segmentation result
> makes more sense. 
> 
> My fix:
> move line "curvature_term -= gd->m_dx[i] *
> gd->m_dx[j]
> * gd->m_dxy[i][j];"
> to the inner of "if( j!=i) ".
> 
> Author of the file, if you're interested in more
> details, please write to me.
> 
> 
> 
> --- Sah Rayman <sahrayman at yahoo . com> wrote:
> > I am looking at function:
> > 
> > template <class TImageType>
> > typename
> > LevelSetFunction<TImageType>::ScalarValueType
> >
> LevelSetFunction<TImageType>::ComputeMeanCurvature()
> > 
> > in itkLevelSetFunction.txx, line 158 (ITK 1.4)
> > 
> > When I compared that to Sethian's "Level Set
> Methods
> > and Fast Marching Methods", 2ndEd, pp. 70, Eq.
> 6.36,
> > I
> > found that the C++ implementation contain some
> extra
> > terms in nominator:
> > 
> > -dx[0]*dx[0]*dxy[0][0]-dx[1]*dx[1]*dxy[1][1]-...
> > 
> > Can someone tell me what are these additional
> terms
> > for? Is the result still mean curvature? Any
> > reference
> > for that?
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Protect your identity with Yahoo! Mail
> AddressGuard
> > http://antispam . yahoo . com/whatsnewfree
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk . org
> > http://www . itk . org/mailman/listinfo/insight-users
> 
> 
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam . yahoo . com/whatsnewfree
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam . yahoo . com/whatsnewfree