eLynx SDK v3.0.1
C++ image processing API reference

eLynx::Image::ImageFileManager Class Reference

#include <ImageFileManager.h>

List of all members.


Public Member Functions

 ImageFileManager ()
virtual ~ImageFileManager ()
const char * GetInputFileFormatList (bool ibAllInOne=true)
const char * GetOutputFileFormatList (bool ibAllInOne=false)
const char * GetSupportedOutputFileFormatList (const ImageVariant &iImage, bool ibAllInOne=false)
Plugins registration
bool IsEmpty () const
bool Register (const char *iprPath)
void Unregister ()
void Unregister (const IPluginPackage &iPackage)
void Unregister (const IImageFilePlugin &iPlugin)
void UnregisterPackage (const char *iprFilename)
void UnregisterPackage (const UUID &iUUID)
void UnregisterPlugin (const char *iprName)
void UnregisterPlugin (const UUID &iUUID)
bool UnregisterExt (const char *iprExt)
bool UnregisterInExt (const char *iprExt)
bool UnregisterOutExt (const char *iprExt)
size_t GetInputExtCount () const
size_t GetOutputExtCount () const
size_t GetPluginCount () const
IImageFilePluginGetPlugin (const char *iprName)
IImageFilePluginGetPlugin (size_t iIndex) const
Image management
const char * GetDescription (size_t iPlugin) const
bool CanImport (const char *iprFilename, ImageFileInfo *oprInfo=NULL, bool ibPreview=false)
bool GeneratePreview (const char *iprFilenameIn, const char *iprFilenameOut, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Import (ImageVariant &oImage, const char *iprFilename, ImageFileInfo *oprInfo=NULL, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool CanExport (const ImageVariant &iImage, const char *iprFilename, const ImageFileOptions *iprOptions=NULL)
bool Export (const ImageVariant &iImage, const char *iprFilename, ProgressNotifier &iNotifier, const ImageFileOptions *iprOptions=NULL)

Protected Types

typedef std::map< std::string,
IImageFilePlugin * > 
MapExt

Protected Member Functions

size_t GetPackageCount () const
IImageFilePluginGetPlugin (const UUID &iClass)
IImageFilePluginGetInPlugin (const char *iprFilename)
IImageFilePluginGetOutPlugin (const char *iprFilename)
void Register (IImageFilePlugin &iPlugin)

Protected Attributes

PluginManager _manager
size_t _nInputFileFormat
size_t _nOutputFileFormat
MapExt _inExts
MapExt _outExts
std::string _inFormatList
std::string _outFormatList

Detailed Description

Tool class to manage image file format via plugins.

Definition at line 40 of file ImageFileManager.h.


Member Typedef Documentation

typedef std::map<std::string, IImageFilePlugin *> eLynx::Image::ImageFileManager::MapExt [protected]

Definition at line 211 of file ImageFileManager.h.


Constructor & Destructor Documentation

eLynx::Image::ImageFileManager::ImageFileManager (  ) 

Default constructor. While Register is not called the manager is not very usefull.

virtual eLynx::Image::ImageFileManager::~ImageFileManager (  )  [virtual]

Destructor.


Member Function Documentation

bool eLynx::Image::ImageFileManager::IsEmpty (  )  const

Retrieve if plugin are loaded.

Returns:
true if no plugin where found, false if at least one plugin is loaded.

bool eLynx::Image::ImageFileManager::Register ( const char *  iprPath  ) 

Register packages. Load all plugin packages (*.iio) adhering to UUID_IImageFilePlugin from a given path.

Parameters:
iprPath The base path where to seach packages.

void eLynx::Image::ImageFileManager::Unregister (  ) 

Unregister all packages so all plugins.

void eLynx::Image::ImageFileManager::Unregister ( const IPluginPackage iPackage  ) 

Unregister a package, and his associated registered plugins.

Parameters:
iPackage The package to unregister.

void eLynx::Image::ImageFileManager::Unregister ( const IImageFilePlugin iPlugin  ) 

Unregister a plugin.

Parameters:
iPlugin The plugin to unregister.

void eLynx::Image::ImageFileManager::UnregisterPackage ( const char *  iprFilename  ) 

Unregister a package from his filename.

Parameters:
iprFilename The package filename.

void eLynx::Image::ImageFileManager::UnregisterPackage ( const UUID iUUID  ) 

Unregister a package from his UUID.

Parameters:
iUUID The package UUID.

void eLynx::Image::ImageFileManager::UnregisterPlugin ( const char *  iprName  ) 

Unregister a plugin from his name.

Parameters:
iprName The plugin name.

void eLynx::Image::ImageFileManager::UnregisterPlugin ( const UUID iUUID  ) 

Unregister a plugin from his UUID.

Parameters:
iUUID The UUID that identifie the plugin to unregister.

bool eLynx::Image::ImageFileManager::UnregisterExt ( const char *  iprExt  ) 

Unregister a file extension for both input and output.

Parameters:
iprExt The file extension.
Returns:
true if succeeded, false otherwise.

bool eLynx::Image::ImageFileManager::UnregisterInExt ( const char *  iprExt  ) 

Unregister a file extension for input. This extension will be disable with Import.

Parameters:
iprExt The file extension.
Returns:
true if succeeded, false otherwise.

bool eLynx::Image::ImageFileManager::UnregisterOutExt ( const char *  iprExt  ) 

Unregister a file extension for output. This extension will be disable with Export.

Parameters:
iprExt The file extension.
Returns:
true if succeeded, false otherwise.

size_t eLynx::Image::ImageFileManager::GetInputExtCount (  )  const

Get the number of supported file extension for input file.

Returns:
The number of supported file extension for reading.

size_t eLynx::Image::ImageFileManager::GetOutputExtCount (  )  const

Get the number of supported file extension for output file.

Returns:
The number of supported file extension for writing.

size_t eLynx::Image::ImageFileManager::GetPluginCount (  )  const

Get the number of registred plugin. This is the total number of registred plugins.

Returns:
The number of registred plugin.

IImageFilePlugin* eLynx::Image::ImageFileManager::GetPlugin ( const char *  iprName  ) 

Get a pointer to a image file plugin.

Parameters:
iprName The plugin name like: jpeg, png, tiff, fits...
Returns:
A pointer on image file plugin to get access to more information.

IImageFilePlugin* eLynx::Image::ImageFileManager::GetPlugin ( size_t  iIndex  )  const

const char* eLynx::Image::ImageFileManager::GetInputFileFormatList ( bool  ibAllInOne = true  ) 

const char* eLynx::Image::ImageFileManager::GetOutputFileFormatList ( bool  ibAllInOne = false  ) 

const char* eLynx::Image::ImageFileManager::GetSupportedOutputFileFormatList ( const ImageVariant iImage,
bool  ibAllInOne = false 
)

const char* eLynx::Image::ImageFileManager::GetDescription ( size_t  iPlugin  )  const

bool eLynx::Image::ImageFileManager::CanImport ( const char *  iprFilename,
ImageFileInfo oprInfo = NULL,
bool  ibPreview = false 
)

Check is the file is supported by the manager for loading. It checks filename extension and file header integrity. Be carefull, file can be valid but not supported !

Parameters:
iprFilename The filename of the file to check.
oprInfo Informations that could be retrieved from file.
ibPreview Set to true if preview is requested in informations.
Returns:
true if file can be created with Import, false otherwise.

bool eLynx::Image::ImageFileManager::GeneratePreview ( const char *  iprFilenameIn,
const char *  iprFilenameOut,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Generate a preview file from source file.

Parameters:
iprFilenameIn The input file name, file to be readed.
iprFilenameOut The preview file name, file to be writen.
iNotifier a notifier for progression and cancel.
Returns:
true if preview has been generated, false otherwise.

bool eLynx::Image::ImageFileManager::Import ( ImageVariant oImage,
const char *  iprFilename,
ImageFileInfo oprInfo = NULL,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Import an ImageVariant from a filename.

Parameters:
oImage The image to be loaded.
iprFilename The image filename to create.
oprInfo Informations that could be retrieved from file.
iNotifier a notifier for progression and cancel.
Returns:
true if import succeeded, false otherwise.

bool eLynx::Image::ImageFileManager::CanExport ( const ImageVariant iImage,
const char *  iprFilename,
const ImageFileOptions iprOptions = NULL 
)

Check is the file is supported by the manager for exporting. Check according filename extension and image format.

Parameters:
iImage The image to export.
iprFilename The image filename.
iprOptions Some specific format options.
Returns:
true if image can be exported, false otherwise.

bool eLynx::Image::ImageFileManager::Export ( const ImageVariant iImage,
const char *  iprFilename,
ProgressNotifier iNotifier,
const ImageFileOptions iprOptions = NULL 
)

Export image to file.

Parameters:
iImage The image to export.
iprFilename The image filename.
iNotifier a notifier for progression and cancel.
iprOptions Some specific format options.
Returns:
true if image has been exported, false otherwise.

size_t eLynx::Image::ImageFileManager::GetPackageCount (  )  const [protected]

IImageFilePlugin* eLynx::Image::ImageFileManager::GetPlugin ( const UUID iClass  )  [protected]

IImageFilePlugin* eLynx::Image::ImageFileManager::GetInPlugin ( const char *  iprFilename  )  [protected]

IImageFilePlugin* eLynx::Image::ImageFileManager::GetOutPlugin ( const char *  iprFilename  )  [protected]

void eLynx::Image::ImageFileManager::Register ( IImageFilePlugin iPlugin  )  [protected]


Member Data Documentation

Definition at line 206 of file ImageFileManager.h.

Definition at line 207 of file ImageFileManager.h.

Definition at line 208 of file ImageFileManager.h.

Definition at line 212 of file ImageFileManager.h.

Definition at line 213 of file ImageFileManager.h.

Definition at line 215 of file ImageFileManager.h.

Definition at line 216 of file ImageFileManager.h.


The documentation for this class was generated from the following file:

Generated on 14 Apr 2009 by doxygen 1.5.8