[Insight-users] Re: [Insight-developers]
GaussianDerivativeImageFunction does not
transform points from physical space to pixel space in Evaluate(..)
Andinet Enquobahrie
andinet.enqu at kitware.com
Thu Feb 16 10:18:55 EST 2006
Hello Dan,
Thank you for pointing out the bug and for your detailed information.
Not only Evaluate(PointType ) method, but also
EvaluateAtContinuousIndex(..) method was doing incorrect transformation.
I entered a bug (# 2891) report on this and just committed a fix to
cvs. Please, update your cvs version and give it a try. Let us know if
you face any other problems using these functions.
-Andinet
> Hi all,
>
> For my application I need to calculate the image derivative at a
> number of physical locations. I have found two suitable
> ImageFunctions: CentralDifferenceImageFunction and
> GaussianDerivativeImageFunction. The GaussianDerivativeImageFunction
> is more suitable to my application because it uses a Gaussian kernel
> to smooth noise artifacts.
>
> Unfortunately, there seems to be a discrepancy with the
> GaussianDerivativeImageFunction::Evaluate(const PointType& point)
> function. The Evaluate(const PointType& point) function should
> evaluate the function at the given physical point (ie. taking into
> account the image spacing and origin). For example see
> itkCentralDifferenceImageFunction.h which - via
> itk::ImageFunction::ConvertPointToNearestIndex(..) - uses
> itk::Image::TransformPhysicalPointToContinuousIndex(..) to transform
> the physical point to a ContinuousIndex in pixel space before evaluation.
>
> It appears that GaussianDerivativeImageFunction *does not* transform
> the point from physical space to pixel space before evaluation. If you
> look at the Evaluate(..) function in the
> itkGaussianDerivativeImageFunction.txx file, the physical point is
> cast to an index (the rounding differences are used as the offset to
> recompute the kernel) and then itk::Image::GetPixel(const IndexType
> &index) is invoked - no transformation from physical space to pixel
> space occurred!
>
> Have I missed something, or is this an omission?
>
> Thanks for your help.
>
> Dan
> --
> Dan Mueller (d.mueller[at]qut.edu.au)
> School of Engineering Systems (ES)
> Faculty of Built Environment and Engineering (BEE)
> Queensland University of Technology (QUT)
> CRICOS No: 00213J
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers at itk.org
>http://www.itk.org/mailman/listinfo/insight-developers
>
>
More information about the Insight-users
mailing list