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

Luis Ibanez luis . ibanez at kitware . com
Wed, 21 May 2003 19:06:07 -0400


Hi Parag,

The RecursiveGaussianImageFilter has a method for selecting
Scale Space normalization.

   void SetNormalizeAcrossScale( bool );

http://www . itk . org/Insight/Doxygen/html/classitk_1_1RecursiveGaussianImageFilter . html#a1


In the normal convolution with a gaussian, the larger the Sigma, the 
lower the maximum of the output. This is because convolving with a sigma
is like solving a diffusion equation. Basically melting the intensity
values of your image. Larger sigmas are equivalent to longer melting
times.

For scale space analysis this behavior is undesirable since it prevents
you from making intensity comparisons at differents scales.

You may want to enable this flag in order to obtain maxima that have
similar values when you change sigma.


BTW
Thanks for letting us know that the ITK_AUTOLOAD_PATH is working now.



Regards,



    Luis


-------------------------------
Parag Chandra wrote:
> 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 
> 
>       variance[0] = (sigma / xSpacing)^2
>       variance[1] = (sigma / ySpacing)^2
>       discreteGaussian->SetVariance(variance);
> 
> would be equivalent to 
> 
>       recursiveGaussian->SetOrder(GaussianFilterType::ZeroOrder);
>       recursiveGaussian->SetNormalizeAcrossScale(true);	
> 	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
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at public . kitware . com
> http://public . kitware . com/mailman/listinfo/insight-users
>