[Insight-users] problems with median filter
Carolyn Johnston
Carolyn . Johnston at vexcel . com
Tue, 15 Jul 2003 13:23:33 -0600
Hello all,
I am using ITK to run some experiments with registration of digital
elevation models. I have run into a confusing problem using the median
filter class.
I read in a digital elevation model and convert it to an itk float image
using a conversion class. I set the image region, the origin, and the
spacing for the image. I then write the resulting image out in raw format,
and confirm that it is identical to what I read in.
I then filter the image, and again write the raw output. I have tested the
gradient magnitude filter, the threshold filter, and the median filter.
Median filtering seems to introduce a sizeable deterministic shift into the
output: the other filters I have tried don't do this. The shift is on the
order of 500 pixels in Y and around 10 or so in X (for a 3600 by 3600
image). Rows and columns of zeros are introduced as well -- around 15
columns of zeros and 5 rows of zeros at the boundaries of the original
image. Other than that, the image wraps at the boundaries.
I suspect there is some parameter I am not setting, or am not setting
correctly. I stepped through the median filtering code with gdb but did not
find an uninitialized or default parameter read. What might be causing this
problem?
thanks,
Carolyn Johnston
Sr. Engineer, Vexcel Corporation