eLynx SDK
v3.0.1 C++ image processing API reference |
#include <ImageFileManager.h>
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 |
IImageFilePlugin * | GetPlugin (const char *iprName) |
IImageFilePlugin * | GetPlugin (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 |
IImageFilePlugin * | GetPlugin (const UUID &iClass) |
IImageFilePlugin * | GetInPlugin (const char *iprFilename) |
IImageFilePlugin * | GetOutPlugin (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 |
Definition at line 40 of file ImageFileManager.h.
typedef std::map<std::string, IImageFilePlugin *> eLynx::Image::ImageFileManager::MapExt [protected] |
Definition at line 211 of file ImageFileManager.h.
eLynx::Image::ImageFileManager::ImageFileManager | ( | ) |
Default constructor. While Register is not called the manager is not very usefull.
virtual eLynx::Image::ImageFileManager::~ImageFileManager | ( | ) | [virtual] |
Destructor.
bool eLynx::Image::ImageFileManager::IsEmpty | ( | ) | const |
Retrieve if plugin are loaded.
bool eLynx::Image::ImageFileManager::Register | ( | const char * | iprPath | ) |
Register packages. Load all plugin packages (*.iio) adhering to UUID_IImageFilePlugin from a given path.
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.
iPackage | The package to unregister. |
void eLynx::Image::ImageFileManager::Unregister | ( | const IImageFilePlugin & | iPlugin | ) |
Unregister a plugin.
iPlugin | The plugin to unregister. |
void eLynx::Image::ImageFileManager::UnregisterPackage | ( | const char * | iprFilename | ) |
Unregister a package from his filename.
iprFilename | The package filename. |
void eLynx::Image::ImageFileManager::UnregisterPackage | ( | const UUID & | iUUID | ) |
void eLynx::Image::ImageFileManager::UnregisterPlugin | ( | const char * | iprName | ) |
Unregister a plugin from his name.
iprName | The plugin name. |
void eLynx::Image::ImageFileManager::UnregisterPlugin | ( | const UUID & | iUUID | ) |
bool eLynx::Image::ImageFileManager::UnregisterExt | ( | const char * | iprExt | ) |
Unregister a file extension for both input and output.
iprExt | The file extension. |
bool eLynx::Image::ImageFileManager::UnregisterInExt | ( | const char * | iprExt | ) |
Unregister a file extension for input. This extension will be disable with Import.
iprExt | The file extension. |
bool eLynx::Image::ImageFileManager::UnregisterOutExt | ( | const char * | iprExt | ) |
Unregister a file extension for output. This extension will be disable with Export.
iprExt | The file extension. |
size_t eLynx::Image::ImageFileManager::GetInputExtCount | ( | ) | const |
Get the number of supported file extension for input file.
size_t eLynx::Image::ImageFileManager::GetOutputExtCount | ( | ) | const |
Get the number of supported file extension for output file.
size_t eLynx::Image::ImageFileManager::GetPluginCount | ( | ) | const |
Get the number of registred plugin. This is the total number of registred plugins.
IImageFilePlugin* eLynx::Image::ImageFileManager::GetPlugin | ( | const char * | iprName | ) |
Get a pointer to a image file plugin.
iprName | The plugin name like: jpeg, png, tiff, fits... |
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 !
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. |
bool eLynx::Image::ImageFileManager::GeneratePreview | ( | const char * | iprFilenameIn, | |
const char * | iprFilenameOut, | |||
ProgressNotifier & | iNotifier = ProgressNotifier_NULL | |||
) |
Generate a preview file from source file.
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. |
bool eLynx::Image::ImageFileManager::Import | ( | ImageVariant & | oImage, | |
const char * | iprFilename, | |||
ImageFileInfo * | oprInfo = NULL , |
|||
ProgressNotifier & | iNotifier = ProgressNotifier_NULL | |||
) |
Import an ImageVariant from a filename.
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. |
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.
iImage | The image to export. | |
iprFilename | The image filename. | |
iprOptions | Some specific format options. |
bool eLynx::Image::ImageFileManager::Export | ( | const ImageVariant & | iImage, | |
const char * | iprFilename, | |||
ProgressNotifier & | iNotifier, | |||
const ImageFileOptions * | iprOptions = NULL | |||
) |
Export image to file.
iImage | The image to export. | |
iprFilename | The image filename. | |
iNotifier | a notifier for progression and cancel. | |
iprOptions | Some specific format options. |
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] |
Definition at line 206 of file ImageFileManager.h.
size_t eLynx::Image::ImageFileManager::_nInputFileFormat [protected] |
Definition at line 207 of file ImageFileManager.h.
size_t eLynx::Image::ImageFileManager::_nOutputFileFormat [protected] |
Definition at line 208 of file ImageFileManager.h.
MapExt eLynx::Image::ImageFileManager::_inExts [protected] |
Definition at line 212 of file ImageFileManager.h.
MapExt eLynx::Image::ImageFileManager::_outExts [protected] |
Definition at line 213 of file ImageFileManager.h.
std::string eLynx::Image::ImageFileManager::_inFormatList [protected] |
Definition at line 215 of file ImageFileManager.h.
std::string eLynx::Image::ImageFileManager::_outFormatList [protected] |
Definition at line 216 of file ImageFileManager.h.