Hi all, maybe it is much easier to just use VMTK, there are several papers describing that tool, including TMI, and it has a very theoretical definition of centerline from segmented surface. it is easy to use, you do not need to give any speed functions, you only need to give two seed points (or they can be  automatically taken as cap centers).  Just download, compile, then similar to ITK, VTK, write a wrapper, if you do not want to write a wrapper, there are already quite a lot of python wrappers, just grap one,play with it.<div>
Anyway I would strongly recommend VMTK. <br><div><br><div class="gmail_quote">On Tue, Apr 10, 2012 at 1:13 PM, Sergio Vera <span dir="ltr">&lt;<a href="mailto:sergio.vera@alma3d.com">sergio.vera@alma3d.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Would the ridges of the Distance map  work as  good speed image?<div>Other than being close to 1 near the centerline. Perhaps the averagw outward flux of the distance map (~= risges of the distance map) , normalized properly top 0-1 would do the trick.<div>
<div class="h5"><br>
<br><div class="gmail_quote">On Mon, Apr 9, 2012 at 11:13 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 superZZ,<br>
<br>
Good to hear the approach is suitable for your needs.<br>
<br>
Cheers, Dan<br>
<br>
On 10 April 2012 03:01, jxdw_zlf &lt;<a href="mailto:jxdw_zlf@yahoo.com.cn" target="_blank">jxdw_zlf@yahoo.com.cn</a>&gt; wrote:<br>
&gt; Dear Dan,<br>
&gt;<br>
&gt; Thank you! It works fine now. Really appreciate for your help :)<br>
&gt;<br>
&gt; Best Regards,<br>
&gt;<br>
&gt; superZZ<br>
&gt;<br>
&gt;<br>
&gt; ------------------ Original ------------------<br>
&gt; From:  &quot;Dan Mueller&quot;&lt;<a href="mailto:dan.muel@gmail.com" target="_blank">dan.muel@gmail.com</a>&gt;;<br>
&gt; Date:  Mon, Apr 9, 2012 08:41 PM<br>
&gt; To:  &quot;zlf&quot;&lt;<a href="mailto:jxdw_zlf@yahoo.com.cn" target="_blank">jxdw_zlf@yahoo.com.cn</a>&gt;;<br>
&gt; Cc:  &quot;insight-users&quot;&lt;<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>&gt;;<br>
&gt; Subject:  Re: [Insight-users] Extract centerlines from a 3D segmented binary<br>
&gt; image<br>
&gt;<br>
<div><div>&gt; Hi superZZ,<br>
&gt;<br>
&gt; To reiterate my first email: this method is a little tricky due to the<br>
&gt; need for a _good_ speed function. A good speed function has high<br>
&gt; values (~1.0) near the centerline and low values (0.0) away from the<br>
&gt; centerline.<br>
&gt;<br>
&gt; A distance map can be used generate such a speed function, but the<br>
&gt; output of the distance map is _NOT_ the speed function: the distance<br>
&gt; map requires further processing!<br>
&gt;<br>
&gt; Here are the steps I used to quickly generate a speed function<br>
&gt; (commands are in SharpImage syntax, a custom prototyping environment<br>
&gt; of mine, but you should be able to work out what is happening):<br>
&gt;<br>
&gt; SignedMaurerDistance<br>
&gt; SmoothingRecursiveGaussian Sigma=1.0<br>
&gt; Threshold Lower=-10 Upper=100 OutsideValue=-10<br>
&gt; RescaleIntensityToF OutputMinimum=0.0 OutputMaximum=1.0<br>
&gt; UnaryPixelMath Operation=&quot;Power&quot; Exponent=3<br>
&gt;<br>
&gt; The results look acceptable to me (see attached).<br>
&gt;<br>
&gt; HTH<br>
&gt;<br>
&gt; Cheers, Dan<br>
&gt;<br>
&gt; On 9 April 2012 16:26, zlf &lt;<a href="mailto:jxdw_zlf@yahoo.com.cn" target="_blank">jxdw_zlf@yahoo.com.cn</a>&gt; wrote:<br>
&gt;&gt; Dear Dan,<br>
&gt;&gt;<br>
&gt;&gt; I process airway.mhd with SignedMaurerDistanceMapImageFilter. Pass<br>
&gt;&gt; SignedMaurerDistanceMapImageFilter&#39;s result as speed image. The result is<br>
&gt;&gt; even worse.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://itk-insight-users.2283740.n2.nabble.com/file/n7449026/centerline_SignedMaurerDistanceMapImageFilter.jpg" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/file/n7449026/centerline_SignedMaurerDistanceMapImageFilter.jpg</a><br>


&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt;<br>
&gt;&gt; superZZ<br>
</div></div><div><div>_____________________________________<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.php" target="_blank">http://www.kitware.com/products/protraining.php</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>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. <a href="tel:%28%2B34%29%20932%20380%20592" value="+34932380592" target="_blank">(+34) 932 380 592</a><br>
 <a href="http://www.alma3d.com" target="_blank">www.alma3d.com</a><br>

</font></span></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.php" target="_blank">http://www.kitware.com/products/protraining.php</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></div></div>