[Insight-developers] Behavior of the Evaluate EvaluateAtContinuousIndex

Kwame Kutten kkutten1 at jhmi.edu
Fri Sep 10 13:21:56 EDT 2010


I'm writing a WrapExtrapolateImageFunction for which the input index/point is wrapped around if it lies outside the image.  

Basically its output would be the same as if the image was padded using the WrapPadImageFilter.



How do you think the Evaluate() and EvaluateAtContinuousIndex() methods should behave for a point or ContinousIndex that is outside the image bounds but between pixels?



Currently, I pass an interpolator to the extrapolator...



 typedef itk::WrapExtrapolateImageFunction<ImageType,double>		ExtrapolatorType;

 ExtrapolatorType::Pointer		extrapolator = ExtrapolatorType::New();

  extrapolator->SetInputImage(image);

  extrapolator->SetInterpolator(interpolator);





...then the Evaluate() and EvaluateatContinuousIndex() methods wrap the ContinuousIndex or point around before evaluating its value with the interpolator.



 extrapolator->Evaluate(point);



...or...



 extrapolator->EvaluateAtContinousIndex(cindex);



Is this the best way to handle these cases?

Thanks


More information about the Insight-developers mailing list