Well, how does the declaration of itk::UltimateSkeletonImageFilter look like? Just the class declaration not all methods ...<br><br>Andreas<br><br><div class="gmail_quote">On Tue, Feb 2, 2010 at 7:07 PM,  <span dir="ltr">&lt;Neil.Burdett@csiro.au&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi Andreas;</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span>
<p><font size="2">const int Dimension = 3;</font></p>
<p><font size="2">typedef unsigned short DistancePixelType;</font></p>
<p><font size="2">typedef itk::Image&lt; DistancePixelType, Dimension &gt; 
DistanceImageType;</font></p>
<p><font size="2"></font> </p>
<p><span><font color="#0000ff" face="Arial" size="2">Note 
that in the same file we have a number of other typedef that 
compile fine i.e.</font></span></p><span>
<p><font size="2">// Prepare the priority function</font></p>
<p><font size="2">typedef typename 
itk::DanielssonDistanceMapImageFilter&lt;TOutputImage, DistanceImageType&gt; 
DanielssonDistanceMapImageFilterType;</font></p>
<p><font size="2">typename DanielssonDistanceMapImageFilterType::Pointer 
danielssonDistanceMapFilter = 
DanielssonDistanceMapImageFilterType::New();</font></p>
<p><span><font color="#0000ff" face="Arial" size="2">....</font></span></p><span>
<p><font size="2">// Compute a surfacic skeleton</font></p>
<p><font size="2">typedef typename 
itk::ParallelSkeletonImageFilter&lt;TOutputImage, TOutputImage, 
itk::Connectivity&lt;Dimension, 0&gt; &gt; 
ParallelSkeletonImageFilterType;</font></p>
<p><font size="2">typename ParallelSkeletonImageFilterType::Pointer 
parallelSkeletonFilter = ParallelSkeletonImageFilterType::New();</font></p>
<p><span><font size="2">...</font></span></p><span><font size="2">
<p>// Delete all small components (extract the largest connected component in 
the image)</p>
<p>typedef typename itk::LargestConnectedComponentImageFilter&lt;TOutputImage, 
TOutputImage&gt; LargestConnectedComponentImageFilterType;</p>
<p>typename LargestConnectedComponentImageFilterType::Pointer 
largestConnectedComponentFilter = 
LargestConnectedComponentImageFilterType::New();</p></font></span>
<p><span><font size="2">etc...</font></span></p>
<p><span><font size="2"></font></span> </p>
<p><span><font size="2">Maybe its an issue with 
</font><font size="3">itk::UltimateSkeletonImageFilter ??</font></span></p>
<p><span>Neil</span></p></span>
<p><font color="#0000ff" face="Arial" size="2"></font> </p></span></span></div><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><div class="im"><b>From:</b> Andreas Schuh 
[mailto:<a href="mailto:andreas.schuh.84@googlemail.com" target="_blank">andreas.schuh.84@googlemail.com</a>] <br></div><b>Sent:</b> Wednesday, 3 February 
2010 9:41 AM<div class="im"><br><b>To:</b> Burdett, Neil (ICT Centre, Herston - 
RBWH)<br></div><div><div></div><div class="h5"><b>Subject:</b> Re: [Insight-users] typedef name cannot follow 
class/struct/union<br></div></div></font><br></div><div><div></div><div class="h5">
<div></div>Hi,<br><br>How are TOutputImage, DistanceImageType and Dimension 
declared/defined? How is the template method/class itself 
declared?<br><br>Andreas<br><br>
<div class="gmail_quote">On Tue, Feb 2, 2010 at 5:44 PM, <span dir="ltr">&lt;Neil.Burdett@csiro.au&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi 
  Andreas and Bill,<br>                
    Thanks for the replies. As mentioned in my previous post if I remove 
  the &quot;typename&quot; I continue to get the same error:<br>
  <div><br>&quot;error C2242: typedef name cannot follow 
  class/struct/union&quot;<br><br></div>You are correct that the second line after 
  this is a cut and paste error so the actual code is:<br>
  <div><br> // Compute the seed image, by closing cavities and 
  holes with an ultimate skeleton of the cuboid image<br></div> typedef 
  itk::UltimateSkeletonImageFilter&lt;TOutputImage, TOutputImage, 
  itk::Connectivity&lt;Dimension, 0&gt;, DistanceImageType &gt; 
  SeedSkeletonFilterType;<br>
  <div><br> typename SeedSkeletonFilterType::Pointer 
  seedSkeletonFilter = 
  SeedSkeletonFilterType::New();<br> seedSkeletonFilter-&gt;SetInput(cuboidImage-&gt;GetOutput());<br> seedSkeletonFilter-&gt;SetPriorityImage(distanceInvertIntensityFilter-&gt;GetOutput());<br> seedSkeletonFilter-&gt;SetInhibitImage(parallelSkeletonFilter-&gt;GetOutput());<br>
 try{<br>  
   seedSkeletonFilter-&gt;Update();<br> } catch(itk::ExceptionObject 
  &amp;ex) {<br>   throw 
  itk::ExceptionObject(&quot;milxTopologicalHolesFilling&quot;, 0, 
  std::string(&quot;Topological holes filling.. seed ultimate skeleton failed: &quot;) + 
  ex.GetDescription());<br> }<br><br></div>Anymore ideas? This error occurs 
  on both VS 2005 and VS 2008<br><br>Cheers<br>Neil<br>
  <div><br>-----Original Message-----<br>From: Andreas Schuh [mailto:<a href="mailto:andreas.schuh.84@googlemail.com" target="_blank">andreas.schuh.84@googlemail.com</a>]<br>Sent: 
  Tuesday, 2 February 2010 2:49 PM<br>To: Burdett, Neil (ICT Centre, Herston - 
  RBWH)<br></div>
  <div>
  <div></div>
  <div>Cc: itk<br>Subject: Re: [Insight-users] typedef name cannot 
  follow class/struct/union<br><br>Hi Neil,<br><br>Try<br><br>typedef 
   itk::UltimateSkeletonImageFilter&lt;TOutputImage, TOutputImage, 
  itk::Connectivity&lt;Dimension, 0&gt;, DistanceImageType &gt; 
  SeedSkeletonFilterType;<br><br>There is no typename specified necessary here. 
  Actually, I think it&#39;s wrong to use it.<br><br>The second line after this one 
  in your mail might just be a copy-and-paste relict while you were composing 
  the mail. Because it doesn&#39;t make sense at all ...<br><br>The use of the 
  second typename for the pointer type declaration is fine and for compilers 
  like the VC6 also necessary.<br><br>Andreas<br><br><br>On Feb 1, 2010, at 
  11:20 PM, &lt;Neil.Burdett@csiro.au&gt; wrote:<br><br>&gt; Hi Bill and 
  Dan,<br>&gt;        thanks for the reply, but removing 
  typename, or replacing it with ITK_TYPENAME gives exactly the same error in 
  visual studio 2008;<br>&gt;<br>&gt; &quot;error C2242: typedef name cannot follow 
  class/struct/union&quot;<br>&gt;<br>&gt; The full extract of code I&#39;m using 
  is;<br>&gt;<br>&gt;  // Compute the seed image, by closing cavities and 
  holes with an ultimate skeleton of the cuboid image<br>&gt;  typedef 
  typename itk::UltimateSkeletonImageFilter&lt;TOutputImage, TOutputImage, 
  itk::Connectivity&lt;Dimension, 0&gt;, DistanceImageType &gt; 
  SeedSkeletonFilterType;<br>&gt; 
   itk::UltimateSkeletonImageFilter&lt;TOutputImage, TOutputImage, 
  itk::Connectivity&lt;Dimension, 0&gt;, DistanceImageType &gt; 
  SeedSkeletonFilterType;<br>&gt;<br>&gt;  typename 
  SeedSkeletonFilterType::Pointer seedSkeletonFilter = 
  SeedSkeletonFilterType::New();<br>&gt; 
   seedSkeletonFilter-&gt;SetInput(cuboidImage-&gt;GetOutput());<br>&gt; 
   seedSkeletonFilter-&gt;SetPriorityImage(distanceInvertIntensityFilter-&gt;GetOutput());<br>&gt; 
   seedSkeletonFilter-&gt;SetInhibitImage(parallelSkeletonFilter-&gt;GetOutput());<br>&gt; 
   try{<br>&gt;    seedSkeletonFilter-&gt;Update();<br>&gt; 
   } catch(itk::ExceptionObject &amp;ex) {<br>&gt;    throw 
  itk::ExceptionObject(&quot;milxTopologicalHolesFilling&quot;, 0, 
  std::string(&quot;Topological holes filling.. seed ultimate skeleton failed: &quot;) + 
  ex.GetDescription());<br>&gt;  }<br>&gt;<br>&gt; Neil<br>&gt;<br>&gt; 
  -----Original Message-----<br>&gt; From: Bill Lorensen [mailto:<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>]<br>&gt; 
  Sent: Monday, 1 February 2010 11:46 PM<br>&gt; To: Burdett, Neil (ICT Centre, 
  Herston - RBWH)<br>&gt; Cc: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>&gt; Subject: 
  Re: [Insight-users] typedef name cannot follow 
  class/struct/union<br>&gt;<br>&gt; I think the typename can be removed on both 
  Windows and linux. My<br>&gt; general rule for typename is that it is required 
  if there are no<br>&gt; template variables.<br>&gt;<br>&gt; For 
  example<br>&gt;<br>&gt; typedef Foo&lt;bar&gt; FooBarType;<br>&gt;<br>&gt; 
  typedef typename Foo::Pointer FooPointer;<br>&gt;<br>&gt; On Sun, Jan 31, 2010 
  at 11:39 PM,  &lt;Neil.Burdett@csiro.au&gt; wrote:<br>&gt;&gt; 
  Hi,<br>&gt;&gt;<br>&gt;&gt;     I am currently porting an 
  application from Ubuntu to windows. The line<br>&gt;&gt; of code below 
  compiles on Ubuntu but not on visual 
  studio...<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;   typedef 
  typename itk::UltimateSkeletonImageFilter&lt;TOutputImage,<br>&gt;&gt; 
  TOutputImage, itk::Connectivity&lt;Dimension, 0&gt;, DistanceImageType 
  &gt;<br>&gt;&gt; 
  SeedSkeletonFilterType;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; I 
  receive the error in visual studio 2008 &quot;error C2242: typedef name 
  cannot<br>&gt;&gt; follow 
  class/struct/union&quot;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Any help 
  would be appreciated.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; 
  Neil<br>&gt;&gt;<br>&gt;&gt; _____________________________________<br>&gt;&gt; 
  Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>&gt;&gt;<br>&gt;&gt; Visit other Kitware 
  open-source projects at<br>&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>&gt;&gt;<br>&gt;&gt; 
  Kitware offers ITK Training Courses, for more information visit:<br>&gt;&gt; 
  <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>&gt;&gt;<br>&gt;&gt; 
  Please keep messages on-topic and check the ITK FAQ at:<br>&gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>&gt;&gt;<br>&gt;&gt; 
  Follow this link to subscribe/unsubscribe:<br>&gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt; 
  _____________________________________<br>&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>&gt;<br>&gt; Visit other Kitware 
  open-source projects at<br>&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>&gt;<br>&gt; 
  Kitware offers ITK Training Courses, for more information visit:<br>&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>&gt;<br>&gt; 
  Please keep messages on-topic and check the ITK FAQ at:<br>&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>&gt;<br>&gt; Follow this 
  link to subscribe/unsubscribe:<br>&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br><br></div></div></blockquote></div><br></div></div>
</div>
</blockquote></div><br>