<div dir="ltr">Hey,<br><br>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.<br>There are no errors while compiling or linking, but it concts off before the Evaluate. Will appreciate any sort of help.<br>
<br>Thank you.<br><br>Manisha<br><br><br> typedef float InputPixelType;<br> const unsigned int Dimension = 3;<br> typedef itk::Image< InputPixelType, Dimension > InputImageType;<br> typedef itk::ImageFileReader< InputImageType > ReaderType;<br>
ReaderType::Pointer reader = ReaderType::New();<br> const char * inputFilename = argv[1];<br> reader->SetFileName( inputFilename );<br> typedef itk::LinearInterpolateImageFunction<InputImageType, double> InterpolationFunction;<br>
InterpolationFunction::Pointer interpolator = InterpolationFunction::New();<br><br> typedef itk::Point <double, 3> PointType;<br> PointType point;<br> point[0]=25;<br> point[1]=25;<br> point[2]=25;<br>
float I = interpolator->Evaluate(point);<br> cout << I << " " << endl;<br></div>