[Insight-users] error C2440

"Corinna Bürger" corinna.buerger at gmx.net
Thu Oct 19 12:05:32 EDT 2006


Hello, 

I get the following error: "C:\Insight\itk\Insight\Code\Common\itkVariableLengthVector.h(267) : error C2440: 'static_cast' : cannot convert from 'class itk::VariableSizeMatrix<double>' to 'double'".
My code is something like:

typedef itk::VariableLengthVector< double > VectorType;
typedef itk::VariableSizeMatrix< double > MatrixType;

VectorType sP = VectorType();
sP.SetSize( 8 );
sP.Fill( 0.0 );

typedef itk::SymmetricEigenAnalysis< MatrixType, VectorType, MatrixType > EigenAnalysisType;
EigenAnalysisType eigenAnalysis = EigenAnalysisType( covarianceMatrix.Cols() );
eigenvalues = EigenvalueSampleType();
eigenvalues.SetSize( covarianceMatrix.Cols() );
eigenvalues.Fill( 0 );
eigenvectors = EigenvectorSampleType();
eigenvectors.SetSize( covarianceMatrix.Cols(), covarianceMatrix.Cols() );
eigenvectors.Fill( 0 );

eigenAnalysis.ComputeEigenValuesAndVectors( covarianceMatrix, eigenvalues, eigenvectors );

eigenvectors*sP; 

The last line is the one that produces that error. I just want to perform a multiplication of the vector and the matrix. What is wrong there?
Any help is greatly appreciated!

Bye, 

Corinna


-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the Insight-users mailing list