[Insight-users] Remove binary objects on image border

Richard Beare richard.beare at gmail.com
Mon Mar 2 18:08:06 EST 2009


The other common approach, which may be faster if the rest of your
pipeline is appropriate, is to look at label statistics. If you've
produced a mask and you're going to do a connected component analysis
anyway (for example to count objects or measure per object
brightness), then you can just look at object bounding boxes and
ignore those that touch the boundary. If you want to delete the
objects then you can use the ChangeLabelImageFilter

On Mon, Mar 2, 2009 at 9:58 PM, Gaëtan Lehmann
<gaetan.lehmann at jouy.inra.fr> wrote:
>
> 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
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list