Check out the <a href="https://github.com/Kitware/ITK/tree/master/Examples/Segmentation">ITK Segmentation Examples</a>.  Particularly GeodesicActiveContourImageFilter.cxx and ShapeDetectionLevelSetFilter.cxx might have what you need.<br>
<br><div class="gmail_quote">On Wed, Jan 2, 2013 at 11:16 AM, Hui Tang <span dir="ltr">&lt;<a href="mailto:tanghui.seu@gmail.com" target="_blank">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">
<div dir="ltr">please use itkImageFileReader for reading and itkImageFileWriter for writing<div><br></div></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><br clear="all"><div><br></div>-- <br>Christopher Mullins<div>R&amp;D Engineer</div><div>Kitware Inc.,</div><div>919.869.8871</div>