Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

ImageIO Class Reference

Virtual base class that all ImageIO plugins implement. More...

#include <core/ImageIO.h>

Inheritance diagram for ImageIO:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual bool supportsExtension (const char *extension)=0
virtual void registerExtensions (DynArray< std::string > &extensions)=0
virtual bool readImage (const char *filename, Image *&result)=0
virtual bool writeImage (const char *filename, const Image *image)=0

Detailed Description

Virtual base class that all ImageIO plugins implement.


Member Function Documentation

virtual bool ImageIO::supportsExtension const char *  extension  )  [pure virtual]
 

Determine if this plugin supports the given extension.

Parameters:
[in] extension A lowercase string extension (e.g. "tif")
Returns:
True if the plugin supports this extension, false otherwise.

Implemented in PPMIO, and TIFFIO.

virtual void ImageIO::registerExtensions DynArray< std::string > &  extensions  )  [pure virtual]
 

Build a list of all the extensions this plugin can support

Parameters:
[out] extensions A DynArray to hold the list of extensions.
Returns:
The return is by reference (extensions parameter).

Implemented in PPMIO, and TIFFIO.

virtual bool ImageIO::readImage const char *  filename,
Image *&  result
[pure virtual]
 

Given an Image and a filename, try to create an Image. The system will guarantee that the extension is supported by this plugin.

Parameters:
[in] filename The name of the file to read from.
[out] result The resulting Image. Memory has to be allocated.
Returns:
readImage returns true if everything went smoothly.

Implemented in PPMIO, and TIFFIO.

virtual bool ImageIO::writeImage const char *  filename,
const Image image
[pure virtual]
 

Given an Image and a filename, try to write the Image to disk. The system will guarantee that the extension is supported by this plugin.

Parameters:
[in] filename The name of the file to write to.
[in] image The Image data to write out.
Returns:
writeImage returns true if everything went smoothly.

Implemented in PPMIO, and TIFFIO.


The documentation for this class was generated from the following file:
Generated on Wed Jul 20 16:15:23 2005 for galileo by  doxygen 1.4.3