AW: [Insight-users] Fill Black Spot
Luis Ibanez
luis . ibanez at kitware . com
Mon, 16 Jun 2003 09:19:31 -0400
Hi Helder,
In addition to Zein's excellent suggestion,
you could also consider the following options:
1) Preprocess the image with one of the
anisotropic diffusion filters:
- CurvatureFlow
- CurvatureAnisotropicDiffusion
- GradientAnisotropicDiffusion
These filters will reduce the noise
level in the image, which may be
preventing your thresholding from
capturing all the pixels on the
region. You will have to play
a bit with the parameters of these
filters.
They are described in the software guide
http://www . itk . org/ItkSoftwareGuide . pdf
on section 5.5.2, pdf-page 121.
If you use the RegionGrowingSegmentation
application in InsightApplications, you
have the option of pre-processing with any
of the three filters, and then run the
ConnectedThreshold filter.
2) Whether you do (1) or not, you could
fill up small holes in the output image
by applying Mathematical Morphology, for
example doing dilation followed by erosion.
You may want to use a structuring element
with a size similar to the holes you want
to fill.
Dilation/Erosion binary filters are
described in the SoftwareGuide on section
5.4.3, pdf-page 111.
3) A set of filters were recently added to
the toolkit, They are explicity designed
for 'hole filling'. You may have to use
an updated CVS checkout in order to get
these filters.
http://www . itk . org/Insight/Doxygen/html/classitk_1_1GrayscaleFillholeImageFilter . html
http://www . itk . org/Insight/Doxygen/html/classitk_1_1GrayscaleGeodesicDilateImageFilter . html
http://www . itk . org/Insight/Doxygen/html/classitk_1_1GrayscaleGeodesicErodeImageFilter . html
This may be an overkill since the filters
are intended to be used in grayscale images.
But still is an interesting option to try
in case (1) and (2) prove to be insufficient.
Regards,
Luis
-----------------------------
salah wrote:
> If I have understood you well, these "white spots"
> are holes inside the segmented region that need to
> be filled. If this is the case, I would suggest you:
>
> 1. do some sort of flood filling starting from some point
> outside your segmented region (some external black
> point)
> 2. invert the image generated by the flood filling. You
> will then get your original segemented region with all
> (internal) holes filled.
>
> Regards,
> Zein
>
>
> -----Ursprüngliche Nachricht-----
> Von: Helder Carvalho [mailto:hel_carvalho at hotmail . com]
> Gesendet: Montag, 16. Juni 2003 11:47
> An: insight-users at public . kitware . com
> Betreff: [Insight-users] Fill Black Spot
>
>
> Hi users,
>
> I'm using the ConnectedThresholdImageFilter to segment an image. The problem
> is i can't get a clear output image. It still gets some black spots where
> there should be a clear white image. So what i want to do is to directly
> change the image pixel of the segmented image in order to fill the black
> spots with white pixels. The black spot is inside a large white region. Is
> there any image filter that can perform this white filling ???
>
> Thanks,
> Helder Carvalho
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join . msn . com/?page=features/virus
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at www . itk . org
> http://www . itk . org/mailman/listinfo/insight-users
> _______________________________________________
> Insight-users mailing list
> Insight-users at www . itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>