I&#39;ve used the method to set an external advection field. So, although untested, its unlikely that its a bug. <br><br>Make sure that you sure&nbsp; you are setting the flag below in addition to setting the advection field<br>
<br>&nbsp; gac-&gt;AutoGenerateSpeedAdvectionOff()<br>&nbsp; gac-&gt;SetAdvectionField(....)<br><br>Note that this flag disables internal compuatation of both the advection and propagation terms. <br><br>That means that you will need to explicitly set the speed (propagation) image. You may call GenerateSpeedImage() or SetSpeedImage(..), if you have the speed image handy<br>

<br><br>-- <br>Karthik Krishnan<br>R&amp;D Engineer,<br>Kitware Inc.<br><br><div class="gmail_quote">On Fri, Feb 20, 2009 at 12:16 PM, Amardeep Singh <span dir="ltr">&lt;<a href="mailto:amar.singh@gmx.de">amar.singh@gmx.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dear ITK Users<br>
<br>
I think, I have found the reason of my problem and I would like to post my solution, in case others encounter the same situation.<br>
<br>
After digging through the code, it seems to me that the SetAdvectionImage() method does not have any effect on the GeodesicActiveContourLevelSetImageFilter. The advection image is always calculated from the feature image in the CalculateAdvectionImage() method of the filter, &nbsp;independently of having set an advection image before.<br>

Is this supposed to be the desired behaviour in all cases? I hacked the code and now use a flag in order to ensure that my own<br>
advection image is used, in case the SetAdvectionImage() function has been called. Everything works fine now and the level set locks to the inside of the ring.<br>
In case the SetAdvectionImage() is supposed to have an effect: Shall I file a bug report?<br>
Perhaps someone can comment on this.<br>
<br>
Best regards<br>
Amar<br>
<br>
<br>
Amardeep Singh wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Dear ITK Users,<br>
<br>
first of all, thank you very much, Luis, for answering my questions on the gradient vector flow (GVF). This<br>
really helped to lift some confusion. Unfortunately, I am stuck again with my experiments on (at the moment) synthetic images and so I would like to ask for the help of the mailing list.<br>
My scenario is the following:<br>
I am dealing with 2D images and consider a bright ring on a dark background. I use the ring as &nbsp;an edge map and<br>
calculate the gradient vector flow from it. I start with a circle that is inside of the ring and want to propagate it to the center of the ring by using the gradient vector flow as an advection term by using SetAdvectionImage.<br>

My speed image is 1 inside of the ring, 0 in the area of the ring and -1 outside so that the level set is simply guided by the advection term on the ring.<br>
My problem is that the level set locks to the outer border of the ring, not to its center, which is really confusing me.<br>
I know that deformable models are very sensitive to the parameter settings, but in my case I would think that this sensitivity should be a little less important as the speed image is 0 on the ring and only the advection term is important. I checked that the 0 isoline of the GVF is where I want it to be, in the middle of the ring.<br>

All images have direction cosines of a unit matrix.<br>
My parameters:<br>
GVF:<br>
noise level: 20000 (in order to get a very small time step)<br>
iterations: 500<br>
LevelSet:<br>
iterations: 1000<br>
RMS error: 0.01<br>
propagation scaling: 1<br>
curvature scaling: 0<br>
advection scaling: 1<br>
<br>
I would be very happy if anyone could shed light on the question why the circle does not lock to inside of the ring.<br>
I have attached my source code and all images.<br>
Thank you very much!<br>
<br>
Best regards<br>
Amar<br></div></div>
------------------------------------------------------------------------<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
 &nbsp;<br>
</blockquote>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br><br clear="all"><br>