[Insight-users] re: getting rid of internal holes of a segmented image

Vikram Chalana VChalana@dxu.com
Fri, 27 Sep 2002 09:43:45 -0700


Zein,
  There are a couple of options to get rid of holes. 

1.  Basically, a hole is a set of background pixels that cannot be reached
by
filling in the background from the edge of the image. Use a flood fill
operation or a connected component labeling to find all background pixels
outside the object of interest, say connected to voxel (0,0,0). All the
background regions not connected to this large filled region are holes are
can be set to the foreground value. 

2. You could use binary morphological closing to fill in all holes smaller
than a structuring element. For this, you could use the morphology filters
in ITK or, hey, you could implement some basic binary morphological filters
using level-sets. To dilate, for example, simply compute the level-set
representation of a binary image, add a value N to the level set, and
convert it back to binary object. Viola! we have dilation of the binary
object with a sphere of radius N!

Hope this helps.
Vikram

___________________________________________
Vikram Chalana, Ph.D.
Diagnostic Ultrasound                     425.867.1348 x 5788
16932 Woodinville-Redmond Rd       Fax: 425.883.2896
Bldg A, Suite 102                           vchalana@dxu.com 
Woodinville, WA 98072



------=_NextPart_000_0198_01C2664C.F544A720
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello friends,

I have used several filters to segment an images. The object that I ma =
interested in has been segemnted nice. the problem is that there are =
some holes inside the marked object. some are small, some are bigger.=20

I need to get rid of these holes, i.e, I need to produce a solid object.

Can anybody give me ideas/suggestions about how to do that.=20

I will be thankfull for any kind of help.

Zein