[ITK-dev] Question about itkLightObject vs itkObject

Bradley Lowekamp blowekamp at mail.nih.gov
Mon May 5 09:30:37 EDT 2014


Hello,

The cost of doing the reference counting is what the performance concern is about. The LightObject is rather light otherwise. The Object class adds the Command/Observer, and MetaDataDictionary features, along with a few other items.

Common places where these classes are not used, are for numeric classes such as Point, Matrix, Vector etc, and structures internal to classes for variety of reasons there.

If you just need reference counting the LightObject is a good class to use.

Hope that helps,
Brad

On May 5, 2014, at 9:12 AM, Rashad M <mohammedrashadkm at gmail.com> wrote:

> Hi all,
> 
> I have some doubts about the usage of itkLightObject. The situation is I need to have a simple class and it must has Smart pointers and macro definitions as in itk class. This class does not involve image inputs and not a filter type. So I decided to go with itkLightObject for the base class. 
> 
> From the documentation of itkLightObject[1]. It says:
> 
> All ITK objects should be a subclass of LightObject or Object with few exceptions (due to performance concerns).
> 
> Could any explain me the few exceptions concerning performance?
> 
> [1] http://www.itk.org/Doxygen/html/classitk_1_1LightObject.html
> 
> -- 
> Regards,
>    Rashad
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
> 
> 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-developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20140505/58dd6095/attachment.html>


More information about the Insight-developers mailing list