[Insight-users] Pointer to itk image or filter of any type

Weiguang Guan guanw at rhpcs.mcmaster.ca
Mon Jun 20 12:20:14 EDT 2005


Hi ITK users,

I wonder if I could define a Pointer type of "generic" itk image or 
filter. By "generic" I mean the data type of itk image or filter is 
unknown, and it could be anything c++ legal type, e.g., unsigned char, 
short, int, float ...

I've tried (This is something I want)
	typedef itk::Image GenericITKImageType;
	typedef typename GenericITKImageType::Pointer 
GenericITKImagePointer;
and compiler complained "invalid use of template-name ...". I just want to 
get rid of "<float, 3>" in typedef itk::Image<float, 3> GenericITKImageType;

Does anyone have find a way to work this out? This is actually a c++ 
question, I think.

Thanks in advance.

Weiguang

-- 
========================================================
Weiguang Guan, Research Engineer
RHPCS, McMaster University
========================================================




More information about the Insight-users mailing list