Image Component Library (ICL)
Classes | Typedefs | Functions
icl::utils Namespace Reference

Classes

struct  Any
 Simple generic data type implementation that uses a string based data representation. More...
 
class  Array2D
 Simple 2D-Array class that provides shallow copy per default. More...
 
struct  ArrayDelOp
 Array delete operation class for the SmartPtr class. More...
 
class  CLBuffer
 Wrapper for an OpenCL Buffer. More...
 
class  CLBufferException
 Class for an OpenCL Exception associated with buffers. More...
 
class  CLBuildException
 Class for an OpenCL Exception during kernel compiling. More...
 
class  CLDeviceContext
 The CLDeviceContext class allows preparation of the device used for CLPrograms. More...
 
class  CLException
 Base class for an OpenCL Exception. More...
 
class  CLImage2D
 Wrapper for an OpenCL Image2D. More...
 
class  CLInitException
 Class for an OpenCL Exception during initialization. More...
 
class  CLKernel
 Wrapper for an OpenCL Kernel. More...
 
class  CLKernelException
 Class for an OpenCL Exception associated with kernels. More...
 
class  CLMemory
 The CLMemory class is a base class for CLBuffer and CLImage2D. More...
 
class  CLMemoryAssistant
 The CLMemoryAssistant class is a helper class to maintain buffers and images for opencl-program pipelines. More...
 
class  CLProgram
 Main class for OpenCL based accelleration. More...
 
class  ConfigFile
 Utility class for creating and reading XML-based hierarchical configuration files. More...
 
class  Configurable
 Interface for classes that can be configured from configuration-files and GUI-Components. More...
 
class  ConfigurableProxy
 This class provides the getter and setter methods of an internally set Configurable. More...
 
struct  ConstFunctorFunctionImpl
 FunctionImpl implementation for functors of const objects. More...
 
struct  ConstMemberFunctionImpl
 FunctionImpl implementation for const member functions. More...
 
class  DelOpBase
 Pure Interface class for DelOps. More...
 
class  FastMedianList
 Utility class for fast calculation of a median (calculating a median in O(N)) More...
 
class  File
 Utility class for file handling (reading files is buffered) More...
 
class  FileNotFoundException
 Exception thrown if a file could not be found. More...
 
class  FileOpenException
 Exception thrown if a file could not be opend. More...
 
struct  FixedArray
 Fixed C++-array wrapper class for data handling. More...
 
struct  FixedArray< T, 1u >
 Specialization for 1D-vectors providing a value x. More...
 
struct  FixedArray< T, 2u >
 Specialization for 2D-matrics providing direct access to values x, y. More...
 
struct  FixedArray< T, 3u >
 Specialization for 3D-matrics providing direct access to values x, y, z. More...
 
struct  FixedArray< T, 4u >
 Specialization for 4D-matrics providing direct access to values x, y, z and h. More...
 
class  FPSEstimator
 Utility clas for online FPS estimation. More...
 
class  FPSLimiter
 An fps limiter can be used to limit online applications FPS. More...
 
struct  FreeDelOp
 C-Style delete operation class for the SmartPtr class. More...
 
struct  Function
 The General Function Template. More...
 
struct  FunctionImpl
 General Implementation for binary functions. More...
 
struct  FunctionImpl< R, A, B, NO_ARG >
 Special Implementation for unary functions. More...
 
struct  FunctionImpl< R, A, NO_ARG >
 Special Implementation for unary functions. More...
 
struct  FunctionImpl< R, NO_ARG >
 Special Implementation for void functions. More...
 
struct  FunctorFunctionImpl
 FunctionImpl implementation for Functors. More...
 
struct  GlobalFunctionImpl
 FunctionImpl implementation for global functions. More...
 
class  GRand
 lightweight Random generator class for gaussian distributed numbers More...
 
class  GRandClip
 lightweight Random generator class for gaussian distributed numbers clipped to a given range More...
 
class  ICLDynamicFunctionLoadException
 
class  ICLDynamicLibLoadException
 
class  ICLException
 Base class for Exception handling in the ICL. More...
 
class  InvalidDepthException
 Exception thrown if a function should process an unsupported image depth. More...
 
class  InvalidFileException
 Exception thrown if a file could not be read properly. More...
 
class  InvalidFileFormatException
 Exception for invalid file formats. More...
 
class  InvalidFormatException
 Exception thrown if a function should process an unsupported image format. More...
 
class  InvalidImgParamException
 Exception called if an image gets invalid params. More...
 
class  InvalidNumChannelException
 Exception thrown if a function should process an unsupported image depth. More...
 
class  InvalidRegularExpressionException
 Thrown by iclStringUtils::match if regular Expression is not valid. More...
 
class  InvalidSizeException
 Exception thrown if a function should process an unsupported sizes (e.g. with negative dim..) More...
 
class  IppInterface
 
class  Lockable
 Interface for objects, that can be locked using an internal mutex. More...
 
struct  MatchResult
 Utility structure for matching results. More...
 
struct  MemberFunctionImpl
 FunctionImpl implementation for member functions. More...
 
class  MultiThreader
 Utility class for parallelizing algorithms. More...
 
class  MultiTypeMap
 Abstract and associative Data Container for Data of different types. More...
 
class  Mutex
 Mutex class of the ICL. More...
 
struct  ParamList
 Utility structure that utilizes an std::map as parameter list. More...
 
class  ParseException
 Exception thrown if a string is parsed into a specific type (or something) More...
 
class  PluginRegister
 Utility class for plugin registration. More...
 
class  Point
 Point class of the ICL used e.g. for the Images ROI offset. More...
 
class  Point32f
 Single precission 3D Vectors Point class of the ICL. More...
 
struct  PointerDelOp
 Pointer delete operation class for the SmartPtr class. More...
 
class  ProcessMonitor
 The ProcessMonitor class grants access to processes memory and CPU usage. More...
 
class  ProgArg
 Programm argument utility class. More...
 
struct  ProgArgException
 Programm argument environment exception type . More...
 
struct  RandomSeeder
 Object based random seed caller. More...
 
struct  Range
 class representing a range defined by min and max value More...
 
class  Rect
 Rectangle class of the ICL used e.g. for the Images ROI-rect. More...
 
class  Rect32f
 Floating point precision implementation of the Rect class. More...
 
struct  SelectFunctor
 Empty utility template that can be used to select a special functor. More...
 
class  Semaphore
 Simple Semaphore implementation wrapping the standard linux "sem_t"-struct. More...
 
class  ShallowCopyable
 Interface class for cheap copyable classes using a smart ptr. More...
 
class  SignalHandler
 C++ Signal-Handler interface class. More...
 
class  Size
 Size class of the ICL. More...
 
class  Size32f
 Size32f class of the ICL (float valued) More...
 
struct  SmartArray
 Specialization of the SmartPtrBase class for Arrays. More...
 
struct  SmartPtr
 Specialization of the SmartPtrBase class for Pointers. More...
 
class  SmartPtrBase
 Base class for reference counting smart-pointers. More...
 
class  StackTimer
 Tool for benchmarking method calls. More...
 
struct  SteppingRange
 class representing a range with defined stepping More...
 
class  StrTok
 String Tokenizer Utility class. More...
 
class  TextTable
 Utility class for pretty console output. More...
 
class  Thread
 Simple object oriented thread class wrapping the pthread library. More...
 
class  Time
 ICL Time class (taken from the Ice lib) More...
 
class  Timer
 
class  UncopiedInstance
 Utility class for class instances that are created brand new on copy. More...
 
class  Uncopyable
 Class interface for un-copyable classes. More...
 
class  URand
 lightweight Random generator class for uniform random distributions More...
 
class  URandI
 lightweight Random generator class for uniform random distributions in positive integer domain More...
 
class  VisualizationDescription
 Abstract class for visualization tasks. More...
 

Typedefs

typedef pugi::xml_node_type XMLNodeType
 Node type. More...
 
typedef pugi::xml_encoding XMLEncoding
 XML encoding type. More...
 
typedef pugi::xml_writer XMLWriter
 XML writer interface. More...
 
typedef pugi::xml_writer_stream XMLStreamWriter
 XML writer implementation for streams. More...
 
typedef pugi::xml_writer_file XMLFileWriter
 XML writer implementation for files. More...
 
typedef pugi::xml_attribute XMLAttribute
 XML Attribute class. More...
 
typedef pugi::xml_node XMLNode
 XML Node class. More...
 
typedef pugi::xml_node_iterator XMLNodeIterator
 Iterator for XMLNodes. More...
 
typedef pugi::xml_attribute_iterator XMLAttributeIterator
 Iterator for XMLAttributes. More...
 
typedef pugi::xml_tree_walker XMLTreeWalker
 XML-Treewalker class. More...
 
typedef pugi::xml_parse_status XMLParseStatus
 Parsing status enumeration. More...
 
typedef pugi::xml_parse_result XMLParseResult
 Parsing status class. More...
 
typedef pugi::xml_document XMLDocument
 Main XML Document class. More...
 
typedef pugi::xpath_value_type XPathValueType
 Type enumeration for xpath values. More...
 
typedef pugi::xpath_parse_result XPathParseResult
 Parse Result class for XPath expressions. More...
 
typedef pugi::xpath_variable XPathVariable
 Variable Type for XPath expressions. More...
 
typedef pugi::xpath_variable_set XPathVariableSet
 Set of XPathVariables. More...
 
typedef pugi::xpath_query XPathQuery
 Precompiled XPath expression. More...
 
typedef pugi::xpath_exception XPathException
 Exception type for xpath expressions. More...
 
typedef pugi::xpath_node XPathNode
 Special node type for XPath query results. More...
 
typedef pugi::xpath_node_set XPathNodeSet
 Set of XPath nodes. More...
 

Functions

template<class T >
clip (T tX, T tMin, T tMax)
 clips a value into the range [tMin,tMax] More...
 
template<class T >
bool is_float_type ()
 
template<class S , class D >
clipped_cast (S src)
 utility cast function wrapping the standard lib's numerical_limits template More...
 
ICLUtils_API std::ostream & operator<< (std::ostream &s, const ConfigFile &cf)
 Default ostream operator to put a ConfigFile into a stream. More...
 
ICLUtils_API void progress_init (const std::string &text="Creating LUT")
 static utility function for displaying some progress information in console More...
 
ICLUtils_API void progress_finish ()
 static utility function for displaying some progress information in console More...
 
ICLUtils_API void progress (int curr, int max, const std::string &extraText="")
 static utility function for displaying some progress information in console More...
 
template<class Object , class R , class A , class B , class C >
Function< R, A, B, C > function (Object &obj, R(Object::*method)(A, B, C))
 Create Function instances from member functions. More...
 
template<class Object , class R , class A , class B >
Function< R, A, B > function (Object &obj, R(Object::*method)(A, B))
 Create Function instances from member functions. More...
 
template<class Object , class R , class A >
Function< R, A > function (Object &obj, R(Object::*method)(A))
 create Function instances from member function More...
 
template<class Object , class R >
Function< R > function (Object &obj, R(Object::*method)())
 create Function instances from member function More...
 
template<class Object , class R , class A , class B , class C >
Function< R, A, B, C > function (const Object &obj, R(Object::*method)(A a, B b, C c) const)
 create Function instances from const member function More...
 
template<class Object , class R , class A , class B >
Function< R, A, B > function (const Object &obj, R(Object::*method)(A a, B b) const)
 create Function instances from const member function More...
 
template<class Object , class R , class A >
Function< R, A > function (const Object &obj, R(Object::*method)(A a) const)
 create Function instances from const member function More...
 
template<class Object , class R >
Function< R > function (const Object &obj, R(Object::*method)() const)
 create Function instances from const member function More...
 
template<class Object , class R , class A , class B , class C >
Function< R, A, B, C > function (Object *obj, R(Object::*method)(A, B, C))
 Create Function instances from member functions. More...
 
template<class Object , class R , class A , class B >
Function< R, A, B > function (Object *obj, R(Object::*method)(A, B))
 Create Function instances from member functions. More...
 
template<class Object , class R , class A >
Function< R, A > function (Object *obj, R(Object::*method)(A))
 create Function instances from member function More...
 
template<class Object , class R >
Function< R > function (Object *obj, R(Object::*method)())
 create Function instances from member function More...
 
template<class Object , class R , class A , class B , class C >
Function< R, A, B, C > function (const Object *obj, R(Object::*method)(A, B, C) const)
 Create Function instances from const member functions. More...
 
template<class Object , class R , class A , class B >
Function< R, A, B > function (const Object *obj, R(Object::*method)(A, B) const)
 Create Function instances from const member functions. More...
 
template<class Object , class R , class A >
Function< R, A > function (const Object *obj, R(Object::*method)(A) const)
 create Function instances from const member function More...
 
template<class Object , class R >
Function< R > function (const Object *obj, R(Object::*method)() const)
 create Function instances from const member function More...
 
template<class Object , class R , class A , class B , class C >
Function< R, A, B, C > function (Object &obj, SelectFunctor< R, A, B, C >)
 create Function instances from given object-functor More...
 
template<class Object , class R , class A , class B , class C >
Function< R, A, B > function (const Object &obj, SelectFunctor< R, A, B, C >)
 create Function instances from given object-functor (const version) More...
 
template<class Object >
Function function (Object &obj)
 shortcut create Function to wrap an objects parameter-less function operator More...
 
template<class Object >
Function function (const Object &obj)
 shortcut create Function to wrap a const objects parameter-less function operator More...
 
template<class Object , class R , class A , class B , class C >
Function< R, A, B, C > function (Object *obj, SelectFunctor< R, A, B, C > selector)
 create Function instances from given object-functor More...
 
template<class Object , class R , class A , class B , class C >
Function< R, A, B, C > function (const Object *obj, SelectFunctor< R, A, B, C > selector)
 create Function instances from given object-functor (const version) More...
 
template<class R , class A , class B , class C >
Function< R, A, B, C > function (R(*global_function)(A a, B b, C c))
 Function creator function from given binary global function. More...
 
template<class R , class A , class B >
Function< R, A, B > function (R(*global_function)(A a, B b))
 Function creator function from given binary global function. More...
 
template<class R , class A >
Function< R, A > function (R(*global_function)(A a))
 Function creator function from given unary global function. More...
 
template<class R >
Function< R > function (R(*global_function)())
 Function creator function from given parameter less global function. More...
 
template<class T >
static T sqr (const T &x)
 square template (faster than pow(x,2) More...
 
template<class T , unsigned int N>
static T power (const T &x)
 power template More...
 
ICLUtils_API std::ostream & operator<< (std::ostream &s, const Point &p)
 ostream operator (x,y) More...
 
ICLUtils_API std::istream & operator>> (std::istream &s, Point &p)
 istream operator More...
 
ICLUtils_API std::ostream & operator<< (std::ostream &s, const Point32f &p)
 ostream operator (x,y) More...
 
ICLUtils_API std::istream & operator>> (std::istream &s, Point32f &p)
 istream operator More...
 
ICLUtils_API std::ostream & operator<< (std::ostream &s, const ProcessMonitor::Info &info)
 overloaded ostream operator for the ProcessMonitor's Info data type More...
 
std::ostream & operator<< (std::ostream &s, const ProgArg &pa)
 just puts the referenced argument value as string into the lvalue-stream More...
 
bool operator&& (const ProgArg &a, const ProgArg &b)
 this allows to check if two progargs are defined More...
 
bool operator&& (const ProgArg &a, bool b)
 allows to check more than two ProgArg instances at once More...
 
bool operator&& (bool &b, const ProgArg &a)
 allows to check more than two ProgArg instances at once More...
 
bool operator|| (const ProgArg &a, const ProgArg &b)
 this allows to check if either of two progargs are defined More...
 
bool operator|| (const ProgArg &a, bool b)
 allows to check if either of more than two ProgArg instances is defined More...
 
bool operator|| (bool &b, const ProgArg &a)
 allows to check if either of more than two ProgArg instances is defined More...
 
const ProgArg pa (const std::string &id, unsigned int subargidx=0) throw (ProgArgException)
 returns given program argument More...
 
const ProgArg pa (unsigned int idx, bool danglingOnly=true)
 returns given program argument at given index More...
 
template<class T >
const T pa_def (const std::string &id, unsigned int subargidx, const T &def) throw (ProgArgException)
 utility function that allows to use a default value, if given argument was not defined More...
 
template<class T >
const T pa_def (const std::string &id, const T &def) throw (ProgArgException)
 utility function that allows to use a default value, if given argument was not defined More...
 
ICLUtils_API unsigned int pa_get_count (bool danglingOnly=true)
 returns number of actually given args given More...
 
ICLUtils_API const std::string & pa_get_progname (bool fullpath=false)
 returns application name (full command line) More...
 
ICLUtils_API void pa_show_usage (const std::string &msg="")
 shows current available programm arguments More...
 
PAEX pa_explain (const std::string &pa, const std::string &ex)
 This function can be used to provide additional information for certain program arguments. More...
 
ICLUtils_API void pa_init (int n, char **ppc, const std::string &init, bool allowDanglingArgs=false)
 initialization function for ICL's program argument evaluation framework More...
 
ICLUtils_API void pa_show ()
 shows all given program arguments More...
 
ICLUtils_API void pa_set_license (const std::string &newLicenseText)
 Sets a license text, that is used when applications are run with –version or -v. More...
 
ICLUtils_API void pa_set_help_text (const std::string &newHelpText)
 Sets a applications help text that is used when applications are run with –help or with unknown arguments. More...
 
ICLUtils_API std::string pa_get_license ()
 returns the current license text More...
 
ICLUtils_API std::string pa_get_help_text ()
 returns the current help text (which is empty, if it was not set) More...
 
void randomSeed (long int seedval)
 Initilaize the random number generator. More...
 
void randomSeed ()
 Initilaize the random number generator (with Time::now().toMicroSeconds()). More...
 
double random (double max=1)
 Generates random numbers in range [0,1]. More...
 
double random (double min, double max)
 Generate a random number in range [min,max]. More...
 
template<class T >
double random (const Range< T > &r)
 equivalent to random (r.minVal,r.maxVal) More...
 
unsigned int random (unsigned int max)
 Creates a non-negative random number in range [0,max]. More...
 
ICLUtils_API double gaussRandom (double mean, double var)
 Generate a gaussian random number with given mean and variance. More...
 
double gaussRandom (double mean, double var, const Range< double > &range)
 Generate a gaussian random number with given mean and variance and clips the result to a range. More...
 
std::vector< int > get_random_index_subset (int containerSize, int subsetSize) throw (ICLException)
 
template<class T >
std::vector< T > get_random_subset (const std::vector< T > &s, int subsetSize) throw (ICLException)
 
template<class T >
void get_random_subset (const std::vector< T > &s, int subsetSize, std::vector< T > &subset) throw (ICLException)
 
template<class T >
void get_random_subset (const std::vector< T > &s, int subsetSize, std::vector< T > &subset, std::vector< int > &indices) throw (ICLException)
 
template<class T >
ICL_INSTANTIATE_ALL_DEPTHS ICLUtils_API std::ostream & operator<< (std::ostream &s, const Range< T > &range)
 puts a string representation [min,max] of given range into the given stream More...
 
template<class T >
ICLUtils_API std::istream & operator>> (std::istream &s, Range< T > &range)
 parses a range argument into a std::string More...
 
ICLUtils_API std::ostream & operator<< (std::ostream &s, const Rect &r)
 ostream operator (x,y)wxy More...
 
ICLUtils_API std::istream & operator>> (std::istream &s, Rect &r)
 istream operator More...
 
ICLUtils_API std::ostream & operator<< (std::ostream &s, const Rect32f &r)
 ostream operator (x,y)wxy More...
 
ICLUtils_API std::istream & operator>> (std::istream &s, Rect32f &r)
 istream operator More...
 
ICLUtils_API std::ostream & operator<< (std::ostream &os, const Size &s)
 ostream operator WIDTHxHEIGHT More...
 
ICLUtils_API std::istream & operator>> (std::istream &is, Size &s)
 istream operator parses a size from a string More...
 
ICLUtils_API std::ostream & operator<< (std::ostream &os, const Size32f &s)
 ostream operator WIDTHxHEIGHT More...
 
ICLUtils_API std::istream & operator>> (std::istream &is, Size32f &s)
 istream operator More...
 
template<class T >
ICLUtils_API std::ostream & operator<< (std::ostream &s, const SteppingRange< T > &range)
 puts a string representation [min,max]:step of given range into the given stream More...
 
template<class T >
ICLUtils_API std::istream & operator>> (std::istream &s, SteppingRange< T > &range)
 parses a range argument into a std::string More...
 
template<class T >
std::ostream & icl_to_stream (std::ostream &s, T t)
 compatibility function that writes a datatype instance into a stream More...
 
template<class T >
std::istream & icl_from_stream (std::istream &s, T &t)
 compability function that reads a datatype instance from a stream More...
 
ICLUtils_API std::string & toLowerI (std::string &s)
 inplace lower case conversion More...
 
ICLUtils_API std::string & toUpperI (std::string &s)
 inplace upper case conversion More...
 
ICLUtils_API std::string toLower (const std::string &s)
 lower case conversion More...
 
ICLUtils_API std::string toUpper (const std::string &s)
 upper case conversion More...
 
ICLUtils_API std::vector< std::string > tok (const std::string &s, const std::string &delims=" ", bool singleCharDelims=true, char escapeChar='\0')
 tokenizes a string with given delimiters (internally using a temporary StrTok instance) More...
 
ICLUtils_API std::vector< std::string > & tok (const std::string &s, const std::string &delim, std::vector< std::string > &dst, bool singleCharDelims=true, char escapeChar='\0')
 tokenize a string with given delimiters into a result vector (optimized) More...
 
ICLUtils_API std::string cat (const std::vector< std::string > &v)
 concatinates at string-vector to a single string More...
 
ICLUtils_API std::string toStr (int i, const char *format, char *buf=0)
 creates a string from a given integer More...
 
ICLUtils_API std::string toStr (double d, const char *format, char *buf=0)
 creates a string from a given double/float More...
 
ICLUtils_API std::string toStr (int i, char *buf=0)
 create a string from given integer using format string "%d" More...
 
ICLUtils_API std::string toStr (double d, char *buf=0)
 create a string from given float using format string "%f" More...
 
template<class T >
std::string str (const T &t)
 convert a data type into a string using an std::ostringstream instance More...
 
template<>
std::string str (const icl8u &t)
 specialized for icl8u More...
 
template<>
std::string str (const bool &b)
 specialized for bool More...
 
template<>
std::string str (const std::string &s)
 specialized for std::string input (this is quiet silly) More...
 
template<>
std::string str (char *const &pc)
 specialized for char const pointers More...
 
template<>
std::string str (const char *const &pc)
 specialized for const char const pointers More...
 
template<class T >
std::string cat (const std::vector< T > &v, const std::string &delim=",")
 creates a delim-separated string of str'ed values of given vector More...
 
template<class T >
parse (const std::string &s)
 parses a string into template parameter (defined for iclXX and std::string) More...
 
template<>
const char * parse (const std::string &s)
 
ICLUtils_API icl8u to8u (const std::string &s)
 cast a string to an icl8u (parse) More...
 
ICLUtils_API icl16s to16s (const std::string &s)
 cast a string to an icl16s (parse) More...
 
ICLUtils_API icl32s to32s (const std::string &s)
 cast a string to an icl32ss (parse) More...
 
ICLUtils_API icl32f to32f (const std::string &s)
 cast a string to an icl32f (parse) More...
 
ICLUtils_API icl64f to64f (const std::string &s)
 cast a string to an icl64f (parse) More...
 
template<class T >
std::vector< T > parseVec (const std::vector< std::string > &v)
 parse a vector of strings into a vector of T's More...
 
template<class T >
std::vector< T > parseVecStr (const std::string &vecStr, const std::string &delims=",")
 parse a delims seperated string into a vector of T's More...
 
template<class T >
std::vector< std::string > strVec (const std::vector< T > &v)
 convert a vector of T's into a vector of strings More...
 
ICLUtils_API MatchResult match (const std::string &text, const std::string &regex, int numSubMatches=0) throw (InvalidRegularExpressionException)
 Applies a regular expression match on given text and regex pattern (internally using regex.h) More...
 
ICLUtils_API std::string time2str (Time::value_type x)
 converts a Time::value_type (long int) into a string More...
 
ICLUtils_API std::string skipWhitespaces (const std::string &s)
 crops trailing whitespaces of a string More...
 
ICLUtils_API bool endsWith (const std::string &s, const std::string &suffix)
 returns whether a given string ends with a given suffix More...
 
ICLUtils_API bool startsWith (const std::string &s, const std::string &prefix)
 returns whether a given string begins with a given prefix More...
 
ICLUtils_API void analyseHashes (const std::string &sFileName, unsigned int &nHashes, std::string::size_type &iPostfixPos)
 analyses a file pattern with hash-characters More...
 
std::ostream & operator<< (std::ostream &stream, const TextTable &t)
 overloaded ostream-operator that uses the TextTable's toString method for serialization More...
 
template<class T >
static void saveDelete (T *&pointer)
 static utility function which deletes a pointer and sets it to NULL More...
 
template<class T , void(T::*)() func>
static void saveCall (T *obj)
 static utility function which ensures Thread-safety for object functions More...
 
ICLUtils_API std::ostream & operator<< (std::ostream &, const Time &)
 writes Time instances value type into the stream More...
 
ICLUtils_API std::istream & operator>> (std::istream &, Time &)
 reads Time instances value type from the stream More...
 
std::ostream & operator<< (std::ostream &stream, const VisualizationDescription::Text &t)
 
std::istream & operator>> (std::istream &stream, VisualizationDescription::Text &t)
 
std::ostream & operator<< (std::ostream &stream, const VisualizationDescription::Color &c)
 overloaded ostream operator for VisualizationDescription::Color More...
 
std::istream & operator>> (std::istream &stream, VisualizationDescription::Color &c)
 overloaded istream operator for VisualizationDescription::Color More...
 

Function Documentation

ICLUtils_API void icl::utils::analyseHashes ( const std::string &  sFileName,
unsigned int &  nHashes,
std::string::size_type &  iPostfixPos 
)

analyses a file pattern with hash-characters

This function is e.g. used by the FilennameGenerator to extract a patterns hash count e.g. the pattern "image_###.ppm" shall be used to generate filenames like "image_000.ppm", "image_001.ppm" and so on. This function returns the count of found hashes and the position in the string where the suffix begins. E.g. if the pattern is "image_##.ppm.gz", the hash-count is 2 and the suffix-pos becomes 8.

template<class S , class D >
D icl::utils::clipped_cast ( src)
inline

utility cast function wrapping the standard lib's numerical_limits template

ICLUtils_API bool icl::utils::endsWith ( const std::string &  s,
const std::string &  suffix 
)

returns whether a given string ends with a given suffix

std::vector<int> icl::utils::get_random_index_subset ( int  containerSize,
int  subsetSize 
)
throw (ICLException
)
inline
template<class T >
std::vector<T> icl::utils::get_random_subset ( const std::vector< T > &  s,
int  subsetSize 
)
throw (ICLException
)
inline
template<class T >
void icl::utils::get_random_subset ( const std::vector< T > &  s,
int  subsetSize,
std::vector< T > &  subset 
)
throw (ICLException
)
inline
template<class T >
void icl::utils::get_random_subset ( const std::vector< T > &  s,
int  subsetSize,
std::vector< T > &  subset,
std::vector< int > &  indices 
)
throw (ICLException
)
inline
template<class T >
bool icl::utils::is_float_type ( )
inline
template<class T >
ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  s,
const SteppingRange< T > &  range 
)

puts a string representation [min,max]:step of given range into the given stream

Available for all icl-Types (icl8u,icl16s, icl32s, icl32f and icl64f and for unsigned int

ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  os,
const Size32f s 
)

ostream operator WIDTHxHEIGHT

ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  s,
const ProcessMonitor::Info info 
)

overloaded ostream operator for the ProcessMonitor's Info data type

ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  s,
const Point p 
)

ostream operator (x,y)

template<class T >
ICL_INSTANTIATE_ALL_DEPTHS ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  s,
const Range< T > &  range 
)

puts a string representation [min,max] of given range into the given stream

Available for all icl-Types (icl8u,icl16s, icl32s, icl32f and icl64f and for unsigned int

ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  s,
const Point32f p 
)

ostream operator (x,y)

std::ostream& icl::utils::operator<< ( std::ostream &  s,
const ProgArg pa 
)
inline

just puts the referenced argument value as string into the lvalue-stream

std::ostream& icl::utils::operator<< ( std::ostream &  stream,
const TextTable t 
)
inline

overloaded ostream-operator that uses the TextTable's toString method for serialization

ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  os,
const Size s 
)

ostream operator WIDTHxHEIGHT

ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  s,
const Rect32f r 
)

ostream operator (x,y)wxy

ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  ,
const Time  
)

writes Time instances value type into the stream

std::ostream& icl::utils::operator<< ( std::ostream &  stream,
const VisualizationDescription::Text t 
)
inline

overloaded ostream operator for VisualizationDescription::Text syntax: (x,y)text

std::ostream& icl::utils::operator<< ( std::ostream &  stream,
const VisualizationDescription::Color c 
)
inline

overloaded ostream operator for VisualizationDescription::Color

ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  s,
const Rect r 
)

ostream operator (x,y)wxy

ICLUtils_API std::ostream& icl::utils::operator<< ( std::ostream &  s,
const ConfigFile cf 
)

Default ostream operator to put a ConfigFile into a stream.

ostream operator is allowed to access privat members

template<class T >
ICLUtils_API std::istream& icl::utils::operator>> ( std::istream &  s,
SteppingRange< T > &  range 
)

parses a range argument into a std::string

ICLUtils_API std::istream& icl::utils::operator>> ( std::istream &  is,
Size32f s 
)

istream operator

ICLUtils_API std::istream& icl::utils::operator>> ( std::istream &  s,
Point p 
)

istream operator

ICLUtils_API std::istream& icl::utils::operator>> ( std::istream &  s,
Point32f p 
)

istream operator

template<class T >
ICLUtils_API std::istream& icl::utils::operator>> ( std::istream &  s,
Range< T > &  range 
)

parses a range argument into a std::string

ICLUtils_API std::istream& icl::utils::operator>> ( std::istream &  is,
Size s 
)

istream operator parses a size from a string

also called in Size::Size(const std::string&)

ICLUtils_API std::istream& icl::utils::operator>> ( std::istream &  s,
Rect32f r 
)

istream operator

ICLUtils_API std::istream& icl::utils::operator>> ( std::istream &  ,
Time  
)

reads Time instances value type from the stream

std::istream& icl::utils::operator>> ( std::istream &  stream,
VisualizationDescription::Text t 
)
inline

overloaded istream operator for VisualizationDescription::Text syntax: (x,y)text (text must be single lined)

std::istream& icl::utils::operator>> ( std::istream &  stream,
VisualizationDescription::Color c 
)
inline

overloaded istream operator for VisualizationDescription::Color

ICLUtils_API std::istream& icl::utils::operator>> ( std::istream &  s,
Rect r 
)

istream operator

ICLUtils_API const std::string& icl::utils::pa_get_progname ( bool  fullpath = false)

returns application name (full command line)

Parameters
fullpathif this is set to true, the complete first argument of main is returned, which may be something like /usr/bin/icl-create. If fullpath is false, which is default, just the program name is returned.
See also
icl::utils::pa(const std::string&,unsigned int)
template<>
const char* icl::utils::parse ( const std::string &  s)
inline
template<class T , unsigned int N>
static T icl::utils::power ( const T &  x)
inlinestatic

power template

ICLUtils_API void icl::utils::progress ( int  curr,
int  max,
const std::string &  extraText = "" 
)

static utility function for displaying some progress information in console

Extra text is show behind the progress bar

ICLUtils_API void icl::utils::progress_finish ( )

static utility function for displaying some progress information in console

ICLUtils_API void icl::utils::progress_init ( const std::string &  text = "Creating LUT")

static utility function for displaying some progress information in console

template<class T >
double icl::utils::random ( const Range< T > &  r)
inline

equivalent to random (r.minVal,r.maxVal)

ICLUtils_API std::string icl::utils::skipWhitespaces ( const std::string &  s)

crops trailing whitespaces of a string

template<class T >
static T icl::utils::sqr ( const T &  x)
inlinestatic

square template (faster than pow(x,2)

ICLUtils_API bool icl::utils::startsWith ( const std::string &  s,
const std::string &  prefix 
)

returns whether a given string begins with a given prefix

template<>
std::string icl::utils::str ( const icl8u t)
inline

specialized for icl8u

template<>
std::string icl::utils::str ( const bool &  b)
inline

specialized for bool

template<>
std::string icl::utils::str ( const std::string &  s)
inline

specialized for std::string input (this is quiet silly)

template<>
std::string icl::utils::str ( char *const &  pc)
inline

specialized for char const pointers

template<>
std::string icl::utils::str ( const char *const &  pc)
inline

specialized for const char const pointers

ICLUtils_API std::string icl::utils::time2str ( Time::value_type  x)

converts a Time::value_type (long int) into a string