Convert Cimg to ITK
问题 I'm trying to convert a Cimg image to itk image to use it for registration algorithm. The Cimg is a RGB image and i want to convert it to RGB itk image. Her is my code : void Cimg_To_ITK (CImg<uchar> img) { const unsigned int Dimension = 2; typedef itk::RGBPixel< unsigned char > RGBPixelType; typedef itk::Image< RGBPixelType, Dimension > RGBImageType; typedef itk::ImportImageFilter< RGBPixelType, Dimension > ImportFilterType; ImportFilterType::Pointer importFilter = ImportFilterType::New();