[Insight-developers] itkMetaDataObject::New

Kent Williams kent at psychiatry.uiowa.edu
Tue Apr 4 14:10:17 EDT 2006


I can't imagine a situation where using Factory New will be required, 
right now, since there isn't a factory for the MetaDataObject type.  If 
I recall correctly, the Factory New does the search, and if it doesn't 
find a factory it just calls New on the required class, so we should 
maybe remove the middleman.

Jim Miller wrote:

> Mathieu and I are tracking down performance issues reading DICOM.  In 
> my test case of reading 50 images, my test program spends about 25% of 
> its execution time populating the MetaDataDictionary with DICOM tags.  
> The MetaDataDictionary stores MetaDataObjects which are subclasses of 
> LightObject.  MetaDataObject.h has a standard itkNewMacro() call which 
> requires searching the list of factories for each instantiation of a 
> MetaDataObject.
>
> When I change the MetaDataObject to use an itkFactorylessNewMacro(), I 
> reclaim approximately 20% of the overall process time.
>
> Does anyone have a use case that requires the items stored in a 
> MetaDataDictionary to use a factor to instantiate a MetaDataObject?
>
> Jim
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers at itk.org
>http://www.itk.org/mailman/listinfo/insight-developers
>  
>



More information about the Insight-developers mailing list