[Insight-developers] GaussianDerivativeImageFunction does not transform points from physical space to pixel space in Evaluate(..)

Dan Mueller d.mueller at qut.edu.au
Wed Feb 15 23:25:44 EST 2006


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20060216/b9ed7190/attachment.html


More information about the Insight-developers mailing list