83 Calibration(
const std::string& name,
const std::string& confile =
"calibration.xml",
size_t reserv = 50 );
102 long getValue(
const long raw,
bool crop_raw =
false );
133 long getRawValue(
const long cal,
bool range =
false )
const;
162 void build(
const std::string& name,
const std::string& confile, xmlNode* node = 0 );
172 void setCacheSize(
size_t sz );
174 inline size_t getCacheSize()
const
179 void setCacheResortCycle(
size_t n );
180 inline size_t getCacheResotrCycle() const noexcept
182 return numCacheResort;
186 friend std::ostream& operator<<(std::ostream& os, Calibration& c );
187 friend std::ostream& operator<<(std::ostream& os, Calibration* c );
201 inline bool operator < (
const Point& p )
const
231 inline bool operator < (
const Part& p )
const noexcept
236 inline Point leftPoint()
const noexcept
240 inline Point rightPoint()
const noexcept
272 typedef std::vector<Part> PartsVec;
274 inline std::string getName()
281 long minRaw, maxRaw, minVal, maxVal, rightVal, leftVal, rightRaw, leftRaw;
283 void insertToCache(
const long raw,
const long val );
293 CacheInfo() noexcept: val(0), raw(
outOfRange), cnt(0) {}
294 CacheInfo(
const long r,
const long v )
noexcept: val(v), raw(r), cnt(0) {}
302 inline bool operator<(
const CacheInfo& r )
const noexcept
315 typedef std::deque<CacheInfo> ValueCache;
317 size_t numCacheResort;
318 size_t numCallToCache;
Definition Calibration.h:209
TypeOfValue getK() const noexcept
Definition Calibration.h:244
TypeOfValue calcX(const TypeOfValue &y) const noexcept
Definition Calibration.cc:111
bool checkY(const TypeOfValue &y) const noexcept
Definition Calibration.cc:69
Point p_left
Definition Calibration.h:266
bool check(const Point &p) const noexcept
Definition Calibration.cc:56
TypeOfValue calcY(const TypeOfValue &x) const noexcept
Definition Calibration.cc:105
bool checkX(const TypeOfValue &x) const noexcept
Definition Calibration.cc:61
TypeOfValue getX(const TypeOfValue &y) const noexcept
Definition Calibration.cc:91
Point p_right
Definition Calibration.h:267
TypeOfValue k
Definition Calibration.h:268
TypeOfValue getY(const TypeOfValue &x) const noexcept
Definition Calibration.cc:77
Definition Calibration.h:80
long getRightValue() const noexcept
Definition Calibration.h:121
void build(const std::string &name, const std::string &confile, xmlNode *node=0)
Definition Calibration.cc:163
long getRightRaw() const noexcept
Definition Calibration.h:152
long getMinRaw() const noexcept
Definition Calibration.h:136
long getRawValue(const long cal, bool range=false) const
Definition Calibration.cc:349
long getMaxRaw() const noexcept
Definition Calibration.h:141
long getMaxValue() const noexcept
Definition Calibration.h:110
long getLeftRaw() const noexcept
Definition Calibration.h:147
long getMinValue() const noexcept
Definition Calibration.h:105
long getValue(const long raw, bool crop_raw=false)
Definition Calibration.cc:273
static const TypeOfValue ValueOutOfRange
Definition Calibration.h:91
float TypeOfValue
Definition Calibration.h:88
long tRound(const TypeOfValue &val) const
Definition Calibration.h:167
long getLeftValue() const noexcept
Definition Calibration.h:116
static const long outOfRange
Definition Calibration.h:94
Definition Calibration.h:27
Definition Calibration.h:192