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

Sergio Vera sergio.vera at alma3d.com
Thu Sep 22 04:37:25 EDT 2011


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 imagesregards
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/c3ef70a8/attachment.htm>


More information about the Insight-users mailing list