[Insight-users] x&y component of the gradient of an image

Antonio Gómez Barquero agb1 at alu.upct.es
Thu Sep 22 04:59:58 EDT 2011


 

Thanks Sergio!

 

I would like to generate separated x and y component as are given in the
calculation of the gradient in Matlab. So I would try the second option, but
I don’t fully understand “to transverse the convariance vector image”, can
anyone give a example with pseudocode or something, please?

 

Thanks, merci!

 

Antonio

 

De: Sergio Vera [mailto:sergio.vera at alma3d.com] 
Enviado el: jueves, 22 de septiembre de 2011 10:37
Para: Antonio Gómez Barquero; itk Users
Asunto: Re: [Insight-users] x&y component of the gradient of an image

 


Hello!


With  itk::GradientImageFilter you obtain a output image consisting of a
covariant vector image with the x and y components...


If you want to generate separated x and y components in two different images
you can use iterators to traverse the covariant vector image and just copy
the x and y values into different images


regards


 

2011/9/22 Antonio Gómez Barquero <agb1 at alu.upct.es>

 

 

Hello!

I would like to calculate the x and y component of the gradient of a 2D
image. As in MATLAB is calculated with [dT2,dT1] = gradient(T);

 

ReaderType::Pointer T_g            // image 

                FilterType::Pointer gradientFilter = FilterType::New();

                gradientFilter->SetInput( T_g->GetOutput());

                gradientFilter->Update();

With this sentence, I get the result, but I want to have the x-component and
the y-component

gradientFilter->GetOutput()

Is there any method to extract it? I am looking for it but I have no
positive result!

 

Thanks so much

 

Antonio

 

 

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





 

-- 
Sergio Vera

 Alma IT Systems
 C/ Vilana, 4B, 4º 1ª
 08022 Barcelona
 T. (+34) 932 380 592
 www.alma3d.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110922/58868bdb/attachment.htm>


More information about the Insight-users mailing list