[ITK] [ITK-users] Problem with LabelSetErodeImageFilter
Aurelie Le breton
lebreton.a at gmail.com
Tue Apr 10 04:02:46 EDT 2018
Hi,
I have a question about the LabelSetErodeImageFilter.
Is there a structurant element radius max, for the erode filter ?
I need to use a closing filter, i've chosen to use the
LabelSetDilateImageFilter followed by a LabelSetErodeImageFilter.
My problem is that, when i set the radius to 15 pix, both of the dilate and
erode filters give a result, but when the radius is set to 16 pix, only the
dilate filter returns a correct output, the erode filter returns a black
image, filled with '0' values. But there is no reason for the filter to
fail..
Images are 1024*1024, containing only '0' and '1'.
I've tested several datasets, i've the same behaviour.
Here is my code (very basic) :
typedef itk::Image<char, 3> Mask3dType;
// dilate
auto dilateFilter = itk::LabelSetDilateImageFilter<Mask3dType,
Mask3dType>::New();
dilateFilter->SetInput(input);
dilateFilter->SetRadius(radius);
// Erode
auto erodeFilter = itk::LabelSetErodeImageFilter<Mask3dType,
Mask3dType>::New();
erodeFilter->SetInput(dilateFilter->GetOutput());
erodeFilter->SetRadius(radius);
erodeFilter->Update();
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://itk.org/pipermail/community/attachments/20180410/6a84dcbb/attachment.html>
-------------- next part --------------
The ITK community is transitioning from this mailing list to discourse.itk.org. Please join us there!
________________________________
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://www.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:
https://itk.org/mailman/listinfo/insight-users
More information about the Community
mailing list