Contains a map of configurations for all active barcode types. More...
#include <cvb/barcode/reader_config.hpp>
Public Member Functions | |
void * | Handle () const noexcept |
Returns C-API style handle to the reader config. More... | |
void | Save (Cvb::String fileName) |
Writes the data of the configuration to file. More... | |
void | Flush () |
Write all parameters to the handle. More... | |
template<typename TConfig > | |
std::shared_ptr< TConfig > | Configuration () |
Returns an existing configuration in the object. More... | |
template<typename TConfig > | |
std::shared_ptr< TConfig > | CreateConfiguration () |
Creates a new configuration for the object. More... | |
template<typename TConfig > | |
void | RemoveConfiguration () |
Removes a configuration from map. More... | |
void | SetReadoutMode (Readout readoutMode) |
Set the the readout mode. More... | |
Readout | ReadoutMode () const noexcept |
Access the readout mode. More... | |
void | SetReadoutStripeDistance (int range) |
Set the distance between lines in pixel. More... | |
int | ReadoutStripeDistance () const noexcept |
Get the distance between lines in pixel. More... | |
void | SetOmniDirectionalReadoutAngleCount (int numAngle) |
Set the absolute number of profile rotations. More... | |
int | OmniDirectionalReadoutAngleCount () const noexcept |
Set the absolute number of profile rotations. More... | |
void | SetOmniDirectionalReadoutStripeCount (int numStripe) |
Set the absolute number of profile lines. More... | |
int | OmniDirectionalReadoutStripeCount () const noexcept |
Get the absolute number of profile lines. More... | |
void | SetCheckCodePosition (bool checkPosition) |
This function sets the parameter for the Code Position Check. More... | |
bool | CheckCodePosition () const noexcept |
This function returns the parameter for the Code Position Check. More... | |
void | SetTimeLimit (int timeLimit) |
This function sets the maximum evaluation time for the decoding of a barcode. More... | |
int | TimeLimit () const noexcept |
This function returns the maximum evaluation time for the decoding of a barcode. More... | |
bool | ContainsSymbology (Symbology symbology) const |
Check if the object contains the given symbology. More... | |
Static Public Member Functions | |
static std::unique_ptr< ReaderConfig > | FromHandle (HandleGuard< ReaderConfig > &&guard) |
Creates reader config from a classic API handle. More... | |
static std::unique_ptr< ReaderConfig > | Load (const Cvb::String &fileName) |
Reads the configuration data from file. More... | |
Contains a map of configurations for all active barcode types.
Use this object to initialize configurations.
|
inlinenoexcept |
This function returns the parameter for the Code Position Check.
An edge can have its coordinates outside the image borders in case the barcode is incomplete
Any | exception derived from std::exception including CvbException. |
|
inline |
Returns an existing configuration in the object.
The template needs to be a barcode configuration inherited from Barcode::Config::ConfigBase.
Any | exception derived from std::exception including CvbException. |
|
inline |
Check if the object contains the given symbology.
[in] | symbology | Symbology to check if it is available. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Creates a new configuration for the object.
The template needs to be a barcode configuration inherited from Barcode::Config::ConfigBase. In case the requested configuration already exists, this configuration is returned. Otherwise creates a new configuration, adds it to the map and returns it.
Any | exception derived from std::exception including CvbException. |
|
inline |
Write all parameters to the handle.
Any | exception derived from std::exception including CvbException. |
|
inlinestatic |
Creates reader config from a classic API handle.
The ReaderConfig takes ownership of the handle, so you must share it before using this function.
[in] | guard | Life time guard for C-API handle. |
Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
|
inlinestatic |
Reads the configuration data from file.
[in] | fileName | Name of the file, possibly with path specification. |
Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
Set the absolute number of profile rotations.
Number of readout angles (only used in omni directional readout mode).
Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
Get the absolute number of profile lines.
Number of readout stripes (only used in omni directional readout mode).
Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
Access the readout mode.
Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
Get the distance between lines in pixel.
The Readout definition for the readout modes Ladder, Fence and FenceOrLadder.
Any | exception derived from std::exception including CvbException. |
|
inline |
Removes a configuration from map.
The template needs to be a barcode configuration inherited from Barcode::Config::ConfigBase.
Any | exception derived from std::exception including CvbException. |
|
inline |
Writes the data of the configuration to file.
The data is stored in an ASCII format which is based on the format of the Windows INI files. If necessary, it can be edited using a simple ASCII editor.
[in] | fileName | Name of the file, possibly with path specification. |
Any | exception derived from std::exception including CvbException. |
|
inline |
This function sets the parameter for the Code Position Check.
An edge can have its coordinates outside the image borders in case the barcode is incomplete
[in] | checkPosition | Evaluate / don't evaluate evaluate code position check. The parameter checkPosition enables and disables the code position check configuration config. Specifying TRUE enables and FALSE disables the code position check. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Set the absolute number of profile rotations.
Number of readout angles (only used in omni directional readout mode).
[in] | numAngle | Absolute number of profile rotations. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Set the absolute number of profile lines.
Number of readout stripes (only used in omni directional readout mode).
[in] | numStripe | Absolute number of profile lines. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Set the the readout mode.
[in] | readoutMode | Modifies the readout mode |
Any | exception derived from std::exception including CvbException. |
|
inline |
Set the distance between lines in pixel.
The Readout definition for the readout modes Ladder, Fence and FenceOrLadder.
[in] | range | Distance between lines in pixel. |
Any | exception derived from std::exception including CvbException. |
|
inline |
This function sets the maximum evaluation time for the decoding of a barcode.
It sets the maximum time which may be required for evaluation when using the configuration config. When the configuration cannot be concluded in this time, the function Reader::Decode throws an exception even if the code is present in the image. For time measurement, Barcode uses the function clock() from the standard C library. On PC systems this generally has temporary resolution of approximately 55 ms. There is therefore no point specifying values less than 55 ms. On high performance PC systems, the evaluation time is generally below 50 ms. Thus this function is only of use in connection with slow systems. The actual decoding time may deviate from the specified time by plus/minus 55 ms. When configuration is generated, the value of 1000 milliseconds is entered as the default decoding time. This value should always be achieved on modern PC systems.
[in] | timeLimit | Maximum decoding time in milliseconds. |
Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
This function returns the maximum evaluation time for the decoding of a barcode.
It returns the maximum time which may be required for evaluation when using the configuration config. When the configuration cannot be concluded in this time, the function Reader::Decode throws an exception even if the code is present in the image. For time measurement, Barcode uses the function clock() from the standard C library. On PC systems this generally has temporary resolution of approximately 55 ms. There is therefore no point specifying values less than 55 ms. On high performance PC systems, the evaluation time is generally below 50 ms. Thus this function is only of use in connection with slow systems. The actual decoding time may deviate from the specified time by plus/minus 55 ms. When configuration is generated, the value of 1000 milliseconds is entered as the default decoding time. This value should always be achieved on modern PC systems.
Any | exception derived from std::exception including CvbException. |