[Insight-developers] SpatialObjects
Stephen R. Aylward
aylward at unc . edu
Fri, 31 Oct 2003 16:06:14 -0500
We probably should call these curves.
The two normals (normal and bi-normal) define the "frenet frame" at a
point on the line/curve. Two points are insufficient for defining a
curve. You must specify two vectors (for a curve in three space) to
complete the definition: one for curvature and one for torque (essentially).
Normals are N dimensional. There are N-1 of them.
Two points with equal frenet frames (i.e., normal to and inline with the
implied tangent between those points) forms a straight line between
those points.
s
Miller, James V (Research) wrote:
> How does a line have two normals?
>
> Are you saying there is a normal per vertex?
>
> Let me ask my questions differently:
>
> Is a spatial object line limited to two points?
> If not, why is it not a polyline?
> Does a spatial object line have to have a normal for each point? (Clearly, I
> can define a line simply by two points since this is essentially the
> definition of a line.)
> Why are the normals of Dimension-1?
>
> Architecturaly, why does the normal for the line need to be associated
> directly with the point class? Why wouldn't the line class have a list of
> points and a list of normals?
>
>
>
> -----Original Message-----
> From: Stephen R. Aylward [mailto:aylward at unc . edu]
> Sent: Friday, October 31, 2003 2:03 PM
> To: Julien Jomier
> Cc: 'Miller, James V (Research)'; 'Insight-developers (E-mail)'
> Subject: Re: [Insight-developers] SpatialObjects
>
>
> A line has two normals, a plane has one normal. This is consistent
> within the major spatial objects.
>
> Our line is not a polyline. Perhaps it is a curve. Two points, each
> with two normals can describe a curve.
>
> Why is it surprising to need different code to read in lines, landmarks,
> and contours (polygons?)? They are entirely different structures -
> different geometric requirements are needed to define their components.
>
> I hesitate to write converters from landmarks to lines - they really are
> different.
>
> Stephen
>
>
> Julien Jomier wrote:
>
>
>>Hi Jim,
>>
>>I see the issue. Can we just create a function AddPoint(float* Position)?
>>Yes, a LineSpatialObject is a polyline (Should we rename it?)
>>A LineSpatialObject has N-1 normals as well as TubeSpatialObject. A
>>SurfaceSpatialObject has only 1 normal.
>>
>>Julien
>>
>>-----Original Message-----
>>From: insight-developers-admin at itk . org
>>[mailto:insight-developers-admin at itk . org] On Behalf Of Miller, James V
>>(Research)
>>Sent: Friday, October 31, 2003 10:21 AM
>>To: 'Julien Jomier'; 'Insight-developers (E-mail)'
>>Subject: RE: [Insight-developers] SpatialObjects
>>
>>
>>The issue was not in querying a point after the object was created. The
>>issue was in creating the spatial objects. I want to use one block of
>
> code
>
>>to read the points from a file and then pass those points to appropriate
>>type of spatial object. But different types of spatial objects use
>>different types of points. So you have to "duplicate" the code to build
>>your point lists since a different type of list is needed for each spatial
>>object type. One solution may be to allow a line spatial object to accept
>>points without normals as well as points with normals.
>>Why does a line have N-1 normals? Is this really a polyline with N points
>>(and hence N-1 segments)? Why does a line need a normal but other spatial
>>objects do not?
>>
>>
>>>2) LineSpatialObject::SetPoints() takes a list of LineSpatialObjectPoint
>>
>>whereas
>>
>>
>>>PolygonSpatialObject::SetPoints() and LandmarkSpatialObject::SetPoints()
>>
>>take lists of
>>
>>
>>>SpatialObjectPoint. It looks like LineSpatialObjectPoints have a vector
>>
>>associated with them.
>>
>>
>>>This meant I had to duplicate code to read landmarks, lines, and polygons
>>
>>since I couldn't read
>>
>>
>>>the points into a common data structure and then decide whether to it is a
>>
>>line, polygon, or
>>
>>
>>>landmark.
>>
>>
>>A LineSpatialObjectPoint has N-1 normals associated with it.
>>A LineSpatialObjectPoint derives from SpatialObjectPoint so you shouldn't
>>have to duplicate code when you are asking for the position of the point
>>only.
>>
>>_______________________________________________
>>Insight-developers mailing list
>>Insight-developers at itk . org
>>http://www . itk . org/mailman/listinfo/insight-developers
>
>
--
===========================================================
Dr. Stephen R. Aylward
Associate Professor of Radiology
Adjunct Associate Professor of Computer Science and Surgery
http://caddlab . rad . unc . edu
aylward at unc . edu
(919) 966-9695