[Insight-users] Easy way to find gradient of an image at a particular index?
brian avants
stnava at gmail.com
Sat Dec 1 06:36:16 EST 2012
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
>
More information about the Insight-users
mailing list