<div class="moz-text-flowed" style="font-family: -moz-fixed; font-size: 12px;" lang="x-unicode">Thanks for the clarifying reply. I want to ask one more thing about 
curvature-based term. just think of a sphere whose mean curvature should 
be a constant. If I only use the curvature term in that equation and 
start the level set front to evolve will it expand or shrink without 
stopping. In order to stop the evolution is it common to weight the 
curvature with some stopping criteria to get the Z(x) in that equation, 
or do I miss something?
<br>thanks a lot again.
<br>
<br>Burak
<br>
<br>Luca Antiga wrote:
<br><blockquote type="cite">Hi Burak,
<br>
<br><blockquote type="cite">I think
<br>m_AdvectionImage = A(x);
<br>PropagationSpeed = P(x);
<br>CurvatureSpeed = Z(x);
<br></blockquote>correct
<br>
<br><blockquote type="cite">1- According to my understand the m_SpeedImage is expected to be 
calculated from the m_FeatureImage in a desired fashion. that&#39;s why 
it is not implemented. However I can not find the connection of this 
m_SpeedImage with the A, P, Z terms?
<br></blockquote>The itk::SegmentationLevelSetFunction is the superclass of all actual 
level set functions (see dependency graph here 
<a class="moz-txt-link-freetext" href="http://public.kitware.com/Insight/Doxygen/html/classitk_1_1SegmentationLevelSetFunction.html">http://public.kitware.com/Insight/Doxygen/html/classitk_1_1SegmentationLevelSetFunction.html
</a>). 

<br>You have to look at the derived classes for the actual calculations of 
the scalar and vector fields.
<br>For instance, in itk::GeodesicActiveContourLevelSetFunction the speed 
image is computed as the feature image itself,
<br>and the advection image is generated using either centered finite 
differences or Gaussian derivative convolution.
<br>These are not the only possibilities, just take a look at the various 
derived classes.
<br>
<br><blockquote type="cite">2- How Z is calculated, I could not find anything about it also?
<br>3- According to Osher&#39;s Level Set Methods book the right hand side of 
the equation
<br><a class="moz-txt-link-freetext" href="http://www.itk.org/Doxygen32/html/form_149.png">http://www.itk.org/Doxygen32/html/form_149.png</a>
<br>should be calculated by using center differences. Is it implemented 
like that?
<br></blockquote>
<br>The computation of the curvature term (actually, the curvature terms) 
is implemented in the itk::LevelSetFunction class
<br>using centered finite differences. Z is what is called 
&quot;CurvatureSpeed&quot;, which defaults to 1 in itk::LevelSetFunction,
<br>while it is set equal to PropagationSpeed in 
itk::GeodesicActiveContourLevelSetFunction.
<br>
<br><blockquote type="cite">4- Are the magnitude of the gradients of Phi same for the right and 
left side of that equation? (since the left side should use the 
upwind methods where the right side should use center differences)
<br></blockquote>Actually, I think that curvature has to be computed with centered 
finite differences, while |\grad \phi| has to be computed with upwind 
finite differences both for left and right hand sides of the equation, 
since what you are doing is advecting the level sets in both cases. 
What changes is the scaling term, which is equal to the propagation in 
one case and depends on the level set curvature (computed with 
centered finite differences) in the other.
<br>
<br>Hope it helped
<br>
<br>Luca
<br>
<br>
<br>
<br>--&nbsp;<br>Luca Antiga, PhD
<br>Head, Medical Imaging Unit,
<br>Bioengineering Department,
<br>Mario Negri Institute
<br>email: <a class="moz-txt-link-abbreviated" href="mailto:antiga@marionegri.it">antiga@marionegri.it</a>
<br>web: <a class="moz-txt-link-freetext" href="http://villacamozzi.marionegri.it/%7Eluca">http://villacamozzi.marionegri.it/~luca</a>
<br>mail: Villa Camozzi, 24020, Ranica (BG), Italy
<br>phone: +39 035 4535-381
<br>
<br>
<br>
<br>On Sep 11, 2007, at 12:44 PM, Burak Özkalaycý wrote:
<br>
<br><blockquote type="cite">Dear all,
<br>
<br>I am a little bit confused about the level set implementation in ITK.
<br>my questions are according to
<br>
<br><a class="moz-txt-link-freetext" href="http://www.itk.org/Doxygen32/html/itkLevelSetFunction_8h.html">http://www.itk.org/Doxygen32/html/itkLevelSetFunction_8h.html</a> and
<br><a class="moz-txt-link-freetext" href="http://www.itk.org/Doxygen32/html/itkSegmentationLevelSetFunction_8h.html">http://www.itk.org/Doxygen32/html/itkSegmentationLevelSetFunction_8h.html</a> 

<br>
<br>There exist m_FeatureImage, m_SpeedImage, m_AdvectionImage, 
PropagationSpeed, CurvatureSpeed. The levelset function to be solved 
is given as :
<br>
<br><a class="moz-txt-link-freetext" href="http://www.itk.org/Doxygen32/html/form_149.png">http://www.itk.org/Doxygen32/html/form_149.png</a>
<br>
<br>I think
<br>m_AdvectionImage = A(x);
<br>PropagationSpeed = P(x);
<br>CurvatureSpeed = Z(x);
<br>
<br>1- According to my understand the m_SpeedImage is expected to be 
calculated from the m_FeatureImage in a desired fashion. that&#39;s why 
it is not implemented. However I can not find the connection of this 
m_SpeedImage with the A, P, Z terms?
<br>2- How Z is calculated, I could not find anything about it also?
<br>3- According to Osher&#39;s Level Set Methods book the right hand side of 
the equation
<br><a class="moz-txt-link-freetext" href="http://www.itk.org/Doxygen32/html/form_149.png">http://www.itk.org/Doxygen32/html/form_149.png</a>
<br>should be calculated by using center differences. Is it implemented 
like that?
<br>4- Are the magnitude of the gradients of Phi same for the right and 
left side of that equation? (since the left side should use the 
upwind methods where the right side should use center differences)
<br>
<br>If anyone can answer my implementation and theory based questions I 
will be so glad. And also any reference to headers or sources are 
welcome.
<br>
<br>Thank you in advance
<br>
<br>Burak
<br>
<br>
<br>
<br>Burak Ozkalayci &lt; <a class="moz-txt-link-abbreviated" href="mailto:burak.ozkalayci@UGent.be">burak.ozkalayci@UGent.be</a>&gt;
<br>PhD Student
<br>Electronic and Information Systems (ELIS-MEDISIP)
<br>Ghent University Hospital - IBITECH
<br>_______________________________________________
<br>Insight-users mailing list
<br><a class="moz-txt-link-abbreviated" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>
<br><a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
<br></blockquote></blockquote></div>

<table class="moz-vcard-table"> <tbody><tr> <td valign="top"> <br></td><td> <table id="moz-vcard-properties-table"> <tbody><tr> <td class="moz-vcard-title-property"> Burak Ozkalayci&nbsp;&lt;<a href="mailto:burak.ozkalayci@UGent.be">
burak.ozkalayci@UGent.be</a>&gt;</td> </tr> <tr> <td class="moz-vcard-property">PhD Student</td> </tr> <tr> <td class="moz-vcard-property">Electronic and Information Systems (ELIS-MEDISIP)</td> </tr> <tr> <td class="moz-vcard-property">
Ghent University Hospital - IBITECH</td> </tr> </tbody></table> </td> </tr> </tbody></table>