CVB++ 14.0
grader_config_base.hpp
1#pragma once
2
3#include "config_base.hpp"
4#include "../../value_range.hpp"
5
6namespace Cvb
7{
8 CVB_BEGIN_INLINE_NS
9
10 namespace Barcode
11 {
12 using namespace Internal;
13
14 namespace Config
15 {
17
19 class GraderConfigBase : public ConfigBase
20 {
21 public:
22
24
29 void SetGradeModulation(bool modulation)
30 {
31 SetDirty();
32 modulation_ = modulation;
33 };
34
36
41 bool GradeModulation() const
42 {
43 return modulation_;
44 };
45
47
52 void SetGradeSymbolContrast(bool symbolContrast)
53 {
54 SetDirty();
55 symbolContrast_ = symbolContrast;
56 };
57
59
65 {
66 return symbolContrast_;
67 };
68
69
71
77 {
78 if (reflectanceReference_ != reflectanceReference)
79 SetDirty();
80 reflectanceReference_ = reflectanceReference;
81 };
82
84
90 {
91 return reflectanceReference_;
92 };
93
94 protected:
95 SmartBool modulation_;
96 SmartBool symbolContrast_;
97 Cvb::ValueRange<int> reflectanceReference_;
98
99 protected:
100 virtual bool ReadFromHandle_(const HandleGuard<ReaderConfig>& guard) = 0;
101 virtual void WriteToHandle_(bool active, HandleGuard<ReaderConfig>& guard) = 0;
102
104 : ConfigBase()
105 {
106 }
107
108
109
110 };
111 }
112
113 using GraderConfigBase = Config::GraderConfigBase;
114 using GraderConfigBasePtr = std::shared_ptr<GraderConfigBase>;
115 }
116
117 CVB_END_INLINE_NS
118}
Configuration to access parameters of GraderConfigBase.
Definition: grader_config_base.hpp:20
void SetReflectanceReference(Cvb::ValueRange< int > reflectanceReference)
Reflectance Reference Range for contrast calculation.
Definition: grader_config_base.hpp:76
void SetGradeSymbolContrast(bool symbolContrast)
Activates (true) or deactivates (false) the calculation of the symbol contrast grade.
Definition: grader_config_base.hpp:52
bool GradeSymbolContrast() const
Activates (true) or deactivates (false) the calculation of the symbol contrast grade.
Definition: grader_config_base.hpp:64
Cvb::ValueRange< int > ReflectanceReference() const
Reflectance Reference Range for contrast calculation.
Definition: grader_config_base.hpp:89
void SetGradeModulation(bool modulation)
Activates (true) or deactivates (false) the calculation of the modulation grade.
Definition: grader_config_base.hpp:29
bool GradeModulation() const
Activates (true) or deactivates (false) the calculation of the modulation grade.
Definition: grader_config_base.hpp:41
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24