<div dir="ltr">Hi Hui,<div><br></div><div>Could you describe what exactly the problem is? Also, couId you also paste the earlier part of your code (where Image3DIntType and readerint are defined)?</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 31, 2014 at 8:53 AM, Hui Tang <span dir="ltr"><<a href="mailto:tanghui.seu@gmail.com" target="_blank">tanghui.seu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear all,</div><div> </div><div>I can not get dilation or erosion from BinaryDilateImageFilter or BinaryErodeImageFilter </div><div> </div><div>I mostly copied from the example and thought it should work without any problems.</div><div> </div><div>Here is my code.</div><div>Anyone knows what is wrong here? Thanks a lot in advance !</div><div> </div><div><p class="MsoNormal"><span style="color:blue;font-family:NSimSun;font-size:9.5pt">unsigned</span><span style="font-family:NSimSun;font-size:9.5pt"> <span style="color:blue">int</span> radius = 7;</span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"><span style="color:blue">typedef</span> itk::BinaryBallStructuringElement<<span style="color:blue">int</span>, 3> StructuringElementType;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"> StructuringElementType structuringElement;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"> structuringElement.SetRadius(radius);<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"> structuringElement.CreateStructuringElement();</span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"></span> </p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"> <span style="color:blue">typedef</span> itk::BinaryDilateImageFilter <Image3DIntType, Image3DIntType, StructuringElementType> BinaryDilateImageFilterType;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"> BinaryDilateImageFilterType::Pointer dilateFilter = BinaryDilateImageFilterType::New();<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"> dilateFilter->SetInput(readerint->GetOutput());<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"> dilateFilter->SetKernel(structuringElement); <u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"> dilateFilter->Update();</span></p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"></span> </p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt">Best,</span></p><span class="HOEnZb"><font color="#888888"><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt"></span> </p><p class="MsoNormal"><span style="font-family:NSimSun;font-size:9.5pt">Hui<u></u><u></u></span></p></font></span></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://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Regards,<br>Girish</div></div>
</div></div>