[Insight-users] multiplying a vnl_matrix with a vnl_vector
michiel mentink
michael.mentink at st-hughs.ox.ac.uk
Wed Mar 31 05:21:05 EDT 2010
I'd like to do the following calculation, a translate:
A =
[ 1 0 0 2 ]
[ 0 1 0 3 ]
[ 0 0 1 4 ]
B = [ x y z 1 ]
FinalOrigin = A * B' = [x+2 y+3 z+4 ]
For that, I have got the following code:
typedef itk::Matrix<double,3,4> Matrix3by4Type;
typedef itk::Vector<double,4> Vector4Type;
Matrix3by4Type Translation;
Vector4Type FinalOrigin;
FinalOrigin[0] = origin[0]; FinalOrigin[1] = origin[1]; FinalOrigin[2] =
origin[2]; FinalOrigin[3] = 1;
FinalOrigin = Translation * FinalOrigin;
1)
Is it possible to multiply an itk::vector with an itk::matrix in ITK?
2)
There is no transpose available for the vnl_vector type, that is implemented
in ITK.
Or is there?
I know that there are other methods in ITK to do translation, but for my
understanding, I'd like
to figure this out.
cheers,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100331/8606e767/attachment-0001.htm>
More information about the Insight-users
mailing list