[Insight-users] Evaluate() removed from itk::BSplineScatteredDataPointSetToImageFilter in ITK v4.x
Ramón Casero Cañas
rcasero at gmail.com
Tue Mar 27 11:35:28 EDT 2012
On 27/03/12 14:07, Nicholas Tustison wrote:
> 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( ... );
Many thanks, I'm on it, I'll get back to you when it works. But on a
related note, I'd like to mention that the following snippet compiles fine
typedef typename
itk::BSplineControlPointImageFunction<ImageType, double>
EvalFunctionType;
typename EvalFunctionType::Pointer function = EvalFunctionType::New();
while this spits an error which seems to be an abstract method not being
implemented for TCoordRep=float (the change is "double" for "float")
typedef typename
itk::BSplineControlPointImageFunction<ImageType, float>
EvalFunctionType;
typename EvalFunctionType::Pointer function = EvalFunctionType::New();
The error is
In file included from
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:128:0:
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h: In
static member function ‘static
itk::BSplineControlPointImageFunction<TInputImage, TCoordRep>::Pointer
itk::BSplineControlPointImageFunction<TInputImage, TCoordRep>::New()
[with TInputImage = itk::Image<itk::Vector<double, 2u>, 2u>, TCoordRep =
float, itk::BSplineControlPointImageFunction<TInputImage,
TCoordRep>::Pointer =
itk::SmartPointer<itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<double,
2u>, 2u>, float> >]’:
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:311:71:
instantiated from ‘void runBSplineTransform(int, const mxArray**,
mxArray**) [with TScalarType = double, unsigned int Dimension = 2u,
mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:458:5:
instantiated from ‘void parseTransformType(int, const mxArray**,
mxArray**) [with TScalarType = double, unsigned int Dimension = 2u,
mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:484:5:
instantiated from ‘void parseDimensionToTemplate(int, const
mxArray**, mxArray**) [with TScalarType = double, mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:516:59:
instantiated from here
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h:77:3:
error: cannot allocate an object of abstract type
‘itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<double,
2u>, 2u>, float>’
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h:66:7:
note: because the following virtual functions are pure within
‘itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<double,
2u>, 2u>, float>’:
/usr/local/include/ITK-4.1/itkImageFunction.h:115:19: note: TOutput
itk::ImageFunction<TInputImage, TOutput, TCoordRep>::Evaluate(const
PointType&) const [with TInputImage = itk::Image<itk::Vector<double,
2u>, 2u>, TOutput = itk::Vector<double, 2u>, TCoordRep = float,
itk::ImageFunction<TInputImage, TOutput, TCoordRep>::PointType =
itk::Point<float, 2u>]
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h: In
static member function ‘static
itk::BSplineControlPointImageFunction<TInputImage, TCoordRep>::Pointer
itk::BSplineControlPointImageFunction<TInputImage, TCoordRep>::New()
[with TInputImage = itk::Image<itk::Vector<double, 3u>, 3u>, TCoordRep =
float, itk::BSplineControlPointImageFunction<TInputImage,
TCoordRep>::Pointer =
itk::SmartPointer<itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<double,
3u>, 3u>, float> >]’:
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:311:71:
instantiated from ‘void runBSplineTransform(int, const mxArray**,
mxArray**) [with TScalarType = double, unsigned int Dimension = 3u,
mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:458:5:
instantiated from ‘void parseTransformType(int, const mxArray**,
mxArray**) [with TScalarType = double, unsigned int Dimension = 3u,
mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:487:5:
instantiated from ‘void parseDimensionToTemplate(int, const
mxArray**, mxArray**) [with TScalarType = double, mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:516:59:
instantiated from here
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h:77:3:
error: cannot allocate an object of abstract type
‘itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<double,
3u>, 3u>, float>’
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h:66:7:
note: because the following virtual functions are pure within
‘itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<double,
3u>, 3u>, float>’:
/usr/local/include/ITK-4.1/itkImageFunction.h:115:19: note: TOutput
itk::ImageFunction<TInputImage, TOutput, TCoordRep>::Evaluate(const
PointType&) const [with TInputImage = itk::Image<itk::Vector<double,
3u>, 3u>, TOutput = itk::Vector<double, 3u>, TCoordRep = float,
itk::ImageFunction<TInputImage, TOutput, TCoordRep>::PointType =
itk::Point<float, 3u>]
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h: In
static member function ‘static
itk::BSplineControlPointImageFunction<TInputImage, TCoordRep>::Pointer
itk::BSplineControlPointImageFunction<TInputImage, TCoordRep>::New()
[with TInputImage = itk::Image<itk::Vector<float, 2u>, 2u>, TCoordRep =
float, itk::BSplineControlPointImageFunction<TInputImage,
TCoordRep>::Pointer =
itk::SmartPointer<itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<float,
2u>, 2u>, float> >]’:
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:311:71:
instantiated from ‘void runBSplineTransform(int, const mxArray**,
mxArray**) [with TScalarType = float, unsigned int Dimension = 2u,
mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:458:5:
instantiated from ‘void parseTransformType(int, const mxArray**,
mxArray**) [with TScalarType = float, unsigned int Dimension = 2u,
mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:484:5:
instantiated from ‘void parseDimensionToTemplate(int, const
mxArray**, mxArray**) [with TScalarType = float, mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:519:58:
instantiated from here
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h:77:3:
error: cannot allocate an object of abstract type
‘itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<float,
2u>, 2u>, float>’
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h:66:7:
note: because the following virtual functions are pure within
‘itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<float,
2u>, 2u>, float>’:
/usr/local/include/ITK-4.1/itkImageFunction.h:115:19: note: TOutput
itk::ImageFunction<TInputImage, TOutput, TCoordRep>::Evaluate(const
PointType&) const [with TInputImage = itk::Image<itk::Vector<float, 2u>,
2u>, TOutput = itk::Vector<float, 2u>, TCoordRep = float,
itk::ImageFunction<TInputImage, TOutput, TCoordRep>::PointType =
itk::Point<float, 2u>]
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h: In
static member function ‘static
itk::BSplineControlPointImageFunction<TInputImage, TCoordRep>::Pointer
itk::BSplineControlPointImageFunction<TInputImage, TCoordRep>::New()
[with TInputImage = itk::Image<itk::Vector<float, 3u>, 3u>, TCoordRep =
float, itk::BSplineControlPointImageFunction<TInputImage,
TCoordRep>::Pointer =
itk::SmartPointer<itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<float,
3u>, 3u>, float> >]’:
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:311:71:
instantiated from ‘void runBSplineTransform(int, const mxArray**,
mxArray**) [with TScalarType = float, unsigned int Dimension = 3u,
mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:458:5:
instantiated from ‘void parseTransformType(int, const mxArray**,
mxArray**) [with TScalarType = float, unsigned int Dimension = 3u,
mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:487:5:
instantiated from ‘void parseDimensionToTemplate(int, const
mxArray**, mxArray**) [with TScalarType = float, mxArray = mxArray_tag]’
/home/ramc/secure_data/comlab/gerardus/matlab/ItkToolbox/ItkPSTransform.cpp:519:58:
instantiated from here
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h:77:3:
error: cannot allocate an object of abstract type
‘itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<float,
3u>, 3u>, float>’
/usr/local/include/ITK-4.1/itkBSplineControlPointImageFunction.h:66:7:
note: because the following virtual functions are pure within
‘itk::BSplineControlPointImageFunction<itk::Image<itk::Vector<float,
3u>, 3u>, float>’:
/usr/local/include/ITK-4.1/itkImageFunction.h:115:19: note: TOutput
itk::ImageFunction<TInputImage, TOutput, TCoordRep>::Evaluate(const
PointType&) const [with TInputImage = itk::Image<itk::Vector<float, 3u>,
3u>, TOutput = itk::Vector<float, 3u>, TCoordRep = float,
itk::ImageFunction<TInputImage, TOutput, TCoordRep>::PointType =
itk::Point<float, 3u>]
make[2]: ***
[matlab/ItkToolbox/CMakeFiles/itk_pstransform.dir/ItkPSTransform.cpp.o]
Error 1
make[1]: *** [matlab/ItkToolbox/CMakeFiles/itk_pstransform.dir/all] Error 2
make: *** [all] Error 2
--
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