[Insight-users] 1D convolution in each row of an image in the x-direction.

Antonio Gómez Barquero agb1 at alu.upct.es
Wed Nov 16 04:20:08 EST 2011



Thanks for your reply Cory, 

I had a look to this example
(http://www.vtk.org/Wiki/ITK/Examples/ImageProcessing/ConvolutionImageFilter
) . In this example is fixed the width of the kernel as 10...its mean that
is 10x1 pixel and it goes all over the image?. 

The second thing is that I want to have as a kernel a 1D Gaussian with sigma
= 5 pixels...would be that possible to use?

Thanks so much

Antonio 

-----Mensaje original-----
De: Cory Quammen [mailto:cquammen at cs.unc.edu] 
Enviado el: martes, 15 de noviembre de 2011 21:58
Para: Antonio Gómez Barquero
CC: insight-users at itk.org
Asunto: Re: [Insight-users] 1D convolution in each row of an image in the
x-direction.

Hi Antonio,

Have you looked at ConvolutionImageFilter? If you want to do 1D convolution
in each row, you can simply define an n-by-1 pixel convolution kernel where
n is the size of your convolution kernel along the x dimension. This will be
equivalent to doing 1D convolutions within each image row.

Hope that helps,
Cory

2011/11/15 Antonio Gómez Barquero <agb1 at alu.upct.es>:
>
>
>
>
> Hi all,
>
>
>
> I would like to calculate 1D convolution in each row of an image in 
> the x-direction.
>
>
>
> For that I am trying to use the Example shown in 
> “LaplacianRecursiveGaussianImageFilter1.cxx”
> (http://www.na-mic.org/svn/Slicer3-lib-mirrors/trunk/Insight/Examples/
> Filtering/LaplacianRecursiveGaussianImageFilter1.cxx)
>
>
>
> It produces an exception when I try to ‘update’ the last filter, it is 
> an “stack overflow” and it goes to “itkObject.cxx”
I don’t know what I 
> am doing wrong because I just copy the code in the example

>
>
>
> Another thing and more important is that I have found a lot of 
> information about convolution but nothing specific for doing this 1D 
> convolution in each row of an image in the x-direction. ¿ is there 
> another better example to have a look? A better class to use?
>
>
>
> Thanks all!
>
>
>
> Antonio Gómez Barquero
>
>
>
> Ingeniero de Telecomunicaciones -Becario Investigador asociado a 
> Actividades de I+D+I
>
> GTTS ( Grupo de Tratamiento y Teoría de la Señal)[ 
> http://gtts.upct.es/]
>
> UPCT (Universidad Politécnica de Cartagena)[ http://www.upct.es/]
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>



--
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill



More information about the Insight-users mailing list