[Insight-users] question about writing a template with itk

kdsfinger at gmail.com kdsfinger at gmail.com
Thu Aug 17 18:04:19 EDT 2006


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


More information about the Insight-users mailing list