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

Miller, James V (Research) millerjv at crd . ge . com
Thu, 22 May 2003 08:46:55 -0400


I think you also want to check what version of the DiscreteGaussian you
are using.  Josh recently (in the last couple of weeks) check in changes
to the neighborhood operators that allow pixel spacing to be taken into
account.  If you have the latest versions, the DiscreteGaussian will have
methods like UseImageSpacingOn()/Off(). I believe it defaults to on.
If you have this version, then the the only difference between the
parameters 
of the two filters will be variance vs sigma.






-----Original Message-----
From: Luis Ibanez [mailto:luis . ibanez at kitware . com]
Sent: Wednesday, May 21, 2003 7:06 PM
To: Parag Chandra
Cc: insight-users at public . kitware . com
Subject: Re: [Insight-users] How to get equivalent output from
RecursiveGaussian and DiscreteGaussian filters?



Hi Parag,

The RecursiveGaussianImageFilter has a method for selecting
Scale Space normalization.

   void SetNormalizeAcrossScale( bool );

http://www . itk . org/Insight/Doxygen/html/classitk_1_1RecursiveGaussianImageFi
lter.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
> 



_______________________________________________
Insight-users mailing list
Insight-users at public . kitware . com
http://public . kitware . com/mailman/listinfo/insight-users