Proposals:ImageIO API for GUI Support: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
Line 13: Line 13:
Currently the ImageIO classes support the GUI interfaces by providing the following API
Currently the ImageIO classes support the GUI interfaces by providing the following API


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


== Proposed API ==
== Proposed API ==

Revision as of 18:12, 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

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