[Insight-users] question about writing a template with itk
Miller, James V (GE, Research)
millerjv at crd.ge.com
Fri Aug 18 10:32:28 EDT 2006
You probably need a typename keyword
typedef itk::VTKImageExport<typename InputImageType>
itkVTKImageExportType;
-----Original Message-----
From: insight-users-bounces+millerjv=crd.ge.com at itk.org
[mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org] On Behalf Of
kdsfinger at gmail.com
Sent: Thursday, August 17, 2006 6:04 PM
To: Insight-users at itk.org
Subject: [Insight-users] question about writing a template with itk
hi, all
I am trying to write a c++ template class to read and display different
pixel format of images (unsigned char, unsigned short, etc).
Here is a few lines of codes of my header file.
template<class T>
class myBase{
public:
typedef itk::Image<T, 3> InputImageType; //ok
/** Type of image exported from ITK to VTK */
typedef itk::VTKImageExport<InputImageType> itkVTKImageExportType;
//error
//...
}
When I tried to compile, I got the following error message:
type 'itk::VTKImageExport<itk::Image<T, 3u> >' is not derived from type
'myBase<T>'
What does it mean? How may I correct my program? Thanks for your help.
zl2k
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list