[Insight-developers] ITK Factories

Bill Lorensen bill.lorensen at gmail.com
Thu Nov 8 14:46:10 EST 2007


Folks,

After fixing a bug in the parsing of ITK_AUTOLOAD_PATH
http://public.kitware.com/Bug/view.php?id=5880 I decided to create tests
that would exercise the itkObjectFactoryBase code in ITK. Recall that ITK
has (at least we thought it had) the ability to override classes with
subclasses. This is accomplished through the itk New method for each class.
The IO and Transform factories successfully take advantage of the factory
mechanisms. However, the mechanism to override classes at creation time has
never been tested ion ITK as far as I can tell. A bit embarrassing since
every New method looks to see if it can be overridden by a factory.

I found at least two bugs in the factory code. They have been fixed and a
test, Testing/Code/Common/itkObjectFactoryTest has been checked in. Factory
overrides of classes is an example of a feature that was adopted early as a
requirement, seemed important at the time, but, apparently has never been
used.

Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20071108/eb4f08e1/attachment.htm


More information about the Insight-developers mailing list