[Insight-users] Easy way to find gradient of an image at a particular index?

Cory Quammen cquammen at cs.unc.edu
Sat Dec 1 08:50:34 EST 2012


Thanks, Brian. Three lines works for me!

Cory


On Sat, Dec 1, 2012 at 6:36 AM, brian avants <stnava at gmail.com> wrote:

> never a 2-liner unless you use simpleitk ....
>
> typedef CentralDifferenceImageFunction<FixedImageType>
> GradientCalculatorType;
> m_FixedImageGradientCalculator = GradientCalculatorType::New();
> m_FixedImageGradientCalculator->SetInputImage( this->GetFixedImage() );
> gradient = m_FixedImageGradientCalculator->EvaluateAtIndex( index );
>
> brian
>
>
>
>
> On Fri, Nov 30, 2012 at 4:14 PM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> > Hi all,
> >
> > I could dig in the documentation for this, but am hoping someone on the
> list
> > just knows off the top of his or her head.
> >
> > I'd like to compute the gradient of a 3D image given an index. Is there a
> > one- or two-liner to do this in ITK? I'd like to avoid computing the full
> > gradient image.
> >
> > Thanks,
> > Cory
> >
> > --
> > Cory Quammen
> > Research Associate
> > Department of Computer Science
> > The University of North Carolina at Chapel Hill
> >
> >
> > _____________________________________
> > 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.php
> >
> > 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121201/eaa724f9/attachment.htm>


More information about the Insight-users mailing list