目前我正在做:
if(dimension == 2) { typedef itk::Image<short,2> ImageType; typedef itk::Image<unsigned int,2> IntegralImageType; m_pApp->train<2,ImageType,IntegralImageType>(); } else { typedef itk::Image<short,3> ImageType; typedef itk::Image<unsigned int,3> IntegralImageType; m_pApp->train<3,IntegralImageType>(); }
但我想这样做:@H_502_5@
if (dimension == 2) DIMENSION = 2; else DIMENSION = 3; typedef itk::Image<short,DIMENSION> ImageType; typedef itk::Image<unsigned int,DIMENSION> IntegralImageType; m_pApp->train<DIMENSION,IntegralImageType>();