[Insight-developers] possible tcon topics
Luis Ibanez
ibanez at cs.unc.edu
Thu Oct 26 15:39:26 EDT 2000
Hi Lydia,
Your right, the error appears inside a
class declaration an not inside a function.
(at least with VC++ 6.0)
Looks like if the enum "ImageDimension"
is not initialized for some reason.
I'm still wondering if it is a VC++ specific
error, have someone tried similar code
on gcc ?
Another possible way to force it to
be initialized is to declare another
enum inside the class myProcess.
So the template myProcess can still
be initialized with only one parameter.
Luis
==============================
#include <itkImage.h>
template <class TImage>
class myProcess {
enum { ImageDimension = TImage::ImageDimension };
typedef itk::Image<int, ImageDimension> TempImage;
typename TempImage::Pointer temp;
};
int main()
{
typedef itk::Image<float,3> myImageType;
myProcess<myImageType> process;
return 0;
}
--
______________________________________________________________________
Luis Ibanez
Research Assistant Professor - Division of Neurosurgery
University of North Carolina at Chapel Hill
CB# 7060, Chapel Hill, NC 27599
email : ibanez at cs.unc.edu home : http://www.cs.unc.edu/~ibanez
phone : (919)-843-9961 fax : (919)-966-6627
______________________________________________________________________
More information about the Insight-developers
mailing list