[Insight-users] itkMatrix

Corinne Mattmann mattmaco at ee . ethz . ch
Mon, 15 Dec 2003 13:03:15 -0700


Hi,

I would like to use the class itkMatrix. I tried itkMatrixTest.cxx and
everything was working fine.
But if I change the code to non-square matrices, I get the following
compiling error: 


Compiling...
TestExtrapolateDeformationFieldFilter.cxx
D:\packwin\vtkMy\src\TestProjects\TestExtrapolateDeformationFieldFilter\
ExtrapolateDeformationFieldFilter.txx(238) : error C2678: binary '*' :
no operator defined which takes a left-hand operand of type 'class
itk::Matrix<float,2,3>' (or there is no acceptable conversion)
        D:\packwin\itk\Insight\Code\Common\itkImportImageContainer.h(87)
: while compiling class-template member function 'void __thiscall
itk::ExtrapolateDeformationFieldFilter<class itk::Image<class
itk::Vector<float,3>,3>,class itk::Image<class itk::Vector<float,3>,3>
>::LinearExtrapolation(void)'
Error executing cl.exe.



What am I doing wrong?
Here's the code I'm using:


  typedef Matrix<float,2,3> MatrixType;
  typedef Matrix<float,3,2> Matrix2Type;
  typedef Matrix<float,2,2> MatrixProductType;

  MatrixType matrix;
  matrix.Fill( 0.0 );
  matrix.SetIdentity();

  Matrix2Type matrix2;
  matrix2.SetIdentity();
  matrix2.GetVnlMatrix()(0,0) = 10;

  MatrixProductType matrixProduct;
  matrixProduct = matrix * matrix2;


Thanks very much,
Corinne