<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Bill,<div><br></div><div>Have you used the poly line structuring element?</div><div><br></div><div>I ran into the segfault while adding this feature to SimpleITK[1]. GDB lead me deep into the innards of the VanHerkGilWerman algorithm[2] and other common morphology utilities[3].</div><div><br></div><div>This was the SimpleITK code I was using:</div><div><div>import SimpleITK as sitk</div><div><br></div><div>img = img = sitk.Image(100,100, sitk.sitkUInt8); img[50,50]=1</div><div>sitk.Show(sitk.BinaryDilate(img, 20, sitk.sitkPolygon6)*255)</div></div><div><br></div><div>I added a good test which can be used to verify the structuring elements. Unlike the current test which just prints to to std out.</div><div><br></div><div><a href="http://review.source.kitware.com/#/c/13845/">http://review.source.kitware.com/#/c/13845/</a></div><div><br></div><div>Unfortunately, I was not able to reproduce the segfault with the test. Although the output for the 6-line SE is visibly wrong.</div><div><br></div><div><br></div><div>[1] <a href="http://itk.org/gitweb?p=stage/SimpleITK.git;a=shortlog;h=refs/heads/SIMPLEITK-431_AddMorphologyKernelEnum">http://itk.org/gitweb?p=stage/SimpleITK.git;a=shortlog;h=refs/heads/SIMPLEITK-431_AddMorphologyKernelEnum</a></div><div>[2] <a href="https://github.com/Kitware/ITK/blob/master/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx#L1006">https://github.com/Kitware/ITK/blob/master/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx#L1006</a></div><div>[3] <a href="https://github.com/Kitware/ITK/blob/master/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx#L79">https://github.com/Kitware/ITK/blob/master/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx#L79</a></div><div><br></div><div>Brad</div><div><br></div><div><br><div><div>On Dec 17, 2013, at 12:40 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><div dir="ltr"><div><div>Brad,<br><br></div>If you can post a small compilable C++ example that illustrates the problem, I'll take a look.<br><br></div>Bill<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Dec 17, 2013 at 12:04 PM, Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hello,<div><br></div><div>I have gotten a couple segfaults when creating when creating Polygon faceted structuring elements. Specifically creating a 6 line 2D element with 12 threads on linux. There were many other combinations which caused a segault.</div>
<div><br></div><div><br></div><div>Also many of the of the structuring elements don't look right, this is a poly from 5 lines or 10 side:</div><div><br></div><div><span><poly5.png></span></div>
<div><br></div><div>Any one familiar with this code? Or have used it? Perhaps it's a recent regression?</div><div><br></div><div><br></div><div>Thanks,</div><div>Brad</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://kitware.com/products/protraining.php" target="_blank">http://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-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</blockquote></div><br></div></body></html>