Enrollment 28.2.0
Loading...
Searching...
No Matches
PrintImpression.h
Go to the documentation of this file.
1
9
10#pragma once
12#include "enrollment/Export.h"
13#include <ostream>
14
15namespace inno
16{
80 };
81
82 // The numbers are from ISO standard and are tested in unit tests.
83 // NOLINTBEGIN(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
84
91 */
92 static constexpr int PrintToIsoImpression(PrintImpression printImpression)
93 {
94 switch (printImpression)
95 {
97 return 0;
99 return 1;
101 return 2;
103 return 3;
105 return 4;
107 return 5;
109 return 6;
111 return 7;
113 return 8;
115 return 9;
117 return 10;
119 return 11;
121 return 12;
123 return 13;
125 return 14;
127 return 15;
129 return 24;
131 return 28;
133 return 29;
134 default:
135 break;
136 }
137
138 throw EnrollmentInvalidArgumentException("Invalid conversion from PrintImpression to ISO");
139 }
140
147 */
148 static constexpr PrintImpression IsoToPrintImpression(int isoImpression)
149 {
150 switch (isoImpression)
151 {
152 case 0:
154 case 1:
156 case 2:
158 case 3:
160 case 4:
162 case 5:
164 case 6:
166 case 7:
168 case 8:
170 case 9:
172 case 10:
174 case 11:
176 case 12:
178 case 13:
180 case 14:
182 case 15:
184 case 24:
186 case 28:
188 case 29:
190 default:
191 break;
192 }
193
194 throw EnrollmentInvalidArgumentException("Invalid conversion from ISO to PrintImpression");
195 }
196
197 // NOLINTEND(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
198
199 inline std::ostream& operator<<(std::ostream& os, PrintImpression p)
200 {
201 switch (p)
202 {
204 os << "LIVE_SCAN_PLAIN";
205 break;
207 os << "LIVE_SCAN_ROLLED";
208 break;
210 os << "NONLIVE_SCAN_PLAIN";
211 break;
213 os << "NONLIVE_SCAN_ROLLED";
214 break;
216 os << "LATENT_IMPRESSION";
217 break;
219 os << "LATENT_TRACING";
220 break;
222 os << "LATENT_PHOTO";
223 break;
225 os << "LATENT_LIFT";
226 break;
228 os << "LIVE_SCAN_SWIPE";
229 break;
231 os << "LIVE_SCAN_VERTICAL_ROLL";
232 break;
234 os << "LIVE_SCAN_PALM";
235 break;
237 os << "NONLIVE_SCAN_PALM";
238 break;
240 os << "LATENT_PALM_IMPRESSION";
241 break;
243 os << "LATENT_PALM_TRACING";
244 break;
246 os << "LATENT_PALM_PHOTO";
247 break;
249 os << "LATENT_PALM_LIFT";
250 break;
252 os << "LIVE_SCAN_OPTICAL_CONCTACTLESS_PLAIN";
253 break;
255 os << "OTHER";
256 break;
258 os << "UNKNOWN";
259 break;
260 }
261 return os;
262 }
263
264} // namespace inno
Base exception for all enrollment-sdk invalid argument exceptions.
Definition EnrollmentException.h:96
@ UNKNOWN
Unknown or Unspecified.
Definition FaceCaptureDeviceTechnology.h:23
PrintImpression
It is impression of prints iso_19794-4_2011.
Definition PrintImpression.h:40
static constexpr PrintImpression IsoToPrintImpression(int isoImpression)
Function converts ISO impression to PrintImpression.
Definition PrintImpression.h:147
static constexpr int PrintToIsoImpression(PrintImpression printImpression)
Function converts PrintImpression to ISO impression.
Definition PrintImpression.h:91
@ OTHER
Other.
Definition PrintImpression.h:76
@ NONLIVE_SCAN_PALM
Nonlive-scan palm.
Definition PrintImpression.h:64
@ LATENT_PHOTO
Latent photo.
Definition PrintImpression.h:54
@ LIVE_SCAN_SWIPE
Live-scan swipe.
Definition PrintImpression.h:58
@ LATENT_PALM_IMPRESSION
Latent palm impression.
Definition PrintImpression.h:66
@ LIVE_SCAN_PLAIN
Live-scan plain.
Definition PrintImpression.h:42
@ NONLIVE_SCAN_ROLLED
Nonlive-scan rolled.
Definition PrintImpression.h:48
@ LATENT_PALM_PHOTO
Latent palm photo.
Definition PrintImpression.h:70
@ LIVE_SCAN_OPTICAL_CONCTACTLESS_PLAIN
Live-scan optical contactless plain.
Definition PrintImpression.h:74
@ LATENT_PALM_TRACING
Latent palm tracing.
Definition PrintImpression.h:68
@ LATENT_IMPRESSION
Latent impression.
Definition PrintImpression.h:50
@ UNKNOWN
Unknown.
Definition PrintImpression.h:78
@ LATENT_PALM_LIFT
Latent palm lift.
Definition PrintImpression.h:72
@ LIVE_SCAN_VERTICAL_ROLL
Live-scan vertical roll.
Definition PrintImpression.h:60
@ LATENT_TRACING
Latent tracing.
Definition PrintImpression.h:52
@ LATENT_LIFT
Latent lift.
Definition PrintImpression.h:56
@ NONLIVE_SCAN_PLAIN
Nonlive-scan plain.
Definition PrintImpression.h:46
@ LIVE_SCAN_ROLLED
Live-scan rolled.
Definition PrintImpression.h:44
@ LIVE_SCAN_PALM
Live-scan palm.
Definition PrintImpression.h:62