eLynx SDK v3.3.0
C++ image processing API reference
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables

eLynx Namespace Reference

Base namespace for all eLynx components. More...

Namespaces

namespace  Image
 

Deals with pixels, images interfaces and tools classes.


namespace  Math
 

Deals with all basic math helpers and vectorial tools classes.


Classes

struct  elxException
 Base exception class. More...
class  AbstractParameter
struct  ParameterEnumItem
class  ParameterEnum
class  ParameterInteger
class  ParameterDouble
class  IterationRangeTask
 Base iteration range task. More...
struct  ResolutionTypeTraits
 Resolution type traits definition. More...
struct  ResolutionTypeTraits< uint8 >
 uint8 specialization for resolution type traits. More...
struct  ResolutionTypeTraits< uint16 >
 uint16 specialization for resolution type traits. More...
struct  ResolutionTypeTraits< int32 >
 int32 specialization for resolution type traits. More...
struct  ResolutionTypeTraits< uint32 >
 uint32 specialization for resolution type traits. More...
struct  ResolutionTypeTraits< int64 >
 int64 specialization for resolution type traits. More...
struct  ResolutionTypeTraits< float >
 float specialization for resolution type traits. More...
struct  ResolutionTypeTraits< double >
 double specialization for resolution type traits. More...
class  IPlugin
 Interface defining a plugin. More...
class  IPluginPackage
 Interface defining a plugin package. More...
class  IterationRange
 IterationRange represents half-open range [i,j) that can be recursively split. More...
class  PluginFile
 PluginFile is a handle to a IPluginPackage. More...
class  PluginManager
 Base tool class for plugin management. More...
struct  ProgramOption
 Program Option. More...
class  ProgressNotifier
 Abstract progress notifier class. More...
class  TaskScheduler
class  Timer
 Class to get elapsed time in platform independent way. More...
class  UUID
 Tool class for Universal Unique IDentifier. More...

Typedefs

typedef std::vector
< AbstractParameter * > 
ParameterList
typedef std::vector
< ParameterEnumItem
ParameterEnumItemList
typedef const IPluginPackage *(* elxGetPluginPackage )()
 Service definition that must be implemented by every plugin package file to retrieve his list of implemented plugins.

Enumerations

enum  EParameterType {
  PT_Boolean, PT_Enum, PT_Integer, PT_Double,
  PT_String, PT_StringList
}
enum  EResolution {
  RT_INT8, RT_UINT8, RT_INT16, RT_UINT16,
  RT_INT32, RT_UINT32, RT_INT64, RT_UINT64,
  RT_Float, RT_Double, RT_Undefined
}
 

Resolution types.

More...
enum  { PDI_Name = 0, PDI_Copyright, PDI_LongDescription, PDI_VersionAndDate }
 

Plugin description index.

More...
enum  ESubRangePosition {
  SRP_NONE, SRP_ALL, SRP_FIRST, SRP_MIDDLE,
  SRP_LAST
}
 

Enum to specify SubRange position inside the original Iteration range.

More...
enum  EOptionArgFlag {
  OA_NO_ARG = 0, OA_HAS_ARG = 1, OAF_Unset = 0, OAF_Optional = 1,
  OAF_Mandatory = 2
}
 

Enum to specify optional and mandarory command options.


Functions

template<typename T >
int8 elxToINT8 (T)
template<typename T >
uint8 elxToUINT8 (T)
template<typename T >
int16 elxToINT16 (T)
template<typename T >
uint16 elxToUINT16 (T)
template<typename T >
int32 elxToINT32 (T)
template<typename T >
uint32 elxToUINT32 (T)
template<typename T >
int64 elxToINT64 (T)
template<typename T >
uint64 elxToUINT64 (T)
template<typename T >
float elxToFloat (T)
template<typename T >
double elxToDouble (T)
template<typename T >
int8 elxToINT8Scaled (T)
template<typename T >
uint8 elxToUINT8Scaled (T)
template<typename T >
int16 elxToINT16Scaled (T)
template<typename T >
uint16 elxToUINT16Scaled (T)
template<typename T >
int32 elxToINT32Scaled (T)
template<typename T >
uint32 elxToUINT32Scaled (T)
template<typename T >
int64 elxToINT64Scaled (T)
template<typename T >
uint64 elxToUINT64Scaled (T)
template<typename T >
float elxToFloatNormalized (T)
template<typename T >
double elxToDoubleNormalized (T)
template<typename T >
void elxToDoubleNormalized (const T *, uint32 count, double *)
template<typename T >
void elxFromDouble (double iValue, T &oValue)
template<typename T >
void elxFromDoubleNormalized (double iValue, T &oValue)
template<typename T , typename U >
bool elxConvertBuffer (T *iprDst, const U *iprSrc, size_t iSize, bool ibScaled=true)
 Buffer conversion between primary types.
template<typename T >
bool elxStringToType (const char *iprString, T &oValue)
 Conversion from a string to a number of template numerical type.
ExportedByCore void elxZeroMemory (void *iprBuffer, uint32 iSize)
 Fill memory at iprBuffer with (iSize) bytes of 0x00.
ExportedByCore char elxToLower (char iChar)
 Convert a char to lower case.
ExportedByCore char elxToUpper (char iChar)
 Convert a char to upper case.
ExportedByCore void elxToLower (char *ioprString)
 Convert a 'c' string to lower case in place.
ExportedByCore void elxToUpper (char *ioprString)
 Convert a 'c' string to upper case in place.
ExportedByCore void elxThrowException (uint32 iId, const char *iFile, int32 iLine, const char *iMsg)
 Creates and throws the exception given id, file name, number of line and error message.
ExportedByCore const char * elxMsgFormat (const char *iFormatStr,...)
 Formats the error message in the style of printf functions.
ExportedByCore void elxMakePath (const std::string &iPath)
 Make a directory.
ExportedByCore bool elxIsPath (const std::string &iPath)
 Check if a path exists.
ExportedByCore void elxGetFileList (const std::string &iTarget, std::vector< std::string > &oFileList)
size_t ExportedByCore elxGetParameterIndex (const ParameterList &iList, const std::string &iName)
template<class T , size_t N>
void elxInsertionSort (T(&ioArray)[N])
 Insertion Sort for array of N.
template<class T >
void elxShellSort (T *ioprArray, uint32 iSize, uint32 iMaxIncrement)
 Shell Sort for array of iSize.
template<class T >
void elxQuickSort (T *ioprArray, uint32 iSize, int32(*iComp)(const T *, const T *))
 On a multicore machine performs parallel Quick sort.
ExportedByCore const char * elxToString (EResolution iResolution)
 Return the resolution as a string.
ExportedByCore EResolution elxGetFloatingType (EResolution iResolution)
 Return the floating resolution of a resolution.
ExportedByCore EResolution elxToEResolution (const char *iprType)
 Returns resolution type for a given string.
ExportedByCore uint32 elxGetBits (EResolution iResolution)
 Return the number of bits for the resolution.
template<typename Range , typename Task >
uint32 elxParallelFor (Range iRange, const Task &iTask)
 Template function to performs parallel execution of the specified task over a given range by subdividing it into subranges and applying the task to each subrange in a separate thread.
template<typename Range , typename Task >
uint32 elxParallelReduce (Range iRange, Task &ioTask)
 Template function to perform reduction over a range (summation, for example) by subdividing it into subranges and applying the task to each subrange in a separate thread and join the results.
ExportedByCore uint32 elxGetOptions (int32 iArgc, char **iArgv, ProgramOption *ioOptions, uint32 iSize)
 Function to parse input arguments.
File module methods.
ExportedByCore bool elxLoadModule (const char *iprFilename, ModuleId &oModule)
 Load a module file (.dll, .so).
ExportedByCore void elxUnloadModule (ModuleId &ioModule)
 Unload the module file from memory.
ExportedByCore void * elxResolveSymbol (const ModuleId &iModule, const char *iprSymbolName)
 Resolve the symbol in a module file.
Path methods.
ExportedByCore bool elxIsPath (const char *iprPath)
 Check if a path exists.
ExportedByCore bool elxMakePath (const char *iprPath)
 Make a directory.
ExportedByCore bool elxDeletePath (const char *iprPath)
 Delete a directory.
Filename methods.
ExportedByCore bool elxSplitFilename (const char *iprFilename, char *oprPath, char *oprName, char *oprExt)
 Split filename into path, name and extension.
ExportedByCore void elxSplitFilename (const std::string &iFilename, std::string &oPath, std::string &oName, std::string &oExt)
 Split filename into path, name and extension.
ExportedByCore bool elxGetFilePath (const char *iprFilename, char *oprPath)
 Get the path of a filename ending with /.
ExportedByCore const char * elxGetFileNameExt (const char *iprFilename)
 Get the name of a filename ie removing path and extension.
ExportedByCore bool elxGetFileName (const char *iprFilename, char *oprName)
 Get the name and extension of a filename removing path.
ExportedByCore const char * elxGetFileExt (const char *iprFilename)
 Get the extension of a filename.
ExportedByCore char * elxGetFileExt (char *iprFilename)
 Get the extension of a filename.
ExportedByCore bool elxCheckFileExt (const char *iprFilename, const char *iprExt, bool ibCase=true)
 Check if the given file extension is at the end of the filename.
ExportedByCore void elxForceFilename (char *ioprFilename)
 Force full filename with OS specific separator.
ExportedByCore void elxForceFilename (std::string &ioFilename)
 Force full filename with OS specific separator.

Variables

ExportedByCore ProgressNotifier ProgressNotifier_NULL

File methods.

typedef bool(* elxFileEnumCB )(const char *iprFilename, void *iprUserData)
 Define the callback use with elxEnumerateFile.
ExportedByCore bool elxIsFileExist (const char *iprFilename)
 Check if a file exist.
ExportedByCore bool elxDeleteFile (const char *iprFilename)
 Delete a file.
ExportedByCore void elxEnumerateFile (const char *iprTarget, elxFileEnumCB ifnCallback, void *iprUserData)
 Enumerate files that match the target.

Detailed Description

Base namespace for all eLynx components.

Also called 'Core'.

CoreResolution.png


CorePlugin.png

Typedef Documentation

Service definition that must be implemented by every plugin package file to retrieve his list of implemented plugins.


Enumeration Type Documentation

anonymous enum

Plugin description index.

Meaning, example:

  • 0, the plugin name, "bmp",
  • 1, the author copyright, "eLynx team",
  • 2, the plugin long description, "Window bitmap or OS2".
  • 3, the version and date.

Resolution types.

Enumerator:
RT_INT8 

byte : 8-bit signed integer

RT_UINT8 

ubyte : 8-bit unsigned integer

RT_INT16 

short : 16-bit signed integer

RT_UINT16 

ushort : 16-bit unsigned integer

RT_INT32 

int : 32-bit signed integer

RT_UINT32 

uint : 32-bit unsigned integer

RT_INT64 

large : 64-bit signed int64 integer

RT_UINT64 

ulint64 : 64-bit unsigned int64 integer

RT_Float 

float : 32-bit float point simple precision

RT_Double 

double : 64-bit float point double precision

RT_Undefined 

none of previous resolutions

Enum to specify SubRange position inside the original Iteration range.

Enumerator:
SRP_ALL 

SubRange is equivalent to the whole range.

SRP_FIRST 

SubRange is located at the beginning of the original range.

SRP_MIDDLE 

SubRange is located in the middle of the original range.

SRP_LAST 

SubRange is located at the end of the original range.


Function Documentation

ExportedByCore bool eLynx::elxCheckFileExt ( const char *  iprFilename,
const char *  iprExt,
bool  ibCase = true 
)

Check if the given file extension is at the end of the filename.

Parameters:
iprFilenameReference pointer on filename.
iprExtReference pointer on extension to check.
ibCaseSet true if you want test case (default), false if case don't mind.
Returns:
true if the requested extension is at the end of filename, false otherwise.
template<typename T , typename U >
bool eLynx::elxConvertBuffer ( T *  iprDst,
const U *  iprSrc,
size_t  iSize,
bool  ibScaled = true 
)

Buffer conversion between primary types.

Parameters:
iprDsttyped destination buffer.
iprSrctyped read-only source buffer.
iSizenumber of primary type to convert form source.
ibScaledtrue if conversion conserve max or Normalized, false for simple cast.
Returns:
true if it run successful, false otherwise.
ExportedByCore bool eLynx::elxDeleteFile ( const char *  iprFilename )

Delete a file.

Parameters:
iprFilenameThe filename to delete.
Returns:
true if deletion succeeds, false otherwise.
ExportedByCore bool eLynx::elxDeletePath ( const char *  iprPath )

Delete a directory.

Parameters:
iprPathThe path name to delete.
Returns:
true if deletion succeeds, false otherwise.
ExportedByCore void eLynx::elxEnumerateFile ( const char *  iprTarget,
elxFileEnumCB  ifnCallback,
void *  iprUserData 
)

Enumerate files that match the target.

Callback must return true to continue enumeration, false to stop enumeration.

Parameters:
iprTargetThe target file to enumerate. Ex "doc\*.htm".
ifnCallbackThe callback to call when a file is found.
iprUserDataDatas to transmit to the callback.
ExportedByCore void eLynx::elxForceFilename ( char *  ioprFilename )

Force full filename with OS specific separator.

Parameters:
ioprFilenameThe filename to force.
ExportedByCore void eLynx::elxForceFilename ( std::string &  ioFilename )

Force full filename with OS specific separator.

Parameters:
ioFilenameThe filename to force.
ExportedByCore uint32 eLynx::elxGetBits ( EResolution  iResolution )

Return the number of bits for the resolution.

Parameters:
iResolutionThe requested resolution.
Returns:
The number of bits for the resolution.
ExportedByCore const char* eLynx::elxGetFileExt ( const char *  iprFilename )

Get the extension of a filename.

Parameters:
iprFilenameReference pointer on filename.
Returns:
Reference pointer on file extension (in filename string).
ExportedByCore char* eLynx::elxGetFileExt ( char *  iprFilename )

Get the extension of a filename.

Parameters:
iprFilenameReference pointer on filename.
Returns:
Reference pointer on file extension (in filename string).
ExportedByCore bool eLynx::elxGetFileName ( const char *  iprFilename,
char *  oprName 
)

Get the name and extension of a filename removing path.

Parameters:
iprFilenameReference pointer on filename.
oprNameReference pointer on output name, must be allocated with elxPATH_MAX size.
Returns:
true if succeeded false otherwise.
ExportedByCore const char* eLynx::elxGetFileNameExt ( const char *  iprFilename )

Get the name of a filename ie removing path and extension.

Parameters:
iprFilenameReference pointer on filename.
Returns:
Reference pointer on file name (in filename string).
ExportedByCore bool eLynx::elxGetFilePath ( const char *  iprFilename,
char *  oprPath 
)

Get the path of a filename ending with /.

Parameters:
iprFilenameReference pointer on filename.
oprPathReference pointer on output path, must be allocated with elxPATH_MAX size.
Returns:
true if succeeded false otherwise.
ExportedByCore EResolution eLynx::elxGetFloatingType ( EResolution  iResolution )

Return the floating resolution of a resolution.

Parameters:
iResolutionThe requested resolution.
Returns:
The floating resolution of the given resolution.
ExportedByCore uint32 eLynx::elxGetOptions ( int32  iArgc,
char **  iArgv,
ProgramOption *  ioOptions,
uint32  iSize 
)

Function to parse input arguments.

Parameters:
iArgcnumber of the input arguments
iArgvarray of input arguments
ioOptionsarray of the allowed options
iSizenumber of the allowed options
Returns:
elxErrNoError in case of success or elxErrInvalidParams otherwise
template<class T , size_t N>
void eLynx::elxInsertionSort ( T(&)  ioArray[N] )

Insertion Sort for array of N.

the value of N should not be very int64 <100 since the implementation uses recurcive templates technique

ExportedByCore bool eLynx::elxIsFileExist ( const char *  iprFilename )

Check if a file exist.

Parameters:
iprFilenameThe filename to check.
Returns:
true if file exists, false otherwise.
ExportedByCore bool eLynx::elxIsPath ( const char *  iprPath )

Check if a path exists.

Parameters:
iprPathThe path name to check.
Returns:
true if path exists, false otherwise.
ExportedByCore bool eLynx::elxIsPath ( const std::string &  iPath )

Check if a path exists.

Parameters:
iPathThe path name to check.
Returns:
true if path exists, false otherwise.
ExportedByCore bool eLynx::elxLoadModule ( const char *  iprFilename,
ModuleId &  oModule 
)

Load a module file (.dll, .so).

Parameters:
iprFilenameThe module filename.
oModuleThe module id.
Returns:
true if the module is loaded, false if filename not found.
ExportedByCore bool eLynx::elxMakePath ( const char *  iprPath )

Make a directory.

Parameters:
iprPathThe path name to make.
Returns:
true if creation succeeds, false otherwise.
ExportedByCore void eLynx::elxMakePath ( const std::string &  iPath )

Make a directory.

Parameters:
iPathThe path name to make.
ExportedByCore const char* eLynx::elxMsgFormat ( const char *  iFormatStr,
  ... 
)

Formats the error message in the style of printf functions.

The length of resulting message is restricted to elxExWhatLength. Returns the formatted message. Method is not thread-safe.

Parameters:
iFormatStrthe format string in the printf style.
Returns:
the formatted message.
template<typename Range , typename Task >
uint32 eLynx::elxParallelFor ( Range  iRange,
const Task &  iTask 
)

Template function to performs parallel execution of the specified task over a given range by subdividing it into subranges and applying the task to each subrange in a separate thread.

Parameters:
iRangeinitial range of values.
iTasktask to execute.
Returns:
status of the execution.
template<typename Range , typename Task >
uint32 eLynx::elxParallelReduce ( Range  iRange,
Task &  ioTask 
)

Template function to perform reduction over a range (summation, for example) by subdividing it into subranges and applying the task to each subrange in a separate thread and join the results.

In addition to the operator()(Range) method Type Task must implement Join(Const Task& iOther) to merge the results into the original ioTask

Parameters:
iRange- initial range of values.
ioTask- task to execute and join the results.
Returns:
status of the execution.
template<class T >
void eLynx::elxQuickSort ( T *  ioprArray,
uint32  iSize,
int32(*)(const T *, const T *)  iComp 
)

On a multicore machine performs parallel Quick sort.

  • 1. The input range is divided into several sub-ranges.
  • 2. Each sub-ranges is sorted individually using qsort
  • 3. The results are merged using stl::inplace_merge algorithm
    On a single core machine simply runs qsort on the entire range.
    Parameters:
    ioprArraypointer on an array of T type.
    iSizethe array's size.
    iCompcomparison function that return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
ExportedByCore void* eLynx::elxResolveSymbol ( const ModuleId &  iModule,
const char *  iprSymbolName 
)

Resolve the symbol in a module file.

Parameters:
iModuleThe module file id to look for symbol.
iprSymbolNameThe symbol name to resolve.
Returns:
The address of the exported symbol, NULL if fails.
template<class T >
void eLynx::elxShellSort ( T *  ioprArray,
uint32  iSize,
uint32  iMaxIncrement 
)

Shell Sort for array of iSize.

The increment sequence is h=3*h+1(1,4,13,...)

Parameters:
ioprArraypointer on an array of T type.
iSizeNumber of items to sort in array.
iMaxIncrementThe increment max.
ExportedByCore bool eLynx::elxSplitFilename ( const char *  iprFilename,
char *  oprPath,
char *  oprName,
char *  oprExt 
)

Split filename into path, name and extension.

Parameters:
iprFilenameReference pointer on filename to split.
oprPathReference pointer on output path, must be allocated with elxPATH_MAX size.
oprNameReference pointer on output name, must be allocated with elxPATH_MAX size.
oprExtReference pointer on output extension, must be allocated with elxPATH_MAX size.
Returns:
true if succeeded false otherwise.
ExportedByCore void eLynx::elxSplitFilename ( const std::string &  iFilename,
std::string &  oPath,
std::string &  oName,
std::string &  oExt 
)

Split filename into path, name and extension.

Parameters:
iFilenamefilename to split.
oPathoutput path.
oNameoutput name.
oExtoutput extension.
Returns:
true if succeeded false otherwise.
template<typename T >
bool eLynx::elxStringToType ( const char *  iprString,
T &  oValue 
)

Conversion from a string to a number of template numerical type.

Parameters:
iprStringthe string to convert to number.
oValuethe ouput value decoded from the string.
Returns:
true if it run successful, false if the input string does not represent a valid number.
ExportedByCore void eLynx::elxThrowException ( uint32  iId,
const char *  iFile,
int32  iLine,
const char *  iMsg 
)

Creates and throws the exception given id, file name, number of line and error message.

Parameters:
iIdthe id of the error.
iFilethe name of the file (module) where the error appeared.
iLinethe number of the line where the error appeared.
iMsgthe error message. If longer than elxExWhatLength, the message. will be truncated.
ExportedByCore EResolution eLynx::elxToEResolution ( const char *  iprType )

Returns resolution type for a given string.

Parameters:
iprTypeThe requested resolution as a string.
Returns:
resolution type.
ExportedByCore char eLynx::elxToLower ( char  iChar )

Convert a char to lower case.

Parameters:
iCharchar to convert.
Returns:
the lower case char.
ExportedByCore void eLynx::elxToLower ( char *  ioprString )

Convert a 'c' string to lower case in place.

Parameters:
ioprStringThe string to convert.
ExportedByCore const char* eLynx::elxToString ( EResolution  iResolution )

Return the resolution as a string.

Parameters:
iResolutionThe requested resolution.
Returns:
The string name of the resolution.
ExportedByCore void eLynx::elxToUpper ( char *  ioprString )

Convert a 'c' string to upper case in place.

Parameters:
ioprStringThe string to convert.
ExportedByCore char eLynx::elxToUpper ( char  iChar )

Convert a char to upper case.

Parameters:
iCharchar to convert.
Returns:
the upper case char.
ExportedByCore void eLynx::elxUnloadModule ( ModuleId &  ioModule )

Unload the module file from memory.

Parameters:
ioModuleThe module file id to unload, set to 0 if when succeeded.
ExportedByCore void eLynx::elxZeroMemory ( void *  iprBuffer,
uint32  iSize 
)

Fill memory at iprBuffer with (iSize) bytes of 0x00.

Parameters:
iprBufferPointer on start memory adress to reset.
iSizeSize in bytes to be set to 0x00.

Generated on Thu Dec 9 2010 by doxygen 1.7.2