[Insight-users] itkMatrix : bug ID 412
Luis Ibanez
luis . ibanez at kitware . com
Mon, 15 Dec 2003 15:52:28 -0500
Hi Corinne,
What version of ITK are you using ?
This seems to be related to a bug in itkMatrix.txx that
was recently fixed.
It is bug ID=412:
http://www . itk . org/Bug/bug . php?op=show&bugid=412&pos=5
The return type of the operator*() in itk::Matrix<> was
incorrect. This prevented non-square matrices to multiply
correctly.
The bug report was made on the users-list:
http://www . itk . org/pipermail/insight-users/2003-November/005710 . html
The notification for the fix was:
http://www . itk . org/pipermail/insight-users/2003-December/005726 . html
You may have to update your CVS checkout.
Please look at the instructions posted in the recent email:
http://www . itk . org/pipermail/insight-users/2003-December/005930 . html
Regards,
Luis
----------------------------
Corinne Mattmann wrote:
> 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
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>