[Insight-users] error C2440

corinnabuerger at gmx.de corinnabuerger at gmx.de
Thu Oct 19 12:07:24 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
-- 
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl


More information about the Insight-users mailing list