[Insight-users] typedef name cannot follow class/struct/union

Bill Lorensen bill.lorensen at gmail.com
Mon Feb 1 23:46:37 EST 2010


Delete this line:
 itk::UltimateSkeletonImageFilter<TOutputImage, TOutputImage,
itk::Connectivity<Dimension, 0>, DistanceImageType >
SeedSkeletonFilterType;


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


More information about the Insight-users mailing list