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"><Neil.Burdett@csiro.au></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< DistancePixelType, Dimension >
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<TOutputImage, DistanceImageType>
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<TOutputImage, TOutputImage,
itk::Connectivity<Dimension, 0> >
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<TOutputImage,
TOutputImage> 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"><Neil.Burdett@csiro.au></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 "typename" I continue to get the same error:<br>
<div><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><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><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><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<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" target="_blank">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" target="_blank">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></div></div>
</div>
</blockquote></div><br>