<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You probably have to use the “typename”
keyword:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>typedef typename itk::VTKImageExport<ImageType>::Pointer
ExportFilterPointer;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I’m not sure, but many of my template errors go away after
inserting the typename keyword at the appropriately place. What is appropriate
depends on the compiler though.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>best,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Jeroen</span></font><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
insight-users-bounces+j.s.wijnhout=lumc.nl@itk.org
[mailto:insight-users-bounces+j.s.wijnhout=lumc.nl@itk.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Anja Ende<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, February 25, 2008
11:12 AM<br>
<b><span style='font-weight:bold'>To:</span></b> insight-users@itk.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Insight-users] Errors
with templates with gcc 4.1.3</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi everyone,<br>
<br>
I am having problems with compiling the following bit of code:<br>
<br>
Say I have a class declaration as follows:<br>
<br>
class ITK2VTK<br>
{<br>
public:<br>
template<typename T><br>
void Test()<br>
{<br>
typedef itk::Image<T, 3> ImageType;<br>
typedef itk::VTKImageExport<ImageType> ExportFilterType;<br>
// The following line gives the error.<br>
typedef itk::VTKImageExport<ImageType>::Pointer ExportFilterPointer;<br>
<br>
ExportFilterType::Pointer ExportFilterPointer;<br>
ExportFilterPointer itkExporter = ExportFilterType::New();<br>
}<br>
};<br>
<br>
The line: typedef itk::VTKImageExport<ImageType>::Pointer
ExportFilterPointer; fails with the following error:<br>
<br>
error: too few template-parameter-lists<br>
<br>
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...<br>
<br>
Anyone has any idea what is happening here?<br clear=all>
<br>
Cheers,<br>
<br>
Anja <o:p></o:p></span></font></p>
</div>
</body>
</html>