[Insight-users] Issue with BinaryErodeImageFilter

Dan Mueller dan.muel at gmail.com
Tue Sep 11 18:29:31 EDT 2007


Hi Robert,

>From your description, it appears the erode filter is working
correctly. If slice 0 and 18 are blank in your input image, after
eroding with a structuring element [1,1,1] I would expect slice 1 and
17 to also be blank in the output. Remember, the erode filter takes
the minimum value of all those under the element; for slices 1 and 17
the element will include pixels from slice 0 (and 2) and slice 18 (and
16), which are blank (ie. the minimum). I don't think the
corresponding slice index is being moved, but simply the erosion has
been applied changing the shape for all given slices.

As Gaetan said, providing the source code would be very helpful. Also,
perhaps you could upload your original 3-D dataset to the URL so we
can confirm nothing funny is happening.

Anyway, hope this helps.

Cheers, Dan

On 12/09/2007, Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr> wrote:
>
> Hi Robert,
>
> Le 11 sept. 07 à 23:48, Robert Tamburo a écrit :
>
> > Hi all,
> >
> > I'm trying to use the erosion filter on a 3D binary image. I'm
> > using the itkBinaryErodeImageFilter with an
> > itkBinaryBallStructuringElement in the same way that is
> > demonstrated in the SoftwareGuide. The input image has a total of
> > 19 slices with the first and last slices being blank (black,
> > background). In the output image the first 2 and last 2 slices end
> > up being blank... two slices of data are missing.  Moreover, an
> > obviously corresponding slice no longer has the same index.
> >
> > I tried a couple of things to try and understand what was
> > happening. First, I tried padding the image with additional blank
> > slices. I added 1, 2, and 3 additional slices and got the same
> > results.  Then I tried removing the blank slices. No blank slices
> > were introduced. However, the index problem is still an issue.
> > I've created a temp web page with some screen captures to better
> > illustrate the problem. The URL is: http://www.tamburo.us/temp/
> > erosion.htm
> >
> > The results are confusing to me and not what I expected. Any
> > clarification on these issues would be greatly appreciated. Source
> > code and images can be made available if needed.
>
> The source code would be really useful. If you can send it, I'll look
> at that problem tomorrow.
> In the mean time, here are some possible cause of the problem:
>   - be sure to call the CreateStructuringElement() method on the
> BinaryBallStructuringElement
>   - try with ITK cvs - it include a fix for a bug in ITK 3.2 which
> highly slow down the filter. The speed may not the only effect of
> that bug...
>
> >
> > Regards,
> > Robert
> >
> > P. S. I'm using a MacBook Pro with ITK version 3.2.0 and gcc 4.0.1.
>
> I'm doing the same - works great for me :-)
>
> > P. P. S. The documentation in the header for the erosion filter is
> > incorrect in that it describes dilation.
>
> I'll fix that (I must be the one who made that mistake). Thanks for
> the report!
>
> Regards,
>
> Gaëtan


More information about the Insight-users mailing list