Hi Hui,<br><br>I am curious, how large is your input image?<br>What&#39;s the ratio: radius / max( spacing[i] ) ?<br><br>Anyway, to generate a signed distance image, there are other files more efficient than the fast marching (as Steven suggested).<br>

<br>Thanks for your reply,<br>Arnaud<br><br><div class="gmail_quote">On Fri, Feb 24, 2012 at 10:37 AM, Hui Tang <span dir="ltr">&lt;<a href="mailto:tanghui.seu@gmail.com">tanghui.seu@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Dan,<div><br></div><div>Thanks for reply! It is in release mode, but I need to wait for 4-5 mins to generate s distance map from one point, if I increase number of points to 50, I need 3 hours or so, so I guess it is not because of debug/release version .......................</div>


<div>But I will try Steven&#39;s suggestion!</div><div><br></div><div>Thanks you all again!</div><div><br></div><div>Best,</div><div><br></div><div>Hui<br><br><div class="gmail_quote">On Thu, Feb 23, 2012 at 10:38 PM, Dan Mueller <span dir="ltr">&lt;<a href="mailto:dan.muel@gmail.com" target="_blank">dan.muel@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Hui,<br>
<br>
Also make sure you are compiling your program in Release mode -- this<br>
can improve performance by one or two orders of magnitude.<br>
<br>
Cheers, Dan<br>
<div><div><br>
On 24 February 2012 03:44, Hui Tang &lt;<a href="mailto:tanghui.seu@gmail.com" target="_blank">tanghui.seu@gmail.com</a>&gt; wrote:<br>
&gt; Hi All,<br>
&gt;<br>
&gt; I am using itkFastMarchingImageFilter to create a distance map to a set of<br>
&gt; points, this seems like a very basic usage of ITK<br>
&gt;<br>
&gt; //GetNodes<br>
&gt;   seeds-&gt;Initialize();<br>
&gt;   for (int i=0;i&lt;seedPoints.size();i++)<br>
&gt;   {<br>
&gt;    ImageType::IndexType seedIndex;<br>
&gt;         input-&gt;TransformPhysicalPointToIndex( seedPoints[i],seedIndex);<br>
&gt; NodeType node;<br>
&gt; const double seedValue = 0.0;<br>
&gt; node.SetValue( seedValue );<br>
&gt; node.SetIndex( seedIndex );<br>
&gt; seeds-&gt;InsertElement( i, node );<br>
&gt;   }<br>
&gt; //execute fast marching<br>
&gt;   FastMarchingFilterType::Pointer fastMarching =<br>
&gt; FastMarchingFilterType::New();<br>
&gt;   fastMarching-&gt;SetInput( input);<br>
&gt;   fastMarching-&gt;SetTrialPoints(seeds);<br>
&gt;   fastMarching-&gt;SetStoppingValue(2*radius);<br>
&gt;   fastMarching-&gt;SetSpeedConstant(1);<br>
&gt;   fastMarching-&gt;SetNormalizationFactor(1);<br>
&gt;   fastMarching-&gt;SetOutputSize( input-&gt;GetBufferedRegion().GetSize() );<br>
&gt;   fastMarching-&gt;Update();<br>
&gt;<br>
&gt; This works,but it is extremely slow......I think something went wrong but I<br>
&gt; do not know where.<br>
&gt;<br>
&gt; May I ask did anyne of you also find out this problem?<br>
&gt;<br>
&gt; Thanks a lot!<br>
&gt;<br>
&gt; Best,<br>
&gt;<br>
&gt; Hui<br>
&gt;<br>
</div></div><div><div>&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
</div></div></blockquote></div><br></div>
<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>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<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>
<br></blockquote></div><br><br clear="all"><br>-- <br><span><font color="#888888">Arnaud Gelas, Ph. D.<br>Avenue Beauregard 30<br>CH-1700 Fribourg<br>Switzerland<br>cellphone: (+41) 76-635-08-66<br>phone: (+41) 26-535-44-36<br>


<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@gmail.com</a></font></span><br>