CVB++ 14.0
read_result_sony_code.hpp
1#pragma once
2
3#include "read_result_1d.hpp"
4
5
6namespace Cvb
7{
8 CVB_BEGIN_INLINE_NS
9
10 namespace Barcode
11 {
13
17 : public ReadResult1D
18 {
19 public:
21
24 ReadResultSonyCode(CExports::CVC_BC_INFO& handle)
25 : ReadResult1D(handle)
26 {
27
28 }
29
31
35 int Contrast() const
36 {
37 return static_cast<int>(handle_.contrast);
38 }
39
41
45 int ProductId() const
46 {
47 return static_cast<int>(handle_.fnc2);
48 }
49
50
52
56 double RadiusCode() const
57 {
58 if (handle_.full_ascii == 0)
59 return -1.0;
60 else
61 return static_cast<double>(handle_.fnc1) / 10.0;
62 }
63
64 };
65
66 using ReadResultSonyCodePtr = std::shared_ptr<ReadResultSonyCode>;
67 }
68
69 CVB_END_INLINE_NS
70}
Derived from ReadResult and gives specific access to 1D results.
Definition: read_result_1d.hpp:20
Derived from ReadResult1D and gives specific access to SonyCode results.
Definition: read_result_sony_code.hpp:18
int ProductId() const
Product id.
Definition: read_result_sony_code.hpp:45
int Contrast() const
The contrast element contains the minimal contrast in the code.
Definition: read_result_sony_code.hpp:35
double RadiusCode() const
Radius code in mm (-1.0 if the radius code has not been calculated).
Definition: read_result_sony_code.hpp:56
ReadResultSonyCode(CExports::CVC_BC_INFO &handle)
Constructor to initialize object from info struct.
Definition: read_result_sony_code.hpp:24
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24