Plugin IO mechanisms

From KitwarePublic
Revision as of 12:34, 30 April 2005 by Millerjv (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Plugin IO mechanisms

ITK provides a very flexible ImageIO mechanism supporting factories. This allows for a single reader class and a single writer class that can input/output a variety of file formats. When ImageFileReader begins to read a file, it queries the ObjectFactory system for any factory that can supply an ImageIOBase. This subset of factories is queried in turn to locate a factory that can understand the format of the requested file.

New image file formats can be added to ITK by deriving a class from ImageIOBase that will support reading/writing that file format. The file format can be added to the factory mechanism by creating a subclass of ObjectFactoryBase for the specific for this ImageIO class.