<br>Hi Baoyun,<br><br>The input to the ReinitializeLevelSetImageFilter <br>is not expected to be a binary image.<br><br>The input image is supposed to be a level set image.<br><br>The purpose of the filter is to correct the drift that will<br>
happens in a level set image due to the inaccuracies<br>of computing its progress based only on a narrow band<br>of pixels.<br><br>Five minutes is an abnormally long time for this filter.<br><br>Are you compiling your code for "Debug" mode ?<br>
<br><br> Luis<br><br><br>------------------------------------------------------------------------------------------<br><div class="gmail_quote">On Tue, Mar 2, 2010 at 11:53 AM, Baoyun Li <span dir="ltr"><<a href="mailto:baoyun_li123@yahoo.com">baoyun_li123@yahoo.com</a>></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 Luis:</div>
<div> </div>
<div>I tried to add SetLevelSetValue(0) and SetLevelSetValue(128). And set narrowbandoff.</div>
<div>However, I am getting same weird result.</div>
<div> </div>
<div>So can you tell me whether the input of ReinitializeLevelSetImageFilter is binary image.</div>
<div> </div>
<div>And the filter needs five mintues to run, is it normal for a 512x512x60 image.</div>
<div> </div>
<div>Thanks and my best regards</div>
<div> </div>
<div>Baoyun<br><br><br>--- On <b>Mon, 3/1/10, Luis Ibanez <i><<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>></i></b> wrote:<br></div>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;"><br>From: Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>><br>Subject: Re: [Insight-users] how to use ReinitializeLevelSetImageFilter<br>
To: "Baoyun Li" <<a href="mailto:baoyun_li123@yahoo.com" target="_blank">baoyun_li123@yahoo.com</a>><div class="im"><br>Cc: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
</div>Date: Monday, March 1, 2010, 11:50 PM<div><div></div><div class="h5"><br><br>
<div><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"><<a href="http://us.mc1110.mail.yahoo.com/mc/compose?to=baoyun_li123@yahoo.com" rel="nofollow" target="_blank">baoyun_li123@yahoo.com</a>></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-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< FeatureImageType > DistanceFilterType; <br> typename DistanceFilterType::Pointer DistanceFilter = DistanceFilterType::New(); <br>
DistanceFilter->SetInput( thresholder->GetOutput() ); <br> // DistanceFilter->NarrowBandingOn(); <br> // DistanceFilter->SetNarrowBandwidth( 10 ); <br> try<br> {<br> DistanceFilter->Update(); </div>
<div> }<br> catch( itk::ExceptionObject & excep )<br> {<br> std::cerr << "Exception caught !" << std::endl;<br> std::cerr << excep << std::endl;<br> }</div>
<div> </div>
<div> m_levelset2=DistanceFilter->GetOutput();</div>
<div> </div>
<div>****************code end*************************<br></div></td></tr></tbody></table><br><br>_____________________________________<br>Powered by <a href="http://www.kitware.com/" rel="nofollow" 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" rel="nofollow" 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" rel="nofollow" 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" rel="nofollow" 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" rel="nofollow" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br><br></blockquote></div>
<br></div></div></div></blockquote></td></tr></tbody></table><br>
</blockquote></div><br>