<!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> </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< DistancePixelType, Dimension >
DistanceImageType;</FONT></P>
<P><FONT size=2></FONT> </P>
<P><SPAN class=674250100-03022010><FONT face=Arial color=#0000ff size=2>Note
that in the same file we have a number of other typedef that
compile 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<TOutputImage, DistanceImageType>
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<TOutputImage, TOutputImage,
itk::Connectivity<Dimension, 0> >
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<TOutputImage,
TOutputImage> 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> </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> </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><Neil.Burdett@csiro.au></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>
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> // Compute the seed image, by closing cavities and
holes with an ultimate skeleton of the cuboid image<BR></DIV> typedef
itk::UltimateSkeletonImageFilter<TOutputImage, TOutputImage,
itk::Connectivity<Dimension, 0>, DistanceImageType >
SeedSkeletonFilterType;<BR>
<DIV class=im><BR> typename SeedSkeletonFilterType::Pointer
seedSkeletonFilter =
SeedSkeletonFilterType::New();<BR> seedSkeletonFilter->SetInput(cuboidImage->GetOutput());<BR> seedSkeletonFilter->SetPriorityImage(distanceInvertIntensityFilter->GetOutput());<BR> seedSkeletonFilter->SetInhibitImage(parallelSkeletonFilter->GetOutput());<BR> try{<BR>
seedSkeletonFilter->Update();<BR> } catch(itk::ExceptionObject
&ex) {<BR> throw
itk::ExceptionObject("milxTopologicalHolesFilling", 0,
std::string("Topological holes filling.. seed ultimate skeleton failed: ") +
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 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
itk::UltimateSkeletonImageFilter<TOutputImage, TOutputImage,
itk::Connectivity<Dimension, 0>, DistanceImageType >
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, <Neil.Burdett@csiro.au> wrote:<BR><BR>> Hi Bill and
Dan,<BR>> thanks for the reply, but removing
typename, or replacing it with ITK_TYPENAME gives exactly the same error in
visual studio 2008;<BR>><BR>> "error C2242: typedef name cannot follow
class/struct/union"<BR>><BR>> The full extract of code I'm using
is;<BR>><BR>> // Compute the seed image, by closing cavities and
holes with an ultimate skeleton of the cuboid image<BR>> typedef
typename itk::UltimateSkeletonImageFilter<TOutputImage, TOutputImage,
itk::Connectivity<Dimension, 0>, DistanceImageType >
SeedSkeletonFilterType;<BR>>
itk::UltimateSkeletonImageFilter<TOutputImage, TOutputImage,
itk::Connectivity<Dimension, 0>, DistanceImageType >
SeedSkeletonFilterType;<BR>><BR>> typename
SeedSkeletonFilterType::Pointer seedSkeletonFilter =
SeedSkeletonFilterType::New();<BR>>
seedSkeletonFilter->SetInput(cuboidImage->GetOutput());<BR>>
seedSkeletonFilter->SetPriorityImage(distanceInvertIntensityFilter->GetOutput());<BR>>
seedSkeletonFilter->SetInhibitImage(parallelSkeletonFilter->GetOutput());<BR>>
try{<BR>> seedSkeletonFilter->Update();<BR>>
} catch(itk::ExceptionObject &ex) {<BR>> throw
itk::ExceptionObject("milxTopologicalHolesFilling", 0,
std::string("Topological holes filling.. seed ultimate skeleton failed: ") +
ex.GetDescription());<BR>> }<BR>><BR>> Neil<BR>><BR>>
-----Original Message-----<BR>> From: Bill Lorensen [mailto:<A
href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</A>]<BR>>
Sent: Monday, 1 February 2010 11:46 PM<BR>> To: Burdett, Neil (ICT Centre,
Herston - RBWH)<BR>> Cc: <A
href="mailto:insight-users@itk.org">insight-users@itk.org</A><BR>> Subject:
Re: [Insight-users] typedef name cannot follow
class/struct/union<BR>><BR>> I think the typename can be removed on both
Windows and linux. My<BR>> general rule for typename is that it is required
if there are no<BR>> template variables.<BR>><BR>> For
example<BR>><BR>> typedef Foo<bar> FooBarType;<BR>><BR>>
typedef typename Foo::Pointer FooPointer;<BR>><BR>> On Sun, Jan 31, 2010
at 11:39 PM, <Neil.Burdett@csiro.au> wrote:<BR>>>
Hi,<BR>>><BR>>> I am currently porting an
application from Ubuntu to windows. The line<BR>>> of code below
compiles on Ubuntu but not on visual
studio...<BR>>><BR>>><BR>>><BR>>> typedef
typename itk::UltimateSkeletonImageFilter<TOutputImage,<BR>>>
TOutputImage, itk::Connectivity<Dimension, 0>, DistanceImageType
><BR>>>
SeedSkeletonFilterType;<BR>>><BR>>><BR>>><BR>>> I
receive the error in visual studio 2008 "error C2242: typedef name
cannot<BR>>> follow
class/struct/union"<BR>>><BR>>><BR>>><BR>>> Any help
would be appreciated.<BR>>><BR>>><BR>>><BR>>>
Neil<BR>>><BR>>> _____________________________________<BR>>>
Powered by <A href="http://www.kitware.com"
target=_blank>www.kitware.com</A><BR>>><BR>>> Visit other Kitware
open-source projects at<BR>>> <A
href="http://www.kitware.com/opensource/opensource.html"
target=_blank>http://www.kitware.com/opensource/opensource.html</A><BR>>><BR>>>
Kitware offers ITK Training Courses, for more information visit:<BR>>>
<A href="http://www.kitware.com/products/protraining.html"
target=_blank>http://www.kitware.com/products/protraining.html</A><BR>>><BR>>>
Please keep messages on-topic and check the ITK FAQ at:<BR>>> <A
href="http://www.itk.org/Wiki/ITK_FAQ"
target=_blank>http://www.itk.org/Wiki/ITK_FAQ</A><BR>>><BR>>>
Follow this link to subscribe/unsubscribe:<BR>>> <A
href="http://www.itk.org/mailman/listinfo/insight-users"
target=_blank>http://www.itk.org/mailman/listinfo/insight-users</A><BR>>><BR>>><BR>>
_____________________________________<BR>> Powered by <A
href="http://www.kitware.com"
target=_blank>www.kitware.com</A><BR>><BR>> Visit other Kitware
open-source projects at<BR>> <A
href="http://www.kitware.com/opensource/opensource.html"
target=_blank>http://www.kitware.com/opensource/opensource.html</A><BR>><BR>>
Kitware offers ITK Training Courses, for more information visit:<BR>> <A
href="http://www.kitware.com/products/protraining.html"
target=_blank>http://www.kitware.com/products/protraining.html</A><BR>><BR>>
Please keep messages on-topic and check the ITK FAQ at:<BR>> <A
href="http://www.itk.org/Wiki/ITK_FAQ"
target=_blank>http://www.itk.org/Wiki/ITK_FAQ</A><BR>><BR>> Follow this
link to subscribe/unsubscribe:<BR>> <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>