Hello vtk Support community,
I am using vtk for processing of 3d Nifti images and want to get interpolated value from (x,y,z)- I entered them in voxel coordinate space.
W
this->bspline_coeff = vtkSmartPointer::New();
this->bspline_coeff->SetInputData(this->niimg);
this->bspline_coeff->SetSplineDegree(5);
this->bspline_coeff->Update();
//this should be a result
auto result = this->bspline_coeff->Evaluate(x);
But it returns a completely different result from my control point (return something around zero whereas this coordinate value is 6)
*another solution I tried was: *
auto interp = vtkSmartPointer::New();
this->bspline_coeff = vtkSmartPointer::New();
this->bspline_coeff->SetInputData(this->niimg);
this->bspline_coeff->SetSplineDegree(5);
this->bspline_coeff->Update();
interp->Initialize(bspline_coeff->GetOutput());
auto result = interp->Interpolate(x[0],x[1],x[2],0);
However I did not get any reasonable result.
It looks like I somehow misuse this program. Could somebody please help to get a correct result?