[Insight-developers] Template function specialization

antonin perrot-audet antonin07130 at gmail.com
Tue Jan 18 10:14:05 EST 2011


Hello,

I am writing a filter that works differently for 2D and 3D data. I would 
like to specialize the generatedata, for processing in a different 
manner 2D and 3D images :


Here is what I try :

template< class InputImageType, class OutputImageType >
void
FooFilter< typename itk::Image< typename InputImageType::PixelType, 2 >,
typename itk::Image< typename OutputImageType::PixelType, 2 > >::
GenerateData()


And I get a " error: invalid use of incomplete type ‘class 
itk::SubjectiveSurfaceEvolutionFilter<itk::Image<typename 
InputImageType::PixelType, 2u>, itk::Image<typename 
OutputImageType::PixelType, 2u> >’ "


Is there any basic ITK filter that does the same ?

Thanks a lot !
Best,

Antonin


More information about the Insight-developers mailing list