Proposals:ImageIO API for GUI Support: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 26: Line 26:
** std::string GetNthExtension(unsigned int) const
** std::string GetNthExtension(unsigned int) const


=== ===
=== Translation Table ===
 
{|border="1"
|-bgcolor="#abcdef"
! ImageIO !! Description !! Family !! Extension
|-
| rowspan="2" | AnalyzeImageIO
| Uncompressed pixel data in binary || Analyze || .img
|-
| Uncompressed header in binary || Analyze || .hdr
|-
|}

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

Translation Table

ImageIO Description Family Extension
AnalyzeImageIO Uncompressed pixel data in binary Analyze .img
Uncompressed header in binary Analyze .hdr