[Insight-developers] Enlarging the semantics of itkVector?

Paul Hughett hughett@mercur.uphs.upenn.edu
Thu, 21 Dec 2000 10:46:41 -0500


Luis Ibanez and I have been thrashing out some disagreements about the
interface to the itkAffineTransform class and have--I think--come to
an agreement that the right solution requires either enlarging the
semantics of the itkVector class or adding a new flavor of Vector
class.

The key issue is that the term "vector" is overloaded and carries
distinct meanings in geometry and computer science.  In geometry, a
vector is the difference between two points and transforms in a
particular way under an affine transform; that is, you multiply by the
matrix part of the affine transform, omitting the constant part.  The
definition of vector in a vector space is slightly different but
consistent with the geometrical definition.  In computer science, on
the other hand, a vector is simply an ordered collection of scalar
values, with no implied transformation properties; in fact, it is not
even guaranteed that any transformation is possible.  (In mathematical
physics there is a further distinction between vectors and pseudovectors,
based on how they transform under parity transformations; as far as
I know, we can ignore that particular distinction.)  The itkVector
class, as currently defined, is a vector in the CS sense but not the
geometrical sense.

The AffineTransform class needs to distinguish between (geometrical)
points and vectors, since they transform differently.  The simplest
way to do this is to represent points and vectors by different
classes.

So--should we create a new class GeomVector to represent geometrical
vectors, as distinct from CS vectors?  Or should we overload the
existing itkVector class to represent both geometrical and CS vectors?

Paul Hughett