Thank you!!<br><br><div><span class="gmail_quote">On 25/02/2008, <b class="gmail_sendername"><a href="mailto:J.S.Wijnhout@lumc.nl">J.S.Wijnhout@lumc.nl</a></b> &lt;<a href="mailto:J.S.Wijnhout@lumc.nl">J.S.Wijnhout@lumc.nl</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">










<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Hi,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">You probably have to use the "typename"
keyword:</span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">typedef typename itk::VTKImageExport&lt;ImageType&gt;::Pointer
ExportFilterPointer;</span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">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.</span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">best,</span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Jeroen</span></font><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"></span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
insight-users-bounces+j.s.wijnhout=<a href="mailto:lumc.nl@itk.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">lumc.nl@itk.org</a>
[mailto:<a href="mailto:insight-users-bounces+j.s.wijnhout=lumc.nl@itk.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">insight-users-bounces+j.s.wijnhout=lumc.nl@itk.org</a>] <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> <a href="mailto:insight-users@itk.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">insight-users@itk.org</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> [Insight-users] Errors
with templates with gcc 4.1.3</span></font></p>

</div><div><span class="e" id="q_1185018c3cd4290c_1">

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
template&lt;typename T&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
void Test()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
typedef itk::Image&lt;T, 3&gt; ImageType;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
typedef itk::VTKImageExport&lt;ImageType&gt; ExportFilterType;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// The following line gives the error.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
typedef itk::VTKImageExport&lt;ImageType&gt;::Pointer ExportFilterPointer;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ExportFilterType::Pointer ExportFilterPointer;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ExportFilterPointer itkExporter = ExportFilterType::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<br>
};<br>
<br>
The line:&nbsp; typedef itk::VTKImageExport&lt;ImageType&gt;::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">
&nbsp;<br>
Cheers,<br>
<br>
Anja </span></font></p>

</span></div></div>

</div>


<br>_______________________________________________<br>
Insight-users mailing list<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Cheers,<br><br>Anja