3#include "reader_config_base.hpp"
11 using namespace Internal;
28 if(direction_ != direction)
30 direction_ = direction;
52 if(maxDigits < minDigitsLimit_ || maxDigits > maxDigitsLimit_ || maxDigits < minDigits_)
54 if(maxDigits_ != maxDigits)
56 maxDigits_ =
static_cast<short>(maxDigits);
79 if(minDigits < minDigitsLimit_ || minDigits > maxDigitsLimit_ || minDigits > maxDigits_)
81 if(minDigits_ != minDigits)
83 minDigits_ =
static_cast<short>(minDigits);
105 if(pixelRef < minPixelReferenceLimit_ || pixelRef > maxPixelReferenceLimit_)
107 if(pixelRef_ != pixelRef)
109 pixelRef_ =
static_cast<short>(pixelRef);
131 if(quietzoneWidth < minQuietzoneWidthLimit_ || quietzoneWidth > maxQuietzoneWidthLimit_)
133 if(quietzoneWidth_ != quietzoneWidth)
135 quietzoneWidth_ =
static_cast<short>(quietzoneWidth);
146 return quietzoneWidth_;
157 if(scaleFactor < minScaleFactorLimit_ || scaleFactor > maxScaleFactorLimit_)
159 if(scaleFactor_ != scaleFactor)
161 scaleFactor_ =
static_cast<short>(scaleFactor);
195 if(threshold < 0 || threshold > 100)
197 if(threshold_ != threshold)
199 threshold_ =
static_cast<short>(threshold);
229 short quietzoneWidth_;
235 const short minDigitsLimit_ = 2;
236 const short maxDigitsLimit_ = 16;
238 const short minPixelReferenceLimit_ = 0;
239 const short maxPixelReferenceLimit_ = 1000;
241 const short minQuietzoneWidthLimit_ = 10;
242 const short maxQuietzoneWidthLimit_ = 200;
244 const short minScaleFactorLimit_ = 50;
245 const short maxScaleFactorLimit_ = 200;
264 isActiveOut = pConfig->ReadFromHandle(guard);
269 virtual bool ReadFromHandle_(
const HandleGuard<ReaderConfig>& guard)
override
271 CExports::cvbbool_t active;
273 CVB_CALL_CAPI(CvcBcGetPharmacode(
reinterpret_cast<std::intptr_t>(guard.Handle()),
285 return SmartBool(active);
288 virtual void WriteToHandle_(
bool active, HandleGuard<ReaderConfig>& guard)
override
290 Internal::DoResCall([&]()
292 return CVB_CALL_CAPI(CvcBcSetPharmacode(
reinterpret_cast<std::intptr_t>(guard.Handle()),
294 static_cast<short>(direction_),
Configuration to access parameters of ReaderConfigBase.
Definition: reader_config_base.hpp:20
Configuration to access parameters of PharmaCode.
Definition: pharma_code.hpp:18
void SetMinDigits(int minDigits)
Sets the minimum number of Pharmacode code words.
Definition: pharma_code.hpp:77
void SetDirection(PharmaCodeRunDirection direction)
Sets the run-direction in which the Pharmacode moves in the camera picture.
Definition: pharma_code.hpp:26
void SetPixelReference(int pixelRef)
Sets the illustration measure of the camera in a 10th of a pixel per millimetre.
Definition: pharma_code.hpp:103
static std::unique_ptr< PharmaCode > FromHandle(const HandleGuard< ReaderConfig > &guard, bool &isActiveOut)
Create object from handle.
Definition: pharma_code.hpp:261
int MaxDigits() const
Returns the maximum number of Pharmacode code words.
Definition: pharma_code.hpp:65
int MinDigits() const
Returns the minimum number of Pharmacode code words.
Definition: pharma_code.hpp:92
int ScaleFactor() const
Returns the scale factor of the Pharmacode in %.
Definition: pharma_code.hpp:170
PharmaCodeRunDirection Direction() const
Returns the run-direction in which the Pharmacode moves in the camera picture.
Definition: pharma_code.hpp:39
int PixelReference() const
Returns the illustration measure of the camera in a 10th of a pixel per millimetre.
Definition: pharma_code.hpp:118
int QuietzoneWidth() const
Returns the minimal quiet zone in a 10th of a millimetre.
Definition: pharma_code.hpp:144
void SetQuietzoneWidth(int quietzoneWidth)
Sets the minimal quiet zone in a 10th of a millimetre.
Definition: pharma_code.hpp:129
void SetThreshold(int threshold)
Sets the digitalisation threshold in percent ranging from 0 to 100 (default 10).
Definition: pharma_code.hpp:193
int Threshold() const
Returns the digitalisation threshold in percent ranging from 0 to 100 (default 10).
Definition: pharma_code.hpp:208
void SetScaleFactor(int scaleFactor)
Sets the scale factor of the Pharmacode in percent.
Definition: pharma_code.hpp:155
void SetMaxDigits(int maxDigits)
Sets the maximum number of Pharmacode code words.
Definition: pharma_code.hpp:50
PharmaCodeSkew
Skew of the Pharma Code bars.
Definition: barcode.hpp:345
Symbology
The symbologies supported by Barcode.
Definition: barcode.hpp:97
@ PharmaCode
PharmaCode Barcode.
PharmaCodeRunDirection
Run direction of Pharma Codes.
Definition: barcode.hpp:272
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24