Enrollment 28.2.0
Loading...
Searching...
No Matches
IrisPosition.h
Go to the documentation of this file.
1
9
10#pragma once
11
13#include "enrollment/Export.h"
14#include <ostream>
15
16namespace inno
17{
21 */
22 enum class IrisPosition : uint8_t
23 {
25 RIGHT_EYE = 1,
27 LEFT_EYE = 2,
28 };
29
36 */
37 static constexpr int IrisPositionToIsoPosition(IrisPosition irisPosition)
38 {
39 switch (irisPosition)
40 {
42 return 1;
44 return 2;
45 }
46
47 throw EnrollmentInvalidArgumentException("Invalid conversion from IrisPosition to ISO");
48 }
49
56 */
57 static constexpr IrisPosition IsoToIrisPosition(int irisPosition)
58 {
59 switch (irisPosition)
60 {
61 case 1:
63 case 2:
65 default:
66 break;
67 }
68
69 throw EnrollmentInvalidArgumentException("Invalid conversion from ISO to IrisPosition");
70 }
71
72 inline std::ostream& operator<<(std::ostream& os, IrisPosition irisPosition)
73 {
74 switch (irisPosition)
75 {
77 os << "RIGHT_EYE";
78 break;
80 os << "LEFT_EYE";
81 break;
82 }
83 return os;
84 }
85} // namespace inno
Base exception for all enrollment-sdk invalid argument exceptions.
Definition EnrollmentException.h:96
IrisPosition
It is position of iris on face iso_19794-6_2011.
Definition IrisPosition.h:22
static constexpr IrisPosition IsoToIrisPosition(int irisPosition)
Function converts ISO position to IrisPosition.
Definition IrisPosition.h:56
static constexpr int IrisPositionToIsoPosition(IrisPosition irisPosition)
Function converts IrisPosition to ISO position.
Definition IrisPosition.h:36
@ RIGHT_EYE
Iris of right eye.
Definition IrisPosition.h:24
@ LEFT_EYE
Iris of left eye.
Definition IrisPosition.h:26