Proposals:ImageIO API for GUI Support

From KitwarePublic
Jump to navigationJump to search

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
BMPImageIO Uncompressed pixel data in binary BMP .bmp
BioRadImageIO ?? BioRad .??
Brains2ImageIO ?? Brains2 .??
DICOMImageIO ?? DICOM .??
GDCMImageIO ?? DICOM .??
GE4ImageIO ?? GE4 .??
GE5ImageIO ?? GE5 .??
GEAwImageIO ?? GEAw .??
JPEGImageIO Compressed pixel data in binary JPEG .jpg
MetaImageIO ASCII Text Header MetaImage .mhd
NiftiImageIO Uncompressed pixel data in binary Nifti .img
NrrdImageIO Uncompressed pixel data in binary NRRD .nrrd
PNGImageIO Uncompressed pixel data in binary NRRD .png
RawImageIO Uncompressed pixel data in binary NRRD .raw
TIFFImageIO Compressed pixel data in binary NRRD .tiff