[Insight-users] Creating my own spatial object
Antonio Foncubierta
antonio.foncubierta at gmail.com
Mon Feb 16 11:05:05 EST 2009
Hi Luis,
I'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'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?
I just rewrote very few things, because most of the code from
ellipseSpatialObject could be reused. What do you think?
Antonio Foncubierta
2009/2/15 Luis Ibanez <luis.ibanez at kitware.com>
> Hi Antonio,
>
> You already identified the most important methods.
>
> The full list is:
>
>
> 1) Constructor
>
> 2) Destructor
>
> 3) IsInside( const PointType & point) const
>
> 4) IsInside( const PointType & point,
> unsigned int depth, char * name )
>
> 5) ComputeLocalBoundingBox() const
>
> 6) IsEvaluableAt( const PointType & point,
> unsigned int depth, char * name
>
> 7) ValueAt( const PointType & point, double & value,
> unsigned int depth, char * name)
>
> 8) PrintSelf( std::ostream& os, Indent indent ) const
>
> 9) CopyInformation(const DataObject *data)
>
>
>
> and... of course you should write a test that exercise
> all the code in your spatial object, so it has a 100%
> code coverage.
>
>
> At that point, we *strongly encourage* you to submit
> it as a contribution to the Insight Journal :-)
>
> http://www.insight-journal.org/
>
>
> Regards,
>
>
> Luis
>
>
> -----------------------------
> Antonio Foncubierta wrote:
>
>> Hello,
>>
>> I am interested in using a spatial object with the shape of a torus or
>> toroid. I'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?
>>
>> Thank you
>>
>>
>> Antonio Foncubierta
>>
>>
>> ------------------------------------------------------------------------
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090216/f4d4911b/attachment-0001.htm>
More information about the Insight-users
mailing list