Hi,
I need to take the average (mean) of a complex-valued vector image (i.e. the output should also be a complex vector). I am trying to do this with itk::StatisticsImageFilter
, however, I am getting the following compile error:
typedef typename vnl_numeric_traits<T>::abs_t abs_t;
^
/usr/local/include/ITK-4.13/vnl/vnl_vector.h:300:20: note: in instantiation of template class 'vnl_c_vector<itk::VariableLengthVector<std::__1::complex<double> > >' requested here
typedef typename vnl_c_vector<T>::abs_t abs_t;
^
/usr/local/include/ITK-4.13/itkArray.h:50:42: note: in instantiation of template class 'vnl_vector<itk::VariableLengthVector<std::__1::complex<double> > >' requested here
class ITK_TEMPLATE_EXPORT Array : public vnl_vector< TValue >
^
/usr/local/include/ITK-4.13/itkStatisticsImageFilter.h:173:27: note: in instantiation of template class 'itk::Array<itk::VariableLengthVector<std::__1::complex<double> > >' requested here
Array< RealType > m_ThreadSum;
^
../Source/Utils/qi_coil_combine.cpp:111:27: note: in instantiation of template class 'itk::StatisticsImageFilter<itk::VectorImage<std::__1::complex<float>, 3> >' requested here
auto stats = itk::StatisticsImageFilter<QI::VectorVolumeXF>::New();
^
/usr/local/include/ITK-4.13/vnl/vnl_numeric_traits.h:38:27: note: template is declared here
class VNL_TEMPLATE_EXPORT vnl_numeric_traits;
I assume this is because someone assumed no-one would be crazy enough to want a complex-vector mean, and so the required traits aren’t defined. Is it possible for me to define them myself and if so where?
Thanks.