[Insight-developers] SpatialObjects

Stephen R. Aylward aylward at unc . edu
Fri, 31 Oct 2003 14:03:02 -0500


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