我正在使用ITK。 itk::LinearInterpolateImageFunction
是itk::InterpolateImageFunction
的一個子類。C++抽象類型聲明
爲什麼下面的表述無效?
itk::InterpolateImageFunction<ImageType,double>::Pointer interpolator = itk::LinearInterpolateImageFunction<ImageType, double>::New();
我得到的錯誤是
error: conversion from
itk::LinearInterpolateImageFunction<itk::Image<unsigned char, 3u>, double>::Pointer {aka itk::SmartPointer<itk::LinearInterpolateImageFunction<itk::Image<unsigned char, 3u>, double> >}
to non-scalar typeitk::InterpolateImageFunction<itk::Image<unsigned char, 3u>, double>::Pointer {aka itk::SmartPointer<itk::InterpolateImageFunction<itk::Image<unsigned char, 3u>, double> >}
requested