[Insight-users] Normals of SpatialSurfaceObjectPoint

Luis Ibanez luis.ibanez at kitware.com
Tue Jul 13 15:25:31 EDT 2004


Hi Martin,


    Normals to surfaces are not Vectors.


It is unfortunately a common misconception to
associate Vectors with Normals to surfaces.


A Vector is the difference between two points
in space.  A Normal is the direction perpendicular
to a plane in space, and that's represented by  a
CovariantVector.

The distinction between a Vector and a CovariantVector
becomes evident when you consider anisotropic scaling
in space.

Here is an easy excercise that will illustrate that
distinction:

Take a piece of paper and draw a orthogonal coordinate
system, with X and Y axis.   Put a point "A" on the origin
(0,0) and a point "B" in coordinates (1,1). Draw a circle
centered in the point A and passing through point B.

The Vector BA can be defined as the relative position between
point B and point A. The Components of Vector BA are (1,1).

The  Normal to the circle at point "B" is the direction
orthogonal to the line tangent to the circle at point "B".
The components of the CovarianVector normal to the circle
at point "B" are (1,1). The circle will have radius sqrt(2).


         So, far this is trivial  :-)


Now, to have some fun, apply a scale of 2 to the horizontal
direction of the same drawing.

Point "B" is now at coordinates(2,1), point "A" stays at
(0,0).  The Vector BA becomes (2,1) and ...

The Circle becomes an Ellipse of horizontal radius = 2*sqrt(2)
and vertical radius = sqrt(2).  The direction normal to the
Ellipse at point "B" *IS NOT* (2,1), but (1,2). and it is no
longer parallel to the Vector BA.

Here is where the distinction between Vectors and CovariantVectors
become evident.

ITK manages CovariantVectors consistently when you apply Transforms
on  them. You may want to look at the effects of the Affine transform
in a Vector and compare it with its effect on a CovariantVector.


All that to say:
                               The there is a good reason for the
SurfaceSpatialObjectPoint to represent the normal to the surface as
a CovariantVector, and that it will be a mathematical mistake to
use Vectors for representing the surface normals.


BTW, the Normalized() method was added to the CovariantVector
last week. You may want to update your CVS checkout in order
to get this modification.


Please let us know if you have further questions,


   Thanks


------------------------
Martin Magnusson wrote:

> I'd like to use ITK for 3D mesh registration, and it seems to me that 
> the best way to represent a 3D mesh is to have a 1D itk::Mesh with 
> itk::SurfaceSpatialObjectPoint<3> as its pixel type. (I would like to be 
> able to specify a normal at each vertex and, additionally, specify 
> normals for the triangle/polygon faces.)
> 
> However, dealing with the normals of a SpatialSurfaceObjectPoint doesn't 
> seem entirely straightforward. What is the motivation for allowing 
> SetNormal( CovariantVector ), SetNormal( double, double ), and 
> SetNormal( double, double, double ); but not SetNormal( Vector )?
> 
> What I'm trying to do is to create an itk::Vector<3, double>, set random 
> values to its elements, normalize the vector and than assign that vector 
> to a surface point. Doing the same thing with a CovariantVector wouldn't 
> work, since CovariantVector doesn't support the Normalize() method.
> 
> / martin
> _______________________________________________
> 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