Go to the documentation of this file.00001
00046 #ifndef DGVALIASES_H_INCLUDED
00047 #define DGVALIASES_H_INCLUDED
00048
00049 #include <limits>
00050 #include <stdexcept>
00051 #include <blitz/array.h>
00052
00053 #include "DGVGlobal.h"
00054
00055 using namespace blitz;
00056 using namespace std;
00057
00058 #ifndef DEF_IMAGE_TYPE
00059 #define DEF_IMAGE_TYPE 1
00060 typedef double imageType;
00061 #endif
00062
00063
00064
00065
00066
00067
00068 const float version = static_cast<float>(0.3);
00069 const int minWindowSize = 256;
00070 const int maxAASamples = 6;
00071
00072 #ifndef DEF_BADSTR
00073 #define DEF_BADSTR 1
00074
00079 class BadStrConversion : public runtime_error {
00080 public:
00081 BadStrConversion(const string& s)
00082 : runtime_error(s)
00083 { }
00084 };
00085 #endif
00086
00087 #ifndef DEF_NUMTOSTR
00088 #define DEF_NUMTOSTR 1
00089
00093 inline string numToString(double num)
00094 {
00095 ostringstream toString;
00096 if (!(toString << num))
00097 throw BadStrConversion("numToString(double)");
00098 return toString.str();
00099 }
00100 #endif
00101
00102 #endif // DGVALIASES_H_INCLUDED