[Insight-users] BinaryErodeImageFilter

Uitert, Robert Van (NIH/CC/DRD) uitertr at cc.nih.gov
Wed Dec 1 14:11:52 EST 2004


Hi,

I am working on a cvs checkout of itk and am having trouble using the
BinaryErodeImage Filter. I have segmented the white matter from from
BrainProtonDensitySlice.png.  The attached files, SegBrain.mhd &
SegBrain.raw, contain the binary image that results.  The files are in
.tar.gz as well as .7z (7zip.org) format.  If I perform erosion using an
itk::BinaryBallStructuringElement<float,2>, the resulting image is correct.

If I use same procedure to segment out the spinal cord on another dataset, I
get the resulting spinal cord segmentation, SegSpine.mhd & SegSpine.raw,
which are also attached.  When I try to perform erosion on this image, again
using the itk::BinaryBallStructuringElement<float,2> and a radius on the
ball of 1, the output image contains mostly 0 and a few max float data
values.  

It appears that performing an additional check on the image boundary in
itkBinaryErodeImageFilter.txx forces a seemingly correct output image, but
the condition when completelyBackground is true is still being hit when the
image pixel value is equal to ErodeValue.  A diff between the cvs version
and my version of itkBinaryerodeImageFilter.txx has been included below.

One thing to note about the spine segmentation dataset is that the data is
offset by 3 in both the x and y dimensions and the brain dataset has no
offset.

Can someone give me an answer as to why this dataset will not erode properly
using itkBinaryErodeImageFilter?

Thank you,

Robert Van Uitert
Diagnostic Radiology Department
Clinical Center
National Institutes of Health

Index: itkBinaryErodeImageFilter.txx
===================================================================
RCS file:
/cvsroot/Insight/Insight/Code/BasicFilters/itkBinaryErodeImageFilter.txx,v
retrieving revision 1.16
diff -r1.16 itkBinaryErodeImageFilter.txx
65c67,68
<     if (*kernel_it > 0)
---
>     if (*kernel_it > 0 && nit.InBounds())

-------------- next part --------------
A non-text attachment was scrubbed...
Name: erosionData.targz.needToChangeExtensionTogetThroughVirusFilter.txt
Type: application/octet-stream
Size: 6 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20041201/48924fc1/erosionData.targz.needToChangeExtensionTogetThroughVirusFilter.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erosionData.7z
Type: application/octet-stream
Size: 2659 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20041201/48924fc1/erosionData.obj


More information about the Insight-users mailing list