[Insight-developers] itkPoint / itkVector

Luis Ibanez ibanez@cs.unc.edu
Tue, 19 Dec 2000 22:49:14 -0500 (EST)


Hi,

There are some differences between the itkVector and
itkPoint that could be interesting to reduce.


1) To declare its template parameters they are now:

  itkPoint<  dimension, type >
  itkVector< type, dimension >

this one is not a big deal, but is misleading to 
use different orders in the declaration.


2) Currently to hold its data:

  itkVector : uses a vnl_vector_fixed<T,dimension> 
  itkPoint  : uses an array of T type

That makes difficult to use the itkPoint in computaions
using vxl numeric library. For example, to apply an
Affine transformation to a Point, we have to extract
its elements to a vnl_vector, in order to use the matrix
multiplication operator defined in vnl, or perform
the matrix multiplication explicitly.


3) itkPoint uses the terms "Coord" and "CoordRep"
as contractions. That makes its API looks quite
different from the itkVector API.


4) Additionally it could be convenient to define
operation between points and vectors, like

   Vector = Point - Point
   Point  = Point + Vector
   Point  = Point - Vector

Which are quite common in reference systems, and
help to maintain the differences between points and
vectors specially with respect to their behavior
under transformations.


----

In general the presentation of itkVector seems to be
more appropiated for coordinates computation, maybe
it would be convenient to make itkPoint look similar.


Could that changes introduces problems for other uses
of the itkPoint ? ( eg. in itkMesh ).




Thanks,


Luis