<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.13" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=674250100-03022010><FONT face=Arial 
color=#0000ff size=2>Hi Andreas;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=674250100-03022010><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=674250100-03022010>
<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>&nbsp;</P>
<P><SPAN class=674250100-03022010><FONT face=Arial color=#0000ff size=2>Note 
that in the same file&nbsp;we have a number of other typedef that 
compile&nbsp;fine i.e.</FONT></SPAN></P><SPAN class=674250100-03022010>
<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 class=674250100-03022010><FONT face=Arial color=#0000ff 
size=2>....</FONT></SPAN></P><SPAN class=674250100-03022010>
<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 class=674250100-03022010><FONT size=2>...</FONT></SPAN></P><SPAN 
class=674250100-03022010><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 class=674250100-03022010><FONT size=2>etc...</FONT></SPAN></P>
<P><SPAN class=674250100-03022010><FONT size=2></FONT></SPAN>&nbsp;</P>
<P><SPAN class=674250100-03022010><FONT size=2>Maybe its an issue with 
</FONT><FONT size=3>itk::UltimateSkeletonImageFilter ??</FONT></SPAN></P>
<P><SPAN class=674250100-03022010>Neil</SPAN></P></SPAN>
<P><FONT face=Arial color=#0000ff 
size=2></FONT>&nbsp;</P></SPAN></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Andreas Schuh 
[mailto:andreas.schuh.84@googlemail.com] <BR><B>Sent:</B> Wednesday, 3 February 
2010 9:41 AM<BR><B>To:</B> Burdett, Neil (ICT Centre, Herston - 
RBWH)<BR><B>Subject:</B> Re: [Insight-users] typedef name cannot follow 
class/struct/union<BR></FONT><BR></DIV>
<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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hi 
  Andreas and Bill,<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; Thanks for the replies. As mentioned in my previous post if I remove 
  the "typename" I continue to get the same error:<BR>
  <DIV class=im><BR>"error C2242: typedef name cannot follow 
  class/struct/union"<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 class=im><BR>&nbsp;// Compute the seed image, by closing cavities and 
  holes with an ultimate skeleton of the cuboid image<BR></DIV>&nbsp;typedef 
  itk::UltimateSkeletonImageFilter&lt;TOutputImage, TOutputImage, 
  itk::Connectivity&lt;Dimension, 0&gt;, DistanceImageType &gt; 
  SeedSkeletonFilterType;<BR>
  <DIV class=im><BR>&nbsp;typename SeedSkeletonFilterType::Pointer 
  seedSkeletonFilter = 
  SeedSkeletonFilterType::New();<BR>&nbsp;seedSkeletonFilter-&gt;SetInput(cuboidImage-&gt;GetOutput());<BR>&nbsp;seedSkeletonFilter-&gt;SetPriorityImage(distanceInvertIntensityFilter-&gt;GetOutput());<BR>&nbsp;seedSkeletonFilter-&gt;SetInhibitImage(parallelSkeletonFilter-&gt;GetOutput());<BR>&nbsp;try{<BR>&nbsp; 
  &nbsp;seedSkeletonFilter-&gt;Update();<BR>&nbsp;} catch(itk::ExceptionObject 
  &amp;ex) {<BR>&nbsp; &nbsp;throw 
  itk::ExceptionObject("milxTopologicalHolesFilling", 0, 
  std::string("Topological holes filling.. seed ultimate skeleton failed: ") + 
  ex.GetDescription());<BR>&nbsp;}<BR><BR></DIV>Anymore ideas? This error occurs 
  on both VS 2005 and VS 2008<BR><BR>Cheers<BR>Neil<BR>
  <DIV class=im><BR>-----Original Message-----<BR>From: Andreas Schuh [mailto:<A 
  href="mailto:andreas.schuh.84@googlemail.com">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 class=h5>Cc: itk<BR>Subject: Re: [Insight-users] typedef name cannot 
  follow class/struct/union<BR><BR>Hi Neil,<BR><BR>Try<BR><BR>typedef 
  &nbsp;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'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'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; &nbsp; &nbsp; &nbsp; &nbsp;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; "error C2242: typedef name cannot follow 
  class/struct/union"<BR>&gt;<BR>&gt; The full extract of code I'm using 
  is;<BR>&gt;<BR>&gt; &nbsp;// Compute the seed image, by closing cavities and 
  holes with an ultimate skeleton of the cuboid image<BR>&gt; &nbsp;typedef 
  typename itk::UltimateSkeletonImageFilter&lt;TOutputImage, TOutputImage, 
  itk::Connectivity&lt;Dimension, 0&gt;, DistanceImageType &gt; 
  SeedSkeletonFilterType;<BR>&gt; 
  &nbsp;itk::UltimateSkeletonImageFilter&lt;TOutputImage, TOutputImage, 
  itk::Connectivity&lt;Dimension, 0&gt;, DistanceImageType &gt; 
  SeedSkeletonFilterType;<BR>&gt;<BR>&gt; &nbsp;typename 
  SeedSkeletonFilterType::Pointer seedSkeletonFilter = 
  SeedSkeletonFilterType::New();<BR>&gt; 
  &nbsp;seedSkeletonFilter-&gt;SetInput(cuboidImage-&gt;GetOutput());<BR>&gt; 
  &nbsp;seedSkeletonFilter-&gt;SetPriorityImage(distanceInvertIntensityFilter-&gt;GetOutput());<BR>&gt; 
  &nbsp;seedSkeletonFilter-&gt;SetInhibitImage(parallelSkeletonFilter-&gt;GetOutput());<BR>&gt; 
  &nbsp;try{<BR>&gt; &nbsp; &nbsp;seedSkeletonFilter-&gt;Update();<BR>&gt; 
  &nbsp;} catch(itk::ExceptionObject &amp;ex) {<BR>&gt; &nbsp; &nbsp;throw 
  itk::ExceptionObject("milxTopologicalHolesFilling", 0, 
  std::string("Topological holes filling.. seed ultimate skeleton failed: ") + 
  ex.GetDescription());<BR>&gt; &nbsp;}<BR>&gt;<BR>&gt; Neil<BR>&gt;<BR>&gt; 
  -----Original Message-----<BR>&gt; From: Bill Lorensen [mailto:<A 
  href="mailto:bill.lorensen@gmail.com">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">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, &nbsp;&lt;Neil.Burdett@csiro.au&gt; wrote:<BR>&gt;&gt; 
  Hi,<BR>&gt;&gt;<BR>&gt;&gt; &nbsp; &nbsp; 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; &nbsp; 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 "error C2242: typedef name 
  cannot<BR>&gt;&gt; follow 
  class/struct/union"<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></BODY></HTML>