I want to use a MutualInformationImageToImageMetric type between two images with std::complex<double> at their pixel type:<br><br>typedef std::complex< double > COMPLEXPIXEL;<br>typedef itk::Image< COMPLEXPIXEL , 3> ImageType; <br>typedef itk::MutualInformationImageToImageMetric<ImageType,ImageType> MetricType;<br>MetricType::Pointer metric = MetricType::New();<br><br>VC++6.0/win2K produces compiler errors listed below regarding instantiating the metric pointer. Though, I've seen std::complex<double> being used as a pixel type for itk::Image<,> in other examples. Does anyone know if it is possible to use std::complex<> in the imagetype template for the MutualInformationImageToImageMetric or for any other ITK metric? <br><br>Regards,<br>Rick<br><br><br><br>C:\InsightToolkit-2.2.0\Code\BasicFilters\itkRecursiveSeparableImageFilter.txx(306) : error C2440: 'static_cast' : cannot convert from 'class
std::complex<double>' to 'float'<br> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member function 'void __thiscall itk::RecursiveSeparableImageFilter<class itk::Image<class std::complex<double>,3>,class itk::Image<float,3> <br>>::GenerateData(void)'<br>C:\InsightToolkit-2.2.0\Code\BasicFilters\itkGradientRecursiveGaussianImageFilter.txx(226) : error C2784: 'class vnl_vector_fixed<T,n> __cdecl operator /(const class vnl_vector_fixed<T,n> &,T)' : could not deduce template argument for 'const class v<br>nl_vector_fixed<T,n> &' from 'float'<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling
class-template member function 'void __thiscall itk::GradientRecursiveGaussianImageFilter<class itk::Image<class std::complex<double>,3>,class itk::Image<cl<br>ass itk::CovariantVector<class std::complex<double>,3>,3> >::GenerateData(void)'<br>C:\InsightToolkit-2.2.0\Code\BasicFilters\itkGradientRecursiveGaussianImageFilter.txx(226) : error C2784: 'class vnl_matrix_fixed<T,m,n> __cdecl operator /(const class vnl_matrix_fixed<T,m,n> &,T)' : could not deduce template argument for 'const cla<br>ss vnl_matrix_fixed<T,num_rows,num_cols> &' from 'float'<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member function 'void __thiscall itk::GradientRecursiveGaussianImageFilter<class itk::Image<class std::complex<double>,3>,class itk::Image<cl<br>ass itk::CovariantVector<class
std::complex<double>,3>,3> >::GenerateData(void)'<br>C:\InsightToolkit-2.2.0\Code\BasicFilters\itkGradientRecursiveGaussianImageFilter.txx(226) : error C2782: 'class std::complex<_Ty> __cdecl std::operator /(const _Ty &,const class std::complex<_Ty> &)' : template parameter '_Ty' is ambiguous<br> could be 'double'<br> or 'float'<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member function 'void __thiscall itk::GradientRecursiveGaussianImageFilter<class itk::Image<class std::complex<double>,3>,class itk::Image<cl<br>ass itk::CovariantVector<class std::complex<double>,3>,3> >::GenerateData(void)'<br>C:\InsightToolkit-2.2.0\Code\BasicFilters\itkGradientRecursiveGaussianImageFilter.txx(226)
: error C2784: 'class std::complex<_Ty> __cdecl std::operator /(const class std::complex<_Ty> &,const _Ty &)' : could not deduce template argument for 'const <br>class std::complex<_Ty> &' from 'float'<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member function 'void __thiscall itk::GradientRecursiveGaussianImageFilter<class itk::Image<class std::complex<double>,3>,class itk::Image<cl<br>ass itk::CovariantVector<class std::complex<double>,3>,3> >::GenerateData(void)'<br>C:\InsightToolkit-2.2.0\Code\BasicFilters\itkGradientRecursiveGaussianImageFilter.txx(226) : error C2784: 'class std::complex<_Ty> __cdecl std::operator /(const class std::complex<_Ty> &,const class std::complex<_Ty> &)' : could not deduce template <br>argument for 'const class std::complex<_Ty> &' from
'float'<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member function 'void __thiscall itk::GradientRecursiveGaussianImageFilter<class itk::Image<class std::complex<double>,3>,class itk::Image<cl<br>ass itk::CovariantVector<class std::complex<double>,3>,3> >::GenerateData(void)'<br>C:\InsightToolkit-2.2.0\Code\BasicFilters\itkGradientRecursiveGaussianImageFilter.txx(226) : error C2677: binary '/' : no global operator defined which takes type 'const class std::complex<double>' (or there is no acceptable conversion)<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member function 'void __thiscall itk::GradientRecursiveGaussianImageFilter<class itk::Image<class std::complex<double>,3>,class itk::Image<cl<br>ass
itk::CovariantVector<class std::complex<double>,3>,3> >::GenerateData(void)'<br>C:\InsightToolkit-2.2.0\Code\Common\itkCentralDifferenceImageFunction.txx(78) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'const class std::complex<double>' (or there is no acceptable conversion)<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member function 'class itk::CovariantVector<double,3> __thiscall itk::CentralDifferenceImageFunction<class itk::Image<class std::complex<doub<br>le>,3>,double>::EvaluateAtIndex(const class itk::Index<3> &) const'<br>C:\InsightToolkit-2.2.0\Code\Common\itkCentralDifferenceImageFunction.txx(81) : error C2784: 'class std::complex<_Ty> &__cdecl std::operator -=(class std::complex<_Ty> &,const class std::complex<_U> &)' : could not
deduce template argument for 'clas<br>s std::complex<_Ty> &' from 'double'<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member function 'class itk::CovariantVector<double,3> __thiscall itk::CentralDifferenceImageFunction<class itk::Image<class std::complex<doub<br>le>,3>,double>::EvaluateAtIndex(const class itk::Index<3> &) const'<br>C:\InsightToolkit-2.2.0\Code\Common\itkCentralDifferenceImageFunction.txx(81) : error C2677: binary '-=' : no global operator defined which takes type 'const class std::complex<double>' (or there is no acceptable conversion)<br> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(583) : while compiling class-template member function 'class itk::CovariantVector<double,3> __thiscall itk::CentralDifferenceImageFunction<class
itk::Image<class std::complex<doub<br>le>,3>,double>::EvaluateAtIndex(const class itk::Index<3> &) const'<br>Error executing cl.exe.<br><p>
                <hr size=1>Blab-away for as little as 1¢/min. Make <a href="http://us.rd.yahoo.com/mail_us/taglines/postman2/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com"> PC-to-Phone Calls</a> using Yahoo! Messenger with Voice.