[Insight-users] How to get equivalent output from RecursiveGaussian and DiscreteGaussian filters?

Parag Chandra pchandra at radonc . unc . edu
Wed, 21 May 2003 18:52:06 -0400


Hi all,

I was using the DiscreteGaussianImageFilter for quite a while, until I
started having problems with large sigma, at which point I switched over =
to
using the RecursiveGaussianImageFilter applied over each dimension of =
the
image. I had thought that=20

      variance[0] =3D (sigma / xSpacing)^2
      variance[1] =3D (sigma / ySpacing)^2
      discreteGaussian->SetVariance(variance);

would be equivalent to=20

      recursiveGaussian->SetOrder(GaussianFilterType::ZeroOrder);
      recursiveGaussian->SetNormalizeAcrossScale(true);=09
	recursiveGaussian->SetSigma(sigma)

but that doesn't seem to be the case. The resulting images have the same
shape, but the discrete version always has a maximum value of at most 1,
like I would expect. The recursive version has a maximum value that is
sometimes very close to the discrete version's, but at other times is =
much
greater. The disparity seems to be directly proportional to the image
spacing and inversely proportional to the value of sigma (larger sigmas
result in a smaller disparity for an identical image). Can someone =
explain
how to use the Recursive filter to obtain results that would be more or =
less
identical to the results obtained with the Discrete filter? Do I need to
somehow transform sigma? Should I apply the recursive filter to each
dimension independently and then sum the results, or should I apply the
recursive filter to the input image along the x dimension, and then =
apply it
again to the result of that along the y dimension? Thanks.

By the way, Bill and Luis, I appreciate you looking into the problems I =
was
having with ITK_AUTOLOAD_PATH. I've had success under both Linux and
Windows, so I'm happy ;)

Best regards,
Parag Chandra