Oops!<br>I forgot the attachment!<br><br clear="all">Antonio Foncubierta<br>
<br><br><div class="gmail_quote">2009/2/16 Antonio Foncubierta <span dir="ltr">&lt;<a href="mailto:antonio.foncubierta@gmail.com">antonio.foncubierta@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Luis,<br><br>I&#39;ve used the EllipseSpatialObject (.txx and .h) as a template to get the ToroidSpatialObject, and I think I succeeded in rewriting the necessary functions. I didn&#39;t know how to implement a non-circular totoid (elliptical, for example) so I think I should send you the code in case you have any ideas. should i?<br>

<br>I just rewrote very few things, because most of the code from ellipseSpatialObject could be reused. What do you think?<br><br><br><br clear="all">Antonio Foncubierta<br>
<br><br><div class="gmail_quote">2009/2/15 Luis Ibanez <span dir="ltr">&lt;<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>&gt;</span><div><div></div><div class="Wj3C7c"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi Antonio,<br>
<br>
You already identified the most important methods.<br>
<br>
The full list is:<br>
<br>
<br>
1) &nbsp; Constructor<br>
<br>
2) &nbsp; Destructor<br>
<br>
3) &nbsp; IsInside( const PointType &amp; point) const<br>
<br>
4) &nbsp; IsInside( const PointType &amp; point,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unsigned int depth, char * name )<br>
<br>
5) &nbsp; ComputeLocalBoundingBox() const<br>
<br>
6) &nbsp; IsEvaluableAt( const PointType &amp; point,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;unsigned int depth, char * name<br>
<br>
7) &nbsp; ValueAt( const PointType &amp; point, double &amp; value,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;unsigned int depth, char * name)<br>
<br>
8) &nbsp; PrintSelf( std::ostream&amp; os, Indent indent ) const<br>
<br>
9) &nbsp; CopyInformation(const DataObject *data)<br>
<br>
<br>
<br>
and... of course you should write a test that exercise<br>
all the code in your spatial object, so it has a 100%<br>
code coverage.<br>
<br>
<br>
At that point, we *strongly encourage* you to submit<br>
it as a contribution to the Insight Journal &nbsp;:-)<br>
<br>
 &nbsp; &nbsp; &nbsp; <a href="http://www.insight-journal.org/" target="_blank">http://www.insight-journal.org/</a><br>
<br>
<br>
 &nbsp; Regards,<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; Luis<br>
<br>
<br>
-----------------------------<br>
Antonio Foncubierta wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
Hello,<br>
<br>
I am interested in using a spatial object with the shape of a torus or toroid. I&#39;ve been reading the documentation online, and I think that I only have to re-write a couple of functions: ValueAt(), IsEvaluableAt(), IsInside(). Are these the only functions I need to rewrite or should I also type a constructor or other things alike. Can you help me with some guidelines, please?<br>


<br>
Thank you<br>
<br>
<br>
Antonio Foncubierta<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote>
</blockquote></div></div></div><br>
</blockquote></div><br>