[Insight-developers] Spatial Objects checkin...

Lorensen, William E (Research) lorensen@crd.ge.com
Wed, 10 Apr 2002 07:24:07 -0400


The SpatialObject directory is empty. I've removed SpatialObject from the CMakeLists.txt file for the
time being. cmake was reporting an error.
 
Bill
 

-----Original Message-----
From: Jean-Philippe Guyon [mailto:piloo@unc.edu]
Sent: Wednesday, April 10, 2002 12:59 AM
To: Insight-Developers (E-mail)
Subject: [Insight-developers] Spatial Objects checkin...


Hello Folks,
 
I just checked in the first SpatialObject classes on the cvs repository.
You will find the source code in Insight/Code/SpatialObject/, and the test files in
Insight/Testing/Code/SpatialObject/.
 
I think that the subject is more than ever open to discussions, so please, let us know any thought
you have about changes you think we should submit to the current classes.
 
The base classe is itk::SpatialObject< NDimensions, TransformType, OutputType >.
Deriving from this one, is the itk::CompositeSpatialObject< NDimensions, TransformType, OutputType >
class.
 
If you wish to implement your own spatial object class, you need to derive it from
itk::SpatialObject<..>.
It is not necessary to create in every case the corresponding composite class which should derive
from itk::CompositeSpatialObject<...>. You want to do so, only if you really need extra
functionnalities not provided by the default implementation of the existing
CompositeSpatialObject<...> class.
 
Currently, a SpatialObject contains a list of transformations which allow to switch back and forth
from the local coordinate system of an object to the global coordinate system. Any object, if plugged
to a CompositeObject, is positioned with respect to its parent object.
 
The following basic functions have been implemented:
IsInside( Point p ) => to know if a point p is inside the object
IsEvaluableAt( Point p ) => return if the object value can be evaluated at point p
DerivativeAt( Point p, unsigned int n, OutputVectorType value ) => return the derivative at point p
and order n. 
The derivative is computed only along each axis, but more useful derivation method could be
implemented depending on the needs.
GetBounds() => returns the bounding box of the object
 
A composite object also has the following function to manage its hierarchy:
 
AddSpatialObject( SpatialObjectPointer p ) => to add a spatial object to a composite spatial object
RemoveSpatialObject( SpatialObjectPointer p ) => to remove a spatial object from a composite
hierarchy
 
All the other functions are only for internal use, or does not have a particular interest to
understand the way the SpatialObject classes work.
 
The following classes have already been implemented:
itk::ImageSpatialObject<...> 
itk::TubeSpatialObject<...>
itk::TubeNetworkSpatialObject<...>
 
we plan to implement some other classes soon, like a SpatialFunctionSpatialObject<...> for example (
sounds confusing ??? ), etc...
 
Regards,
 
Jean-Philippe