[Insight-developers] Spatial Objects checkin...

Jean-Philippe Guyon piloo@unc.edu
Tue, 9 Apr 2002 21:58:33 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_000D_01C1E011.B1535960
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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 ) =3D> to know if a point p is inside the object
IsEvaluableAt( Point p ) =3D> return if the object value can be =
evaluated at point p
DerivativeAt( Point p, unsigned int n, OutputVectorType value ) =3D> =
return the derivative at point p and order n.=20
The derivative is computed only along each axis, but more useful =
derivation method could be implemented depending on the needs.
GetBounds() =3D> returns the bounding box of the object

A composite object also has the following function to manage its =
hierarchy:

AddSpatialObject( SpatialObjectPointer p ) =3D> to add a spatial object =
to a composite spatial object
RemoveSpatialObject( SpatialObjectPointer p ) =3D> 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<...>=20
itk::TubeSpatialObject<...>
itk::TubeNetworkSpatialObject<...>

we plan to implement some other classes soon, like a =
SpatialFunctionSpatialObject<...> for example ( sounds confusing ??? ), =
etc...

Regards,

Jean-Philippe



------=_NextPart_000_000D_01C1E011.B1535960
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello Folks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I just checked in the first =
SpatialObject classes=20
on the cvs repository.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>You will find the source code in=20
Insight/Code/SpatialObject/, </FONT><FONT face=3DArial size=3D2>and the =
test files=20
in Insight/Testing/Code/SpatialObject/.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I think that the subject is more than =
ever open to=20
discussions, so please, let us know any thought you have about changes =
you=20
</FONT><FONT face=3DArial size=3D2>think we should&nbsp;submit to the =
current=20
classes.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The base classe is =
itk::SpatialObject&lt;=20
NDimensions, TransformType, OutputType &gt;.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Deriving from this one, is the=20
itk::CompositeSpatialObject&lt; NDimensions, TransformType, OutputType =
&gt;=20
class.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If you wish to implement your own =
spatial object=20
class, you need to derive it from =
itk::SpatialObject&lt;..&gt;.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It is not necessary to create in every =
case the=20
corresponding composite class which should derive from=20
itk::CompositeSpatialObject&lt;...&gt;. You want to do so, only if you =
really=20
need extra functionnalities not provided by the default implementation =
of the=20
existing CompositeSpatialObject&lt;...&gt; class.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Currently, a SpatialObject contains a =
list of=20
transformations which allow to switch back and forth from the local =
coordinate=20
system of </FONT><FONT face=3DArial size=3D2>an object to the global =
coordinate=20
system. Any object, if plugged to a CompositeObject, is positioned with =
respect=20
to its </FONT><FONT face=3DArial size=3D2>parent object.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The following basic functions have been =

implemented:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>IsInside( Point p )</STRONG> =
=3D&gt; to know=20
if a point p is inside the object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>IsEvaluableAt( Point p =
)</STRONG> =3D&gt;=20
return if the object value can be evaluated at&nbsp;point p</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>DerivativeAt( Point p, unsigned =
int n,=20
OutputVectorType value )</STRONG> =3D&gt; return the derivative at point =
p and=20
order n. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The derivative is computed only along =
each axis,=20
but more useful derivation method could be implemented depending on the=20
needs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>GetBounds()</STRONG> =3D&gt; =
returns the=20
bounding box of the object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>A composite object also has the =
following function=20
to manage its hierarchy:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>AddSpatialObject( =
SpatialObjectPointer p=20
)</STRONG> =3D&gt; to add a spatial object to a composite spatial=20
object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>RemoveSpatialObject( =
SpatialObjectPointer p=20
)</STRONG> =3D&gt; to remove a spatial object from a composite=20
hierarchy</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>All the other functions are only for =
internal use,=20
or does not have a particular interest to understand the way the=20
SpatialObject&nbsp;classes work.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The following classes have already been =

implemented:</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>itk::ImageSpatialObject&lt;...&gt;</FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>itk::TubeSpatialObject&lt;...&gt;</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>itk::TubeNetworkSpatialObject&lt;...&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>we plan to implement some other classes =
soon, like=20
a SpatialFunctionSpatialObject&lt;...&gt; for example ( sounds confusing =
??? ),=20
etc...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Jean-Philippe</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000D_01C1E011.B1535960--