[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/insight-users/attachments/20180410/6a84dcbb/attachment.html>


More information about the Insight-users mailing list