[Insight-users] Evaluate() removed from itk::BSplineScatteredDataPointSetToImageFilter in ITK v4.x

Nicholas Tustison ntustison at gmail.com
Tue Mar 27 09:07:17 EDT 2012


To get the b-spline object and then evaluate it at an arbitrary
parametric point you have to generate the control point lattice 
with the first filter and then pass it to the function.

filter->Update();

function->SetSplineOrder( filter->GetSplineOrder() );
.
.
.
function->SetInputImage( filter->GetPhiLattice() );
function->Evaluate( ... );




On Mar 27, 2012, at 8:20 AM, Ramón Casero Cañas wrote:

> On 27/03/12 11:58, Ramón Casero Cañas wrote:
>> On 26/03/12 23:09, Nicholas Tustison wrote:
>>> 
>>> itkBSplineScatteredDataPointSetToImageFilter
>>> itkBSplineControlPointImageFunction
>>> itkBSplineControlPointImageFilter
> 
> Um, I've been trying and I don't get how to make this work in itkBSplineControlPointImageFunction. The idea is to have an interpolating function
> 
> yi = f(x, y, xi);
> 
> where x, y are the source and target landmarks or control points, xi are the coordinates of a target point, and yi are the coordinates of where that point is going to.
> 
> With itkBSplineScatteredDataPointSetToImageFilter it was pretty straightforward (full code in
> 
> http://code.google.com/p/gerardus/source/browse/trunk/matlab/ItkToolbox/ItkPSTransform.cpp
> 
> Create a PointSet that maps the parameterisation of the scattered source landmarks to the target landmarks
> 
> pointSet->SetPoint(row, xParam);
> pointSet->SetPointData(row, v);
> 
> Pass this to the itkBSplineScatteredDataPointSetToImageFilter transform
> 
> itk::BSplineScatteredDataPointSetToImageFilter<PointSetType,
> 					   ImageType> TransformType;
> transform->SetInput(pointSet);
> 
> Set up the parameters of the spline (order, levels, etc).
> 
> Run the transform.
> 
> Sample the transform at the xi locations
> 
> transform->Evaluate(xiParam, vi);
> 
> 
> But now with the new function, how can I pass the PointSet?
> 
> Best regards,
> 
> Ramon.
> 
> -- 
> Dr. Ramón Casero Cañas
> 
> Computational Biology
> Department of Computer Science
> University of Oxford
> Wolfson Building, Parks Rd
> Oxford OX1 3QD
> 
> tlf     +44 (0) 1865 610737
> web     http://www.cs.ox.ac.uk/people/Ramon.CaseroCanas
> photos  http://www.flickr.com/photos/rcasero/



More information about the Insight-users mailing list