[Insight-users] Remove binary objects on image border

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Mon Mar 2 05:58:02 EST 2009


Le 2 mars 09 à 08:48, Dan Mueller a écrit :

> Hi all,
>
> I need to remove binary objects which lie on the image border. For
> example, I have a binary image with two circles: one lies wholly in
> the image, one is slightly truncated by the border of the image. I
> want to remove the truncated circle, leaving only the whole one.
>
> Obviously I can perform a connected region growing using each border
> pixel as a seed, and then inverse mask the input image with the
> result.
>
> However, I'm sure I've seen a filter that already does this, perhaps
> on the Insight Journal...? Does this filter already exist, or do I
> need to make it myself?


Hi Dan,

The BinaryShapeOpeningImageFilter with the SizeOnBorder attribute is  
doing exactly that - and even a bit more, because you can choose how  
many pixels must touch the border to remove the object.
It is available in http://insight-journal.org/browse/publication/176 .
The last sources are available at http://voxel.jouy.inra.fr/darcs/contrib-itk/binaryAttributeMorphology/binaryAttributeMorphology.tar.gz

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  http://www.mandriva.org
http://www.itk.org  http://www.clavier-dvorak.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090302/e3252f6e/attachment.pgp>


More information about the Insight-users mailing list