<br>Hi Baoyun,<br><br><br>It looks like you missed to call the method:<br><br>                  SetLevelSetValue()<br><br>before you called Update() in the filter.<br><br>For guidance, please look at the file:<br><br>    Insight/Testing/Code/Algorithms/<br>
          itkReinitializeLevelSetImageFilterTest.cxx<br><br><br>       Regards,<br><br><br>              Luis<br><br><br>------------------------------------------------------<br><div class="gmail_quote">On Mon, Mar 1, 2010 at 2:56 PM, Baoyun Li <span dir="ltr">&lt;<a href="mailto:baoyun_li123@yahoo.com">baoyun_li123@yahoo.com</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;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
<div>Dear All: </div>
<div> </div>
<div>I tried to use ReinitializeLevelSetImageFilter. The output looks weird to me. </div>
<div> </div>
<div>The input to the filter is binary image binary image with float type (255 as forground, 0 as background).</div>
<div> </div>
<div>I tried narroow band on and off. However, the output of this filter gives very high value (10^38) for voxles inside the binary mask. Almost all the outside mask voxels has value zero.</div>
<div> </div>
<div>Below is my code, can somebody tell where I made mistake.</div>
<div> </div>
<div>Baoyun</div>
<div> </div>
<div> </div>
<div>**************************code************************<br>   typedef typename itk::ReinitializeLevelSetImageFilter&lt; FeatureImageType &gt; DistanceFilterType; <br>   typename DistanceFilterType::Pointer DistanceFilter = DistanceFilterType::New(); <br>
   DistanceFilter-&gt;SetInput( thresholder-&gt;GetOutput() ); <br>  // DistanceFilter-&gt;NarrowBandingOn(); <br>  // DistanceFilter-&gt;SetNarrowBandwidth( 10 ); <br>      try<br>    {<br>      DistanceFilter-&gt;Update(); </div>

<div>    }<br>    catch( itk::ExceptionObject &amp; excep )<br>    {<br>    std::cerr &lt;&lt; &quot;Exception caught !&quot; &lt;&lt; std::endl;<br>    std::cerr &lt;&lt; excep &lt;&lt; std::endl;<br>    }</div>
<div> </div>
<div>  m_levelset2=DistanceFilter-&gt;GetOutput();</div>
<div> </div>
<div>****************code end*************************<br></div></td></tr></tbody></table><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>
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>