[Insight-users] Gaussian kernel..

Joshua Cates cates at sci.utah.edu
Wed, 3 Mar 2004 10:57:40 -0700 (MST)


Hi Sergio,

You can use the NeighborhoodIterators to do this.  After centering a 
neighborhood iterator on a given pixel, you can access its elements 
one-by-one as if it were an array.  Create a Gaussian kernel of matching 
size and the whole operation becomes a simple traversal of two arrays, 
multiplying each element in turn.  Works for images of any dimensionality.

The GaussianOperator may not work for your task because it is a 1D kernel 
(applied sequentially in each dimension to filter ND images).  So you will 
probably need to generate a full ND Gaussian kernel on your own (or 
convolve N orthogonal GaussianOperators).

Josh.


______________________________
 Josh Cates			
 Scientific Computing and Imaging Institute
 University of Utah
 (801) 587-7697
 http://www.sci.utah.edu/~cates


On Wed, 3 Mar 2004, Sergio Andres wrote:

> Hi all,
> 
> I want to multiply each element of a gaussian kernel [n,n],
> previously centered on a given pixel, by each corresponding pixel of the 
> image
> I don't want to sum all values (convolution)... but I just want to 
> obtain these values...[n,n]
> 
> I was considering two options:
> 
> 1) iterate over gaussian kernel elements and multiply by a pixel each 
> time...
> 2) use some class of ITK for doing it. But I'm not sure which classes 
> can be useful..
>     - itk::GaussianOperator
>     - itk::Neighborhood..
> 
> 
> I will appreciate any suggestion.
> 
> Thanks.
> 
> Sergio
> 
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>