Proposals:ImageIO API for GUI Support: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 19: Line 19:


== Proposed API ==
== Proposed API ==
=== Enumeration of Extensions ===


* Suggested API for the ImageIO classes
* Suggested API for the ImageIO classes
** unsigned int GetNumberOfExtensions() const;
** unsigned int GetNumberOfExtensions() const;
** std::string GetNthExtension(unsigned int) const
** std::string GetNthExtension(unsigned int) const
=== ===

Revision as of 18:34, 10 September 2008

ImageIO API for GUI Support

The Need

When building GUI applications based on ITK, it is common to use the ImageFileReader and ImageFileWriter classes, that through the ImageIO Factories are capable of supporting a large number of image file formats.

There are in fact, so many file formats supported, that it is challenging to list them all in the File Dialog of a GUI at the application level.

Current Support

Currently the ImageIO classes support the GUI interfaces by providing the following API

 ArrayOfExtensionsType GetSupportedWriteExtensions() const
 ArrayOfExtensionsType GetSupportedReadExtensions() const
 void AddSupportedWriteExtension( const char * extension  )
 void AddSupportedReadExtension( const char * extension )

Proposed API

Enumeration of Extensions

  • Suggested API for the ImageIO classes
    • unsigned int GetNumberOfExtensions() const;
    • std::string GetNthExtension(unsigned int) const