Proposals:ImageIO API for GUI Support: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
 
(34 intermediate revisions by 2 users not shown)
Line 25: Line 25:
** unsigned int GetNumberOfExtensions() const;
** unsigned int GetNumberOfExtensions() const;
** std::string GetNthExtension(unsigned int) 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


=== Translation Table ===
=== Challenges ===
 
* Localization
** How to deal with localization ?
** Character encoding: Unicode ?
* Case Sensitivity
** Allow different case for extensions ?
** How to deal with OSes that do not support case-variation.
 
=== Translation Table for Writing ===


{|border="1"
{|border="1"
Line 32: Line 47:
! ImageIO !! Description !! Family !! Extension  
! ImageIO !! Description !! Family !! Extension  
|-
|-
| rowspan="2" | AnalyzeImageIO  
| rowspan="3" | AnalyzeImageIO  
| Uncompressed header in binary || Analyze || .hdr
|-
| Uncompressed pixel data in binary || Analyze || .img
| Uncompressed pixel data in binary || Analyze || .img
|-
|-
| Uncompressed header in binary || Analyze || .hdr
| Compressed pixel data in binary || Analyze || .img.gz
|-
| rowspan="2" | BMPImageIO
| Uncompressed pixel data in binary with text header || BMP || .bmp
|-
| Uncompressed pixel data in binary with text header || BMP || .BMP
|-
| rowspan="1" | BioRadImageIO
| Binary header followed by pixel data in binary || BioRad || .pic
|-
| rowspan="1" | Brains2MaskImageIO
| Binary Mask Octree-encoded || Brains2 || .mask
|-
| rowspan="1" | DICOMImageIO2
| Deprecated || DICOM || none
|-
| rowspan="4" | GDCMImageIO
| DICOM 2D, 3D and 4D || DICOM || .dcm
|-
| DICOM 2D, 3D and 4D || DICOM || .DCM
|-
| DICOM 2D, 3D and 4D || DICOM || .dicom
|-
| DICOM 2D, 3D and 4D || DICOM || .DICOM
|-
| rowspan="1" | GE4ImageIO
| Not Available for Writing || GE4 || ---
|-
| rowspan="1" | GE5ImageIO
| Not Available for Writing || GE5 || ---
|-
| rowspan="1" | GEAwImageIO
| Not Available for Writing || GEAw || ---
|-
| rowspan="2" | GiplImageIO
| Uncompressed binary header followed by binary pixel data || GIPL || .gipl
|-
| Gzip Compressed binary header followed by binary pixel data || GIPL || .gipl.gz
|-
|-
| rowspan="1" | BMPImageIO
| rowspan="1" | IPLCommonImageIO
| Uncompressed pixel data in binary || BMP || .bmp
| Base class for GE4, GE5, GEAw, SiemensVision|| IPL || ---
|-
|-
| rowspan="1" | JPEGImageIO  
| rowspan="4" | JPEGImageIO  
| Compressed pixel data in binary || JPEG || .jpg
| Compressed pixel data in binary || JPEG || .jpg
|-
|-
| rowspan="1" | MetaImageIO  
| Compressed pixel data in binary || JPEG || .jpeg
|-
| Compressed pixel data in binary || JPEG || .JPG
|-
| Compressed pixel data in binary || JPEG || .JPEG
|-
| rowspan="2" | LSMImageIO
| Optional Compression. Binary pixel data || LSM|| .lsm
|-
| Optional Compression. Binary pixel data || LSM|| .LSM
|-
| rowspan="2" | MetaImageIO  
| ASCII Text Header || MetaImage || .mhd
| ASCII Text Header || MetaImage || .mhd
|-
|-
| rowspan="1" | NiftiImageIO
| Text header followed by binary pixel data || MetaImage || .mha
| Uncompressed pixel data in binary || Nifti|| .img
|-
|-
| rowspan="1" | NrrdImageIO
| rowspan="6" | NiftiImageIO
| Uncompressed pixel data in binary || NRRD || .nrrd
| Header information in binary || NifTI || .nia
|-
| Uncompressed pixel data in binary || NifTI || .nii
|-
| Compressed pixel data in binary || NifTI || .nii.gz
|-
| Header information in binary || Analyze || .hdr
|-
| Uncompressed pixel data in binary || Analyze || .img
|-
| Compressed pixel data in binary || Analyze || .img.gz
|-
| rowspan="2" | NrrdImageIO
| pixel data ? || NRRD || .nrrd
|-
| header ? || NRRD || .nhdr
|-
| rowspan="2" | PNGImageIO
| RLE compressed pixel data in binary || PNG || .png
|-
| RLE compressed pixel data in binary || PNG || .PNG
|-
| rowspan="1" | RawImageIO
| Uncompressed pixel data in binary || RAW || .raw
|-
| rowspan="1" | SiemensVisionImageIO
| Not available for writing || Siemens || ---
|-
| rowspan="1" | StimulateImageIO
| Uncompressed pixel data in binary || Stimulate || .spr
|-
| rowspan="4" | TIFFImageIO
| Compressed pixel data in binary || TIFF || .tiff
|-
| Compressed pixel data in binary || TIFF || .tif
|-
| Compressed pixel data in binary || TIFF || .TIFF
|-
| Compressed pixel data in binary || TIFF || .TIF
|-
| rowspan="1" | 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
* http://www.itk.org/pipermail/insight-users/2008-September/027193.html
Niels Dekker
* http://www.itk.org/pipermail/insight-users/2008-September/027194.html
* http://www.itk.org/mailman/private/insight-developers/2008-September/010963.html
* http://www.itk.org/mailman/private/insight-developers/2008-September/010971.html
Sean McBride
* http://www.itk.org/mailman/private/insight-developers/2008-September/010961.html

Latest revision as of 17:28, 15 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

  • Localization
    • How to deal with localization ?
    • Character encoding: Unicode ?
  • Case Sensitivity
    • Allow different case for extensions ?
    • How to deal with OSes that do not support case-variation.

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 .DCM
DICOM 2D, 3D and 4D DICOM .dicom
DICOM 2D, 3D and 4D DICOM .DICOM
GE4ImageIO Not Available for Writing GE4 ---
GE5ImageIO Not Available for Writing GE5 ---
GEAwImageIO Not Available for Writing GEAw ---
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 ---
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
Text header followed by binary pixel data MetaImage .mha
NiftiImageIO Header information in binary NifTI .nia
Uncompressed pixel data in binary NifTI .nii
Compressed pixel data in binary NifTI .nii.gz
Header information in binary Analyze .hdr
Uncompressed pixel data in binary Analyze .img
Compressed pixel data in binary Analyze .img.gz
NrrdImageIO pixel data ? NRRD .nrrd
header ? NRRD .nhdr
PNGImageIO RLE compressed pixel data in binary PNG .png
RLE compressed pixel data in binary PNG .PNG
RawImageIO Uncompressed pixel data in binary RAW .raw
SiemensVisionImageIO Not available for writing Siemens ---
StimulateImageIO Uncompressed pixel data in binary Stimulate .spr
TIFFImageIO Compressed pixel data in binary TIFF .tiff
Compressed pixel data in binary TIFF .tif
Compressed pixel data in binary TIFF .TIFF
Compressed pixel data in binary TIFF .TIF
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