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

eLynx Namespace Reference


Namespaces

namespace  Math
namespace  Image

Classes

struct  elxException
class  AbstractParameter
struct  ParameterEnumItem
class  ParameterEnum
class  ParameterInteger
class  ParameterDouble
class  IterationRangeTask
struct  ResolutionTypeTraits
struct  ResolutionTypeTraits< uint8 >
struct  ResolutionTypeTraits< uint16 >
struct  ResolutionTypeTraits< int32 >
struct  ResolutionTypeTraits< uint32 >
struct  ResolutionTypeTraits< int64 >
struct  ResolutionTypeTraits< float >
struct  ResolutionTypeTraits< double >
class  IPlugin
class  IPluginPackage
class  IterationRange
class  PluginFile
class  PluginManager
struct  ProgramOption
 Program Option. More...
class  ProgressNotifier
class  Timer
class  UUID

Typedefs

typedef std::vector
< AbstractParameter * > 
ParameterList
typedef std::vector
< ParameterEnumItem
ParameterEnumItemList
typedef const IPluginPackage *(* elxGetPluginPackage )()

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
}
enum  { PDI_Name = 0, PDI_Copyright, PDI_LongDescription }
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. More...

Functions

template<typename T >
int8 elxToByte (T)
template<typename T >
uint8 elxToUByte (T)
template<typename T >
int16 elxToShort (T)
template<typename T >
uint16 elxToUShort (T)
template<typename T >
int32 elxToInteger (T)
template<typename T >
uint32 elxToUInteger (T)
template<typename T >
int64 elxToLarge (T)
template<typename T >
uint64 elxToULarge (T)
template<typename T >
float elxToFloat (T)
template<typename T >
double elxToDouble (T)
template<typename T >
int8 elxToByteScaled (T)
template<typename T >
uint8 elxToUByteScaled (T)
template<typename T >
int16 elxToShortScaled (T)
template<typename T >
uint16 elxToUShortScaled (T)
template<typename T >
int32 elxToIntegerScaled (T)
template<typename T >
uint32 elxToUIntegerScaled (T)
template<typename T >
int64 elxToLargeScaled (T)
template<typename T >
uint64 elxToULargeScaled (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.
ExportedByCore void elxZeroMemory (void *iprBuffer, uint32 iSize)
ExportedByCore char elxToLower (char iChar)
ExportedByCore char elxToUpper (char iChar)
ExportedByCore void elxToLower (char *ioprString)
ExportedByCore void elxToUpper (char *ioprString)
ExportedByCore void elxThrowException (uint32 iId, const char *iFile, int32 iLine, const char *iMsg)
ExportedByCore const char * elxMsgFormat (const char *iFormatStr,...)
ExportedByCore void elxMakePath (const std::string &iPath)
ExportedByCore bool elxIsPath (const std::string &iPath)
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])
template<class T >
void elxShellSort (T *ioprArray, uint32 iSize, uint32 iMaxIncrement)
template<class T >
void elxQuickSort (T *ioprArray, uint32 iSize, int32(*iComp)(const T *, const T *))
ExportedByCore const char * elxToString (EResolution iResolution)
ExportedByCore uint32 elxGetBits (EResolution iResolution)
template<typename Range , typename Task >
uint32 elxParallelFor (Range iRange, const Task &iTask)
template<typename Range , typename Task >
uint32 elxParallelReduce (Range iRange, Task &ioTask)
ExportedByCore uint32 elxGetOptions (int32 iArgc, char **iArgv, ProgramOption *ioOptions, uint32 iSize)
File module methods.
ExportedByCore bool elxLoadModule (const char *iprFilename, ModuleId &oModule)
ExportedByCore void elxUnloadModule (ModuleId &ioModule)
ExportedByCore void * elxResolveSymbol (const ModuleId &iModule, const char *iprSymbolName)
Path methods.
ExportedByCore bool elxIsPath (const char *iprPath)
ExportedByCore bool elxMakePath (const char *iprPath)
ExportedByCore bool elxDeletePath (const char *iprPath)
Filename methods.
ExportedByCore bool elxSplitFilename (const char *iprFilename, char *oprPath, char *oprName, char *oprExt)
ExportedByCore void elxSplitFilename (const std::string &iFilename, std::string &oPath, std::string &oName, std::string &oExt)
ExportedByCore bool elxGetFilePath (const char *iprFilename, char *oprPath)
ExportedByCore const char * elxGetFileNameExt (const char *iprFilename)
ExportedByCore bool elxGetFileName (const char *iprFilename, char *oprName)
ExportedByCore const char * elxGetFileExt (const char *iprFilename)
ExportedByCore char * elxGetFileExt (char *iprFilename)
ExportedByCore bool elxCheckFileExt (const char *iprFilename, const char *iprExt, bool ibCase=true)
ExportedByCore void elxForceFilename (char *ioprFilename)
ExportedByCore void elxForceFilename (std::string &ioFilename)

Variables

ExportedByCore ProgressNotifier ProgressNotifier_NULL

File methods.

typedef bool(* elxFileEnumCB )(const char *iprFilename, void *iprUserData)
ExportedByCore bool elxIsFileExist (const char *iprFilename)
ExportedByCore bool elxDeleteFile (const char *iprFilename)
ExportedByCore void elxEnumerateFile (const char *iprTarget, elxFileEnumCB ifnCallback, void *iprUserData)

Detailed Description

Base namespace for all eLynx components. Also called 'Core'.

CoreResolution.png

CorePlugin.png


Typedef Documentation

typedef bool(* eLynx::elxFileEnumCB)(const char *iprFilename, void *iprUserData)

Define the callback use with elxEnumerateFile.

Definition at line 111 of file CoreFile.h.

typedef std::vector<AbstractParameter*> eLynx::ParameterList

Definition at line 54 of file CoreParameters.h.

Definition at line 64 of file CoreParameters.h.

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

Definition at line 74 of file IPluginPackage.h.


Enumeration Type Documentation

Enumerator:
PT_Boolean 
PT_Enum 
PT_Integer 
PT_Double 
PT_String 
PT_StringList 

Definition at line 27 of file CoreParameters.h.

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

Definition at line 138 of file CoreTypes.h.

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".
Enumerator:
PDI_Name 
PDI_Copyright 
PDI_LongDescription 

Definition at line 33 of file IPlugin.h.

Enum to specify SubRange position inside the original Iteration range.

Enumerator:
SRP_NONE 
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.

Definition at line 33 of file ParallelAlgorithms.h.

Enum to specify optional and mandarory command options.

Enumerator:
OA_NO_ARG 
OA_HAS_ARG 
OAF_Unset 
OAF_Optional 
OAF_Mandatory 

Definition at line 33 of file ProgramOptions.h.


Function Documentation

template<typename T >
int8 eLynx::elxToByte (  )  [inline]

template<typename T >
uint8 eLynx::elxToUByte (  )  [inline]

template<typename T >
int16 eLynx::elxToShort (  )  [inline]

template<typename T >
uint16 eLynx::elxToUShort (  )  [inline]

template<typename T >
int32 eLynx::elxToInteger (  )  [inline]

template<typename T >
uint32 eLynx::elxToUInteger (  )  [inline]

template<typename T >
int64 eLynx::elxToLarge (  )  [inline]

template<typename T >
uint64 eLynx::elxToULarge (  )  [inline]

template<typename T >
float eLynx::elxToFloat (  )  [inline]

template<typename T >
double eLynx::elxToDouble (  )  [inline]

template<typename T >
int8 eLynx::elxToByteScaled (  )  [inline]

template<typename T >
uint8 eLynx::elxToUByteScaled (  )  [inline]

template<typename T >
int16 eLynx::elxToShortScaled (  )  [inline]

template<typename T >
uint16 eLynx::elxToUShortScaled (  )  [inline]

template<typename T >
int32 eLynx::elxToIntegerScaled (  )  [inline]

template<typename T >
uint32 eLynx::elxToUIntegerScaled (  )  [inline]

template<typename T >
int64 eLynx::elxToLargeScaled (  )  [inline]

template<typename T >
uint64 eLynx::elxToULargeScaled (  )  [inline]

template<typename T >
float eLynx::elxToFloatNormalized (  )  [inline]

template<typename T >
double eLynx::elxToDoubleNormalized (  )  [inline]

template<typename T >
void eLynx::elxToDoubleNormalized ( const T *  ,
uint32  count,
double *   
) [inline]

template<typename T >
void eLynx::elxFromDouble ( double  iValue,
T &  oValue 
) [inline]

template<typename T >
void eLynx::elxFromDoubleNormalized ( double  iValue,
T &  oValue 
) [inline]

template<typename T , typename U >
bool eLynx::elxConvertBuffer ( T *  iprDst,
const U *  iprSrc,
size_t  iSize,
bool  ibScaled = true 
) [inline]

Buffer conversion between primary types.

ExportedByCore void eLynx::elxZeroMemory ( void *  iprBuffer,
uint32  iSize 
)

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

Parameters:
iprBuffer Pointer on start memory adress to reset.
iSize Size in bytes to be set to 0x00.

ExportedByCore char eLynx::elxToLower ( char  iChar  ) 

Convert a char to lower case.

Parameters:
iChar char to convert.
Returns:
the lower case char.

ExportedByCore char eLynx::elxToUpper ( char  iChar  ) 

Convert a char to upper case.

Parameters:
iChar char to convert.
Returns:
the upper case char.

ExportedByCore void eLynx::elxToLower ( char *  ioprString  ) 

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

Parameters:
ioprString The string to convert.

ExportedByCore void eLynx::elxToUpper ( char *  ioprString  ) 

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

Parameters:
ioprString The string to convert.

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:
iId the id of the error.
iFile the name of the file (module) where the error appeared.
iLine the number of the line where the error appeared.
iMsg the error message. If longer than elxExWhatLength, the message. will be truncated.

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:
iFormatStr the format string in the printf style.
Returns:
the formatted message.

ExportedByCore bool eLynx::elxLoadModule ( const char *  iprFilename,
ModuleId &  oModule 
)

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

Parameters:
iprFilename The module filename.
oModule The module id.
Returns:
true if the module is loaded, false if filename not found.

ExportedByCore void eLynx::elxUnloadModule ( ModuleId &  ioModule  ) 

Unload the module file from memory.

Parameters:
ioModule The module file id to unload, set to 0 if when succeeded.

ExportedByCore void* eLynx::elxResolveSymbol ( const ModuleId &  iModule,
const char *  iprSymbolName 
)

Resolve the symbol in a module file.

Parameters:
iModule The module file id to look for symbol.
iprSymbolName The symbol name to resolve.
Returns:
The address of the exported symbol, NULL if fails.

ExportedByCore bool eLynx::elxIsPath ( const char *  iprPath  ) 

Check if a path exists.

Parameters:
iprPath The path name to check.
Returns:
true if path exists, false otherwise.

ExportedByCore bool eLynx::elxMakePath ( const char *  iprPath  ) 

Make a directory.

Parameters:
iprPath The path name to make.
Returns:
true if creation succeeds, false otherwise.

ExportedByCore bool eLynx::elxDeletePath ( const char *  iprPath  ) 

Delete a directory.

Parameters:
iprPath The path name to delete.
Returns:
true if deletion succeeds, false otherwise.

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

Check if a file exist.

Parameters:
iprFilename The filename to check.
Returns:
true if file exists, false otherwise.

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

Delete a file.

Parameters:
iprFilename The filename 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:
iprTarget The target file to enumerate. Ex "doc\*.htm".
ifnCallback The callback to call when a file is found.
iprUserData Datas to transmit to the callback.

ExportedByCore bool eLynx::elxSplitFilename ( const char *  iprFilename,
char *  oprPath,
char *  oprName,
char *  oprExt 
)

Split filename into path, name and extension.

Parameters:
iprFilename Reference pointer on filename to split.
oprPath Reference pointer on output path, must be allocated with elxPATH_MAX size.
oprName Reference pointer on output name, must be allocated with elxPATH_MAX size.
oprExt Reference 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:
iFilename filename to split.
oPath output path.
oName output name.
oExt output extension.
Returns:
true if succeeded false otherwise.

ExportedByCore bool eLynx::elxGetFilePath ( const char *  iprFilename,
char *  oprPath 
)

Get the path of a filename ending with /.

Parameters:
iprFilename Reference pointer on filename.
oprPath Reference pointer on output path, 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:
iprFilename Reference pointer on filename.
Returns:
Reference pointer on file name (in filename string).

ExportedByCore bool eLynx::elxGetFileName ( const char *  iprFilename,
char *  oprName 
)

Get the name and extension of a filename removing path.

Parameters:
iprFilename Reference pointer on filename.
oprName Reference pointer on output name, must be allocated with elxPATH_MAX size.
Returns:
true if succeeded false otherwise.

ExportedByCore const char* eLynx::elxGetFileExt ( const char *  iprFilename  ) 

Get the extension of a filename.

Parameters:
iprFilename Reference 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:
iprFilename Reference pointer on filename.
Returns:
Reference pointer on file extension (in filename string).

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:
iprFilename Reference pointer on filename.
iprExt Reference pointer on extension to check.
ibCase Set 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.

ExportedByCore void eLynx::elxForceFilename ( char *  ioprFilename  ) 

Force full filename with OS specific separator.

Parameters:
ioprFilename The filename to force.

ExportedByCore void eLynx::elxForceFilename ( std::string &  ioFilename  ) 

Force full filename with OS specific separator.

Parameters:
ioFilename The filename to force.

ExportedByCore void eLynx::elxMakePath ( const std::string &  iPath  ) 

Make a directory.

Parameters:
iPath The path name to make.

ExportedByCore bool eLynx::elxIsPath ( const std::string &  iPath  ) 

Check if a path exists.

Parameters:
iPath The path name to check.
Returns:
true if path exists, false otherwise.

ExportedByCore void eLynx::elxGetFileList ( const std::string &  iTarget,
std::vector< std::string > &  oFileList 
)

size_t ExportedByCore eLynx::elxGetParameterIndex ( const ParameterList &  iList,
const std::string &  iName 
)

template<class T , size_t N>
void eLynx::elxInsertionSort ( T(&)  ioArray[N]  )  [inline]

Insertion Sort for array of N. the value of N should not be very int64 <100 since the implementation uses recurcive templates technique

template<class T >
void eLynx::elxShellSort ( T *  ioprArray,
uint32  iSize,
uint32  iMaxIncrement 
) [inline]

Shell Sort for array of iSize. The increment sequence is h=3*h+1(1,4,13,...)

Parameters:
ioprArray pointer on an array of T type.
iSize Number of items to sort in array.
iMaxIncrement The increment max.

template<class T >
void eLynx::elxQuickSort ( T *  ioprArray,
uint32  iSize,
int32(*)(const T *, const T *)  iComp 
) [inline]

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:
ioprArray pointer on an array of T type.
iSize the array's size.
iComp comparison 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 const char* eLynx::elxToString ( EResolution  iResolution  ) 

Return the resolution as a string.

Parameters:
iResolution The requested resolution.
Returns:
The string name of the resolution.

ExportedByCore uint32 eLynx::elxGetBits ( EResolution  iResolution  ) 

Return the number of bits for the resolution.

Parameters:
iResolution The requested resolution.
Returns:
The number of bits for the resolution.

template<typename Range , typename Task >
uint32 eLynx::elxParallelFor ( Range  iRange,
const Task &  iTask 
) [inline]

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:
iRange initial range of values.
iTask task to execute.
Returns:
status of the execution.

template<typename Range , typename Task >
uint32 eLynx::elxParallelReduce ( Range  iRange,
Task &  ioTask 
) [inline]

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 Task - ioTask

Parameters:
iRange - initial range of values.
ioTask - task to execute and join the results.
Returns:
status of the execution.

ExportedByCore uint32 eLynx::elxGetOptions ( int32  iArgc,
char **  iArgv,
ProgramOption *  ioOptions,
uint32  iSize 
)

Function to parse input arguments

Parameters:
iArgc number of the input arguments
iArgv array of input arguments
ioOptions array of the allowed options
iSize number of the allowed options
Returns:
elxErrNoError in case of success or elxErrInvalidParams otherwise


Variable Documentation


Generated on 14 Apr 2009 by doxygen 1.5.8