[Insight-users] LinearInterpolateFunction

Manisha Roy Choudhury manisharc at gmail.com
Tue Jul 15 03:20:26 EDT 2008


Hey,

I need the linearly interpolated intensity values of some certain points in
a 3d volume. I am trying to use LinearInterpolateImageFunction. The code is
as follows.
There are no errors while compiling or linking, but it concts off before the
Evaluate. Will appreciate any sort of help.

Thank you.

Manisha


    typedef float InputPixelType;
    const   unsigned int        Dimension = 3;
    typedef itk::Image< InputPixelType,  Dimension >    InputImageType;
    typedef itk::ImageFileReader< InputImageType  >  ReaderType;
    ReaderType::Pointer reader = ReaderType::New();
    const char * inputFilename  = argv[1];
    reader->SetFileName( inputFilename  );
    typedef itk::LinearInterpolateImageFunction<InputImageType, double>
InterpolationFunction;
    InterpolationFunction::Pointer interpolator =
InterpolationFunction::New();

    typedef itk::Point <double, 3> PointType;
   PointType point;
   point[0]=25;
   point[1]=25;
   point[2]=25;
   float I = interpolator->Evaluate(point);
   cout << I << "  "  << endl;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080715/8fc3e79e/attachment-0001.htm>


More information about the Insight-users mailing list