[Insight-developers] Compile error associated with wrapping -- Linux GCC 4.0.2

Kent Williams kent at psychiatry.uiowa.edu
Mon Feb 27 15:23:02 EST 2006


I'm building up VTK ITK and KWWidgets together for a new program I'm 
working on, and if I try and compile ITK with wrapping turned on I get 
several of these errors:

.../Insight/Code/Common/itkImageFunction.h: In member function ‘void 
itk::ImageFunction<TInputImage, TOutput, 
TCoordRep>::ConvertPointToContinousIndex(const itk::Point<TCoordRep, 
itk::ImageFunction<TInputImage,TOutput,TCoordRep>::ImageDimension>&, 
typename TInputImage::IndexType&) const [with TInputImage = 
itk::Image<float, 2u>, TOutput = double, TCoordRep = double]’:
/scratch/kent/KWW/build/Insight/Wrapping/CSwig/CommonA/wrap_ITKInterpolatorsTcl.cxx:1623: 
instantiated from here
.../Insight/Code/Common/itkImageFunction.h:178: error: no matching 
function for call to ‘itk::Image<float, 
2u>::TransformPhysicalPointToContinuousIndex(const itk::Point<double, 
2u>&, itk::Index<2u>&) const’
/scratch/kent/KWW/build/Insight/Wrapping/CSwig/CommonA/wrap_ITKInterpolatorsTcl.cxx:1623: 
instantiated from here
.../Insight/Code/Common/itkImageFunction.h:178: error: no matching 
function for call to ‘itk::Image<float, 
2u>::TransformPhysicalPointToContinuousIndex(const itk::Point<double, 
2u>&, itk::Index<2u>&) const’

Apparently Andinet added ConvertPointToContinuousIndex to 
itkImageFunction.h, today, which is what is freaking out GCC4.

The definition of itk::Image::TransformPhysicalPointToContinuousIndex() 
is a bit tricky, in that it's a templated member function --- I presume 
it's templated over TCoordRep so that the point parameter can be any 
itk::Point type of the right dimension, instead of being stuck with one 
type:

template<class TCoordRep>
bool TransformPhysicalPointToContinuousIndex(
const Point<TCoordRep, VImageDimension>& point,
ContinuousIndex<TCoordRep, VImageDimension>& index ) const
{
[ implementation ...]
}

But in the case of wrapping, that gets the compiler's panties all in a 
bunch. Any suggestions for getting this working with GCC4 and wrapping?

Any suggestions?



More information about the Insight-developers mailing list