Proposals:ImageIO API for GUI Support: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 110: Line 110:
|-
|-
| rowspan="1" | PNGImageIO  
| rowspan="1" | PNGImageIO  
| Uncompressed pixel data in binary || NRRD || .png
| Uncompressed pixel data in binary || PNG || .png
|-
|-
| rowspan="1" | RawImageIO  
| rowspan="1" | RawImageIO  
| Uncompressed pixel data in binary || NRRD || .raw
| Uncompressed pixel data in binary || RAW || .raw
|-
|-
| rowspan="1" | SiemensVisionImageIO  
| rowspan="1" | SiemensVisionImageIO  
| Uncompressed pixel data in binary || NRRD || .??
| Uncompressed pixel data in binary || Siemens || .??
|-
|-
| rowspan="1" | StimulateImageIO  
| rowspan="1" | StimulateImageIO  
| Uncompressed pixel data in binary || NRRD || .??
| Uncompressed pixel data in binary || Stimulate || .??
|-
|-
| rowspan="1" | TIFFImageIO  
| rowspan="1" | TIFFImageIO  
| Compressed pixel data in binary || NRRD || .tiff
| Compressed pixel data in binary || TIFF || .tiff
|-
|-
| rowspan="1" | VTKImageIO  
| rowspan="1" | VTKImageIO  
| Text header followed by uncompressed pixel data in binary || NRRD || .vtk
| Text header followed by uncompressed pixel data in binary || VTK || .vtk
|}
|}



Revision as of 13:46, 12 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
  • Should this be available for both Reading and Writing ?
    • Maybe as:
      • unsigned int GetNumberOfExtensionsForReading() const;
      • unsigned int GetNumberOfExtensionsForWriting() const;
      • std::string GetNthExtensionForReading(unsigned int) const
      • std::string GetNthExtensionForWriting(unsigned int) const

Challenges

  • How to deal with localization ?
  • Character encoding: Unicode ?

Translation Table for Writing

ImageIO Description Family Extension
AnalyzeImageIO Uncompressed header in binary Analyze .hdr
Uncompressed pixel data in binary Analyze .img
Compressed pixel data in binary Analyze .img.gz
BMPImageIO Uncompressed pixel data in binary with text header BMP .bmp
Uncompressed pixel data in binary with text header BMP .BMP
BioRadImageIO Binary header followed by pixel data in binary BioRad .pic
Brains2MaskImageIO Binary Mask Octree-encoded Brains2 .mask
DICOMImageIO2 Deprecated DICOM none
GDCMImageIO DICOM 2D, 3D and 4D DICOM .dcm
DICOM 2D, 3D and 4D DICOM none
GE4ImageIO Not Available for Writing GE4 none
GE5ImageIO Not Available for Writing GE5 none
GEAwImageIO Not Available for Writing GEAw none
GiplImageIO Uncompressed binary header followed by binary pixel data GIPL .gipl
Gzip Compressed binary header followed by binary pixel data GIPL .gipl.gz
IPLCommonImageIO Base class for GE4, GE5, GEAw, SiemensVision IPL none
JPEGImageIO Compressed pixel data in binary JPEG .jpg
Compressed pixel data in binary JPEG .jpeg
Compressed pixel data in binary JPEG .JPG
Compressed pixel data in binary JPEG .JPEG
LSMImageIO Optional Compression. Binary pixel data LSM .lsm
Optional Compression. Binary pixel data LSM .LSM
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 PNG .png
RawImageIO Uncompressed pixel data in binary RAW .raw
SiemensVisionImageIO Uncompressed pixel data in binary Siemens .??
StimulateImageIO Uncompressed pixel data in binary Stimulate .??
TIFFImageIO Compressed pixel data in binary TIFF .tiff
VTKImageIO Text header followed by uncompressed pixel data in binary VTK .vtk

Translation Table for Reading

Feedback

ITK Users/Developers Mailing Lists

Request for Feedback

Niels Dekker

Sean McBride