[Insight-users] 3D Gaussian kernel

Luis Ibanez luis.ibanez at kitware.com
Tue Mar 25 10:28:54 EDT 2008


Hi Margaret,

If you only want to perform a pixel-wise product between your
(NxNxM) region and a Gaussian Kernel, then you probably should
use the GaussianOperator class:

http://www.itk.org/Insight/Doxygen/html/classitk_1_1GaussianOperator.html


You can use a Neigborhood to grab the NxNxM pixels from your image
and then use a single for loop to iterate through each one of the
pixels of both the neighborhood and the GaussianOperator. Both of them
offer the operator[], so you can write a expression of the type:


     for( k=0; k < gaussianOperator.size(); k++ )
        {
        neighborhood[k] *= gaussianOperator[k];
        }



   Regards,


      Luis


---------------------
Margaret Zhao wrote:
> Hi, all –
> 
>  
> 
>   I’d like to perform the following tasks –
> 
>  
> 
> 1)       create a 3D Gaussian kernel (N x N x M)
> 
> 2)       extract a region of size (N x N x M) from an image
> 
> 3)       multiply each pixel in the region with each corresponding 
> element of the Gaussian kernel (not convolve)
> 
>  
> 
>  
> 
>   My questions are –
> 
>  
> 
> 1)       Is there any existing ITK class to generate 3D Gaussian kernel? 
> Is GaussianOperator the right choice?
> 
> 2)       Is there any existing ITK class to perform the 3D 
> pixel-by-pixel multiplication (without using 3D iterative FOR loops)?
> 
>  
> 
>   Any suggestions will be helpful. Thanks a lot in advance!
> 
>  
> 
> Margaret
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list