[Insight-users] error in itkSymmetricEigenSystem

Arnaud GELAS gelas at creatis.insa-lyon.fr
Fri Jun 3 05:09:53 EDT 2005


Hi all,

There SEEMS there could be a bug at line 89 of VERSION 2.0.1 of
itkSymmetricEigenSystem.txx, which goes
      tempVector = internalEigenSystem.get_eigenvector(i) ;
since internalEigenSystem.get_eigenvector(i) is of type
  vnl_vector< TMatrixElement > EigenVectorType
and tempVector is localy declared as vnl_vector< double >.
Hence this line will fail for any type TMatrixElement which is not
exactly "double".

In order to fix the problem, we suggest (the easiest thing) to add
a new typedef in the header file itkSymmetricEigenSystem.h :
    typedef vnl_vector< TMatrixElement > EigenVectorType;

Then it would suffice to change the declaration of tempVector from
vnl_vector< double > to EigenVectorType at the line 85 of
itkSymmetricEigenSystem.txx :
    EigenVectorType tempVector;

Another possible solution is to provide coercion from
vnl_vector< TMatrixElement > to vnl_vector< double > (do we wish this,
and is it actually possible !? ).

Best Regards,

Frog & Arnaud



More information about the Insight-users mailing list