<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi, Luis:</DIV>
<DIV> </DIV>
<DIV>Thanks so much.</DIV>
<DIV> </DIV>
<DIV>I program is based release model. Five mimutes is for not using narrarow band. How long time usually need for this filter with narrow band 12 for the 512*512*100 ct images? My plan is to use ReinitializeLevelSetImageFilter at each iteration. Do you think it is practial in terms of computation time.</DIV>
<DIV> </DIV>
<DIV>I now make the ReinitializeLevelSetImageFilter works using binary image. The image has 0 and 255 intensity value. I set the levesetvale to be 128, it seems works.</DIV>
<DIV> </DIV>
<DIV>My best regars</DIV>
<DIV> </DIV>
<DIV>Baoyun<BR>--- On <B>Sat, 3/6/10, Luis Ibanez <I><luis.ibanez@kitware.com></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Luis Ibanez <luis.ibanez@kitware.com><BR>Subject: Re: [Insight-users] how to use ReinitializeLevelSetImageFilter<BR>To: "Baoyun Li" <baoyun_li123@yahoo.com><BR>Cc: insight-users@itk.org<BR>Date: Saturday, March 6, 2010, 10:28 PM<BR><BR>
<DIV id=yiv1225197344><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="http://us.mc1110.mail.yahoo.com/mc/compose?to=baoyun_li123@yahoo.com" target=_blank rel=nofollow ymailto="mailto:baoyun_li123@yahoo.com">baoyun_li123@yahoo.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD style="FONT-FAMILY: 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="http://us.mc1110.mail.yahoo.com/mc/compose?to=luis.ibanez@kitware.com" target=_blank rel=nofollow ymailto="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</A>></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Luis Ibanez <<A href="http://us.mc1110.mail.yahoo.com/mc/compose?to=luis.ibanez@kitware.com" target=_blank rel=nofollow ymailto="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</A>><BR>Subject: Re: [Insight-users] how to use ReinitializeLevelSetImageFilter<BR>To: "Baoyun Li" <<A href="http://us.mc1110.mail.yahoo.com/mc/compose?to=baoyun_li123@yahoo.com" target=_blank rel=nofollow ymailto="mailto:baoyun_li123@yahoo.com">baoyun_li123@yahoo.com</A>>
<DIV class=im><BR>Cc: <A href="http://us.mc1110.mail.yahoo.com/mc/compose?to=insight-users@itk.org" target=_blank rel=nofollow ymailto="mailto:insight-users@itk.org">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" target=_blank rel=nofollow>baoyun_li123@yahoo.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=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/" target=_blank rel=nofollow>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 rel=nofollow>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 rel=nofollow>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 rel=nofollow>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
rel=nofollow>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></DIV></BLOCKQUOTE></td></tr></table><br>