[Insight-users] how can I use the newmat C++ library for matrix operations

Luis Ibanez luis.ibanez at kitware.com
Thu Sep 29 11:20:46 EDT 2005


Hi Seniha,

ITK class names will not collide with class names from
other libraries because ITK uses the "itk::" namespace.

You can combine ITK with other C++ libraries that have
classes with the same name as ITK classes.

In any case...
note that ITK *already* has a Matrix library. This is
VNL from VXL. You should look at the Matrix operations
available in VNL:

         Insight/Utilities/vxl/core/vnl

It is likely that they already offer all what you need.


    Regards,


       Luis



------------------------------
Seniha Esen Yuksel wrote:
> Hi all,
> Do you know the newmat C++ library? It is a free matrix library 
> http://www.robertnz.net/ol_doc.htm  and it allows you to do the matrix 
> operations as if you are doing in matlab (such as C=A+B ).
>  
> Anyways, I wanted to include this into my project, but I figured that in 
> newmat.h, there is a class called MartixType such as:
>  
> -----------------------------------------------------------------------
> class MatrixType
> {
> public:
>    enum Attribute {  .....
> -----------------------------------------------------------------------
>  
> Well, also the itkRigid2DTransform.txx has such stuff  :-(
>  
> such as:
> -------------------------------------------------------------------------
> template<class TScalarType>
> void
> Rigid2DTransform<TScalarType>::
> SetRotationMatrix(const MatrixType & matrix )
> {
>   itkDebugMacro("setting  m_RotationMatrix  to " << matrix );
>   // The matrix must be orthogonal otherwise it is not
>   // representing a valid rotaion in 2D space
>   typename MatrixType::InternalMatrixType test =
>     matrix.GetVnlMatrix() * matrix.GetTranspose();
> ------------------------------------------------------------------------------
>  
>  
> Any easy way to get around this problem? Help will be very much appreciated,
>  
> Thanks a lot,
> Seniha
> 
> ------------------------------------------------------------------------
> Yahoo! for Good
> Click here to donate <http://store.yahoo.com/redcross-donate3/> to the 
> Hurricane Katrina relief effort.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list