[ITK Community] [Insight-developers] Flat structuring element issues with polygons.
Bradley Lowekamp
blowekamp at mail.nih.gov
Tue Dec 17 15:37:19 EST 2013
Bill,
Have you used the poly line structuring element?
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].
This was the SimpleITK code I was using:
import SimpleITK as sitk
img = img = sitk.Image(100,100, sitk.sitkUInt8); img[50,50]=1
sitk.Show(sitk.BinaryDilate(img, 20, sitk.sitkPolygon6)*255)
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.
http://review.source.kitware.com/#/c/13845/
Unfortunately, I was not able to reproduce the segfault with the test. Although the output for the 6-line SE is visibly wrong.
[1] http://itk.org/gitweb?p=stage/SimpleITK.git;a=shortlog;h=refs/heads/SIMPLEITK-431_AddMorphologyKernelEnum
[2] https://github.com/Kitware/ITK/blob/master/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx#L1006
[3] https://github.com/Kitware/ITK/blob/master/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx#L79
Brad
On Dec 17, 2013, at 12:40 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Brad,
>
> If you can post a small compilable C++ example that illustrates the problem, I'll take a look.
>
> Bill
>
>
>
> On Tue, Dec 17, 2013 at 12:04 PM, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
> Hello,
>
> 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.
>
>
> Also many of the of the structuring elements don't look right, this is a poly from 5 lines or 10 side:
>
> <poly5.png>
>
> Any one familiar with this code? Or have used it? Perhaps it's a recent regression?
>
>
> Thanks,
> Brad
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20131217/13cb3095/attachment.html>
-------------- next part --------------
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers
More information about the Community
mailing list