[Insight-users] itk matrix operations
Ugur BOZKAYA
u.bozkaya at fmcon.com
Mon Apr 17 10:18:09 EDT 2006
Hi,
use the vnl classes. After having vnl_matrix types you can use the
arithmetic operator directly to do the operations. see below
#include <vnl/vnl_matrix.h>
#include <vnl/vnl_vector.h>
#include <vnl/vnl_matrix_fixed.h>
#include <vnl/vnl_vector_fixed.h>
#include <vnl/algo/vnl_matrix_inverse.h>
... and more
vnl_matrix_fixed<double,2,2> currentTensor;
vnl_matrix_fixed<double,2,1> currentVector;
currentTensor(0,0) = 1;
currentTensor(0,1) = 1;
currentTensor(1,0) = 1;
currentTensor(1,1) = 1;
currentVector(0,0)= 1;
currentVector(0,1)= 1;
currentVector.transpose()*currentTensor*currentVector;
Ugur BOZKAYA
----- Original Message -----
From: "sami bourouis" <sami.bourouis at hotmail.com>
To: <insight-users at itk.org>
Sent: Monday, April 17, 2006 4:22 PM
Subject: [Insight-users] itk matrix operations
> Hi ,
>
> I need to know what is the good way to declare and initialize matrix (n*m)
> using itk and I need How can multiply two matrix(n*m), get the inverse,
> muliplication by scalar, by vector ?
> what is the appropriate class for make operations (addition,
> multiplication, inverse, ...)
> thanks,
>
> _________________________________________________________________
> Testez Windows Llive Mail Beta !
> http://www.msn.fr/newhotmail/Default.asp?Ath=f
>
> _______________________________________________
> 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