|
eLynx SDK
v3.3.0 C++ image processing API reference |
Tool class to manage image file format via plugins. More...
#include <ImageFileManager.h>
Public Member Functions | |
| ImageFileManager () | |
| Default constructor. | |
| virtual | ~ImageFileManager () |
| Destructor. | |
| 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 |
| Retrieve if plugin are loaded. | |
| bool | Register (const char *iprPath) |
| Register packages. | |
| void | Unregister () |
| Unregister all packages so all plugins. | |
| void | Unregister (const IPluginPackage &iPackage) |
| Unregister a package, and his associated registered plugins. | |
| void | Unregister (const IImageFilePlugin &iPlugin) |
| Unregister a plugin. | |
| void | UnregisterPackage (const char *iprFilename) |
| Unregister a package from his filename. | |
| void | UnregisterPackage (const UUID &iUUID) |
| Unregister a package from his UUID. | |
| void | UnregisterPlugin (const char *iprName) |
| Unregister a plugin from his name. | |
| void | UnregisterPlugin (const UUID &iUUID) |
| Unregister a plugin from his UUID. | |
| bool | UnregisterExt (const char *iprExt) |
| Unregister a file extension for both input and output. | |
| bool | UnregisterInExt (const char *iprExt) |
| Unregister a file extension for input. | |
| bool | UnregisterOutExt (const char *iprExt) |
| Unregister a file extension for output. | |
| size_t | GetInputExtCount () const |
| Get the number of supported file extension for input file. | |
| size_t | GetOutputExtCount () const |
| Get the number of supported file extension for output file. | |
| size_t | GetPluginCount () const |
| Get the number of registred plugin. | |
| IImageFilePlugin * | GetPlugin (const char *iprName) |
| Get a pointer to a image file plugin. | |
| 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) |
| Check is the file is supported by the manager for loading. | |
| bool | GeneratePreview (const char *iprFilenameIn, const char *iprFilenameOut, ProgressNotifier &iNotifier=ProgressNotifier_NULL) |
| Generate a preview file from source file. | |
| bool | Import (ImageVariant &oImage, const char *iprFilename, ImageFileInfo *oprInfo=NULL, ProgressNotifier &iNotifier=ProgressNotifier_NULL) |
| Import an ImageVariant from a filename. | |
| bool | CanExport (const ImageVariant &iImage, const char *iprFilename, const ImageFileOptions *iprOptions=NULL) |
| Check is the file is supported by the manager for exporting. | |
| bool | Export (const ImageVariant &iImage, const char *iprFilename, ProgressNotifier &iNotifier, const ImageFileOptions *iprOptions=NULL) |
| Export image to file. | |
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 |
Tool class to manage image file format via plugins.
| eLynx::Image::ImageFileManager::ImageFileManager | ( | ) |
Default constructor.
While Register is not called the manager is not very usefull.
| 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::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::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. |
| 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. |
| 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.
| 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... |
| size_t eLynx::Image::ImageFileManager::GetPluginCount | ( | ) | const |
Get the number of registred plugin.
This is the total number of registred plugins.
| 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::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 | ( | 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. |
| 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. |
| void eLynx::Image::ImageFileManager::UnregisterPackage | ( | const UUID & | iUUID ) |
| void eLynx::Image::ImageFileManager::UnregisterPackage | ( | const char * | iprFilename ) |
Unregister a package from his filename.
| iprFilename | The package filename. |
| 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 ) |