3#include "../../_cexports/c_barcode.h"
4#include "grader_config_base.hpp"
52 reflectanceMin_ = reflectanceMin;
63 return reflectanceMin_;
76 edgeContrastMin_ = edgeContrastMin;
87 return edgeContrastMin_;
124 decodability_ = decodability;
135 return decodability_;
140 SmartBool reflectanceMin_;
141 SmartBool edgeContrastMin_;
143 SmartBool decodability_;
158 isActiveOut = pConfig->ReadFromHandle(guard);
163 virtual bool ReadFromHandle_(
const HandleGuard<ReaderConfig>& guard)
override
166 CExports::cvbbool_t active;
167 CVB_CALL_CAPI(CvcBcGetCodeGrading1DEx(
reinterpret_cast<std::intptr_t>(guard.Handle()),
172 reflectanceMin_.Ptr(),
173 symbolContrast_.Ptr(),
174 edgeContrastMin_.Ptr(),
177 decodability_.Ptr()));
180 return SmartBool(active);
183 virtual void WriteToHandle_(
bool active, HandleGuard<ReaderConfig>& guard)
override
185 Internal::DoResCall([&]()
187 return CVB_CALL_CAPI(CvcBcSetCodeGrading1DEx(
reinterpret_cast<intptr_t
>(guard.Handle()),
189 static_cast<short>(reflectanceReference_.
Min()),
static_cast<short>(reflectanceReference_.
Max()),
Configuration to access parameters of barcode grading.
Definition: barcode_grading.hpp:17
bool GradeReflectanceMin() const
Returns whether or not the grade GradeResult1D::ReflectanceMin will enter the calculation of GradeRes...
Definition: barcode_grading.hpp:61
bool GradeDecode() const
Returns whether or not the grade decodes will enter the calculation of GradeResult1D::GradeOverall.
Definition: barcode_grading.hpp:38
void SetGradeDefects(bool defects)
Specifies whether or not the grade GradeResult1D::Defects will enter the calculation of GradeResult1D...
Definition: barcode_grading.hpp:97
void SetGradeDecodability(bool decodability)
Specifies whether or not the grade GradeResult1D::Decodability will enter the calculation of GradeRes...
Definition: barcode_grading.hpp:121
void SetGradeReflectanceMin(bool reflectanceMin)
Specifies whether or not the grade GradeResult1D::ReflectanceMin will enter the calculation of GradeR...
Definition: barcode_grading.hpp:49
static std::unique_ptr< BarcodeGrading > FromHandle(const HandleGuard< ReaderConfig > &guard, bool &isActiveOut)
Create object from handle.
Definition: barcode_grading.hpp:155
bool GradeDefects() const
Returns whether or not the grade GradeResult1D::Defects will enter the calculation of GradeResult1D::...
Definition: barcode_grading.hpp:109
void SetGradeEdgeContrastMin(bool edgeContrastMin)
Specifies whether or not the grade GradeResult1D::EdgeContrastMin will enter the calculation of Grade...
Definition: barcode_grading.hpp:73
bool GradeDecodability() const
Returns whether or not the grade GradeResult1D::Decodability will enter the calculation of GradeResul...
Definition: barcode_grading.hpp:133
void SetGradeDecode(bool decode)
Specifies whether or not the grade decodes will enter the calculation of GradeResult1D::GradeOverall.
Definition: barcode_grading.hpp:26
bool GradeEdgeContrastMin() const
Returns whether or not the grade GradeResult1D::EdgeContrastMin will enter the calculation of GradeRe...
Definition: barcode_grading.hpp:85
Configuration to access parameters of GraderConfigBase.
Definition: grader_config_base.hpp:20
T Min() const noexcept
Gets the minimum value.
Definition: value_range.hpp:50
T Max() const noexcept
Gets the maximum value.
Definition: value_range.hpp:72
Symbology
The symbologies supported by Barcode.
Definition: barcode.hpp:97
@ BarcodeGrading
1D Barcode grading
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24