[Insight-users] Narrowbanded boundary from a binary image

Matt McCormick matt at mmmccormick.com
Wed Apr 7 18:24:26 EDT 2010


Mengda Wu <wumengda at ...> writes:

> 
> Hi all,    I am wondering if someone can points me how to get a narrowbanded 
boundary from some shape represented by a binary image using ITK filters. Thatis 
to get the boundary of that shape with a user-specified width. The output is 
ideally another binary image.Thanks,Mengda
> 

Check out the BinaryContourImageFilter
http://www.itk.org/Doxygen/html/classitk_1_1BinaryContourImageFilter.html

Apply SetFullyConnected() if desired.

Then, if you want the boundary bigger, apply a dilation with
http://www.itk.org/Doxygen/html/classitk_1_1BinaryDilateImageFilter.html

The size and shape of the dilation can be controlled with 

http://www.itk.org/Doxygen/html/classitk_1_1FlatStructuringElement.html





More information about the Insight-users mailing list