[Insight-developers] ImageFileReader/Writer and factories.

Bill Lorensen bill.lorensen at gmail.com
Tue Jan 18 14:42:14 EST 2011


Folks,

Following up on today's t-con topic.

Although this idea only works for testing and not distribution, we
could add static methods ImageIOFactory::RegisterBuiltInFactoriesOn()
and  ImageIOFactory::RegisterBuiltInFactoriesOff() to control whether
or not to load the built-in factories.

This would enable, at run-time, for an application to disable loading
the defaults and then register the factories that are desired for an
application.

Usage would be something like:

itk::ImageIOFactory::RegisterBuiltInFactoriesOff();

itk::ObjectFactoryBase::RegisterFactory( itk::PNGImageIOFactory::New() );
itk::ObjectFactoryBase::RegisterFactory( itk::TIFFImageIOFactory::New() );

This still requires an itk to be build with all of the IO's but still
may be a useful feature.

Bill


More information about the Insight-developers mailing list