[Insight-users] Issue with BinaryErodeImageFilter

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Sep 11 18:14:55 EDT 2007


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

--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: =?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=
Url : http://public.kitware.com/pipermail/insight-users/attachments/20070912/d2938efd/PGP.pgp


More information about the Insight-users mailing list