[Insight-users] itkCurvatureRegistrationFilter

Martin Urschler martin at urschler.info
Wed Aug 17 13:19:30 EDT 2005


hi,

I have detected a strange behaviour when including the 
itkCurvatureRegistrationFilter in my application

I'm working on windows using the msvc 6.0 SP5 compiler. If I simply 
include the header file of the curvature registration filter (after 
defining USE_FFTW of course), a series of compiler errors and warnings 
are produced from the section:

typedef Image<RealTypeDFT,TDeformationField::ImageDimension> 
DeformationFieldComponentImageType;
typedef typename DeformationFieldComponentImageType::Pointer 
DeformationFieldComponentImagePointer;

in itkCurvatureRegistrationFilter.h


The errors complain about a 0 parameter in the itk::Image template shown 
above, actually the compiler seems to instantiate the template (although 
I'm only including the header!!!) and assumes the parameter 
TDeformationField::ImageDimension to be zero!
As a consequence errors are stated since the itk::ImageBase e.g. tries 
to instantiate a FixedArray with dimension 0 which obviously won't work 
since zero sized arrays are not allowed in base classes.

All errors vanish if I replace TDeformationField::ImageDimension with a 
number larger than 0.

I'm really confused why this happens, since I only include the header 
and there shouldn't be an instantiation of the template class already.

Perhaps anyone can bring some light into this confusing issue?

thanks
Martin



More information about the Insight-users mailing list