[Insight-users] vector cross product in itk???

Luis Ibanez luis.ibanez@kitware.com
Mon, 17 Mar 2003 22:53:23 -0500


Hi Ofri,

The cross product is defined only for 3D vector
in the itkVector.h file, in Insight/Code/Common.

You will find the implementation in itkVector.cxx file.

It is done as the operator^(). This is not a member method
but rather a set of external templated functions.

They are specialized for 3D, because it is the only dimension
in which the cross-product result in 3 numbers,.
(that we usually associate to another vector...even though
they are not the components of a vector).

Being more formal, the notion of cross-product should be
defined in terms of tensors, and in higher dimensions it
will not result in something that can be disguised as a
vector but rather an anti-symmetric tensor.

Being moderately formal, the result of the cross-product
in ITK should be represented as a CovariantVector instead
of the current returned Vector type. This will be the only
way in which it will behave consistently when mapped by Affine
transforms. That is,


if

       A  =   C  x   B

then

     T(A) = T(C) x T(B)


where T() is an affine transform,
C and B are  itk::Vectors
A is an      itk::CovariantVector
X is a cross product



Please let us know if you have further questions,


Thanks


Luis


-------------------

Ofri Sadowsky wrote:
> Hi,
> 
> I was searching for a long time for the operation of cross product of
> 3D vectors in ITK, and could not find it. Is it there at all?
> 
> 
> Ofri.
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>