[Insight-developers] Plugin IO objects

Miller, James V (Research) millerjv at crd.ge.com
Mon May 2 10:36:03 EDT 2005


On the TCON Friday, I brought up a proposed extension for providing dynamic loadable libraries for new file formats.  The goal was to have a mechanism whereby a new image file format could be introduced to a pre-compiled application.  This would avoid having to call RegisterFactory() within your application for IO formats that are not registered by default, or are not part of ITK, and it would avoid having to change the IO factories that are registered by default.

Bill Hoffman said this capability already exists in the ObjectFactories and a similar approach could be taken in ImageIOFactory. (For various reasons too complicated to describe here, ImageIOFactory is not derived from ObjectFactory.)  It turns out, however, Bill was smarter when he wrote the dynamic ObjectFactory capability than he remembered himself being.  The capability in ObjectFactory can be used directly without modification. This is largely due to the format specific IOFactories being subclasses on ObjectFactory.

I put together a Wiki page http://www.itk.org/Wiki/Plugin_IO_mechanisms that describes how to create a dynamic shared library that any existing ITK application will load as part of the default ObjectFactory mechanism, allow new file formats to be used by existing precompiled ITK applications.

There are few things that need to be worked out.  It looks like the plugins are loaded multiple times. The Wiki page will be modified to reflect any changes that need to be made by people writing plugins. 

Jim Miller 
_____________________________________
Visualization & Computer Vision
GE Research
Bldg. KW, Room C218B
1 Research Circle, Schenectady NY 12309-1027

millerjv at reserch.ge.com <mailto:millerjv at reserch.ge.com>
(518) 387-4005, Dial Comm: 8*833-4005
Cell: (518) 505-7065, Fax: (518) 387-6981




More information about the Insight-developers mailing list