[Insight-users] Errors with templates with gcc 4.1.3
Anja Ende
anja.ende at googlemail.com
Mon Feb 25 05:11:43 EST 2008
Hi everyone,
I am having problems with compiling the following bit of code:
Say I have a class declaration as follows:
class ITK2VTK
{
public:
template<typename T>
void Test()
{
typedef itk::Image<T, 3> ImageType;
typedef itk::VTKImageExport<ImageType> ExportFilterType;
// The following line gives the error.
typedef itk::VTKImageExport<ImageType>::Pointer
ExportFilterPointer;
ExportFilterType::Pointer ExportFilterPointer;
ExportFilterPointer itkExporter =
ExportFilterType::New();
}
};
The line: typedef itk::VTKImageExport<ImageType>::Pointer
ExportFilterPointer; fails with the following error:
error: too few template-parameter-lists
Doing a search on the Internet yielded people with the same problems but
with static class members. However, I do not have any static definitions
here...
Anyone has any idea what is happening here?
Cheers,
Anja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20080225/3a9a6d79/attachment.html
More information about the Insight-users
mailing list