15 const std::string &probeIdentifier_,
17 const uint8_t probeInputIdentifier_,
19 const std::string &referenceIdentifier_,
21 const uint8_t referenceInputIdentifier_,
22 const Minutia &referenceMinutia_) :
24 probeIdentifier{probeIdentifier_},
26 probeInputIdentifier{probeInputIdentifier_},
27 probeMinutia{probeMinutia_},
28 referenceIdentifier{referenceIdentifier_},
29 referenceFGP{referenceFGP_},
30 referenceInputIdentifier{referenceInputIdentifier_},
31 referenceMinutia{referenceMinutia_}
38 const uint16_t theta_,
40 const std::optional<uint16_t> coordinateUncertainty_,
41 const std::optional<uint8_t> thetaUncertainty_) :
42 coordinate{coordinate_},
43 coordinateUncertainty{coordinateUncertainty_},
45 thetaUncertainty{thetaUncertainty_},
53 const std::optional<uint16_t> &direction_,
54 const std::optional<uint16_t> coordinateUncertainty_,
55 const std::optional<uint8_t> directionUncertainty_) :
56 coordinate{coordinate_},
57 coordinateUncertainty{coordinateUncertainty_},
58 direction{direction_},
59 directionUncertainty{directionUncertainty_}
66 const std::optional<std::tuple<std::optional<uint16_t>,
67 std::optional<uint16_t>, std::optional<uint16_t>>> &direction_,
68 const std::optional<uint16_t> coordinateUncertainty_,
69 const std::optional<std::tuple<std::optional<uint8_t>,
70 std::optional<uint8_t>, std::optional<uint8_t>>>
71 &directionUncertainty_) :
72 coordinate{coordinate_},
73 coordinateUncertainty{coordinateUncertainty_},
74 direction{direction_},
75 directionUncertainty{directionUncertainty_}
83 const std::vector<Segment> &segments_) :
115 if (std::get_if<PalmCrease>(&cld_) !=
nullptr) {
154 throw std::logic_error{
"CreaseClassification = "
155 "PalmCrease, but FrictionRidgeGeneralizedPosition "
156 "is not from a palm"};
216std::vector<FRIF::Segment>
220 return (this->segments);
227 this->segments.push_back(segment);
232 const std::vector<FRIF::Segment> &segments_)
234 this->segments = segments_;
239 const std::optional<PatternSubclassification> sub_,
240 const std::optional<WhorlDeltaRelationship> wdr_)
242 this->setPatternGeneralClassification(gcf_);
244 if (sub_.has_value())
245 this->setPatternSubclassification(sub_.value());
247 if (wdr_.has_value())
248 this->setWhorlDeltaRelationship(wdr_.value());
258 this->sub = std::nullopt;
259 this->wdr = std::nullopt;
268 if (std::get_if<ArchPatternSubclassification>(&sub_) ==
nullptr)
269 throw std::logic_error{
"PatternGeneralClassification = "
270 "Arch, but PatternSubclassification is not an "
271 "ArchPatternSubclassification"};
275 if (std::get_if<WhorlPatternSubclassification>(&sub_) ==
277 throw std::logic_error{
"PatternGeneralClassification = "
278 "Whorl, but PatternSubclassification is not a "
279 "WhorlPatternSubclassification"};
282 throw std::logic_error{
"PatternGeneralClassification is not "
294 throw std::logic_error{
"PatternGeneralClassification is not "
296 if (!this->sub.has_value())
297 throw std::logic_error{
"PatternSubClassification is not set"};
298 if (std::get_if<WhorlPatternSubclassification>(&this->sub.value()) ==
300 throw std::logic_error{
"PatternGeneralClassification = Whorl, "
301 "but PatternSubclassification is not a "
302 "WhorlPatternSubclassification"};
314std::optional<FRIF::EFS::PatternSubclassification>
321std::optional<FRIF::EFS::WhorlDeltaRelationship>
330 const std::underlying_type_t<Impression> i)
352 throw std::runtime_error{
"Invalid Impression value: " +
359 const std::underlying_type_t<FrictionRidgeCaptureTechnology> i)
379 throw std::runtime_error{
"Invalid FrictionRidgeCapture"
380 "Technology value: " + std::to_string(i)};
386 const std::underlying_type_t<FrictionRidgeGeneralizedPosition> i)
476 throw std::runtime_error{
"Invalid FrictionRidgeGeneralized"
477 "Position value: " + std::to_string(i)};
482 const int16_t direction_,
483 const std::optional<uint8_t> &uncertainty_) :
484 direction{direction_},
485 uncertainty{uncertainty_}
492 const std::underlying_type_t<ProcessingMethod> i)
514 throw std::runtime_error{
"Invalid ProcessingMethod value: " +
521 const std::underlying_type_t<PatternGeneralClassification> i)
543 throw std::runtime_error{
"Invalid PatternGeneralClassification "
544 "value: " + std::to_string(i)};
550 const std::underlying_type_t<ArchPatternSubclassification> i)
558 throw std::runtime_error{
"Invalid ArchPatternSubclassification "
559 "value: " + std::to_string(i)};
565 const std::underlying_type_t<WhorlPatternSubclassification> i)
577 throw std::runtime_error{
"Invalid WhorlPattern"
578 "Subclassification value: " + std::to_string(i)};
584 const std::underlying_type_t<WhorlDeltaRelationship> i)
594 throw std::runtime_error{
"Invalid WhorlDeltaRelationship "
595 "value: " + std::to_string(i)};
601 const std::underlying_type_t<ValueAssessment> i)
613 throw std::runtime_error{
"Invalid ValueAssessment value: " +
620 const std::underlying_type_t<Substrate> i)
648 throw std::runtime_error{
"Invalid Substrate value: " +
655 const std::underlying_type_t<MinutiaType> i)
667 throw std::runtime_error{
"Invalid MinutiaType value: " +
674 const std::underlying_type_t<CorrespondenceType> i)
688 throw std::runtime_error{
"Invalid CorrespondenceType value: " +
695 const std::underlying_type_t<RidgeQuality> i)
711 throw std::runtime_error{
"Invalid RidgeQuality value: " +
718 const std::underlying_type_t<FingerCrease> i)
728 throw std::runtime_error{
"Invalid FingerCrease value: " +
735 const std::underlying_type_t<PalmCrease> i)
747 throw std::runtime_error{
"Invalid PalmCrease value: " +
754 const std::underlying_type_t<LinearDiscontinuity> i)
768 throw std::runtime_error{
"Invalid LinearDiscontinuity value: " +
789 "b4a1e7586b3be906f9770e4b77768038"
797 static const std::string fs =
"\x1C";
798 static const std::string us =
"\x1F";
799 static const std::string gs =
"\x1D";
803 id += d.
identifier->marketing.value_or(
"") + us;
806 id += std::to_string(d.
identifier->cbeff->owner) + us;
808 if (d.
identifier->cbeff->algorithm.has_value())
809 id += std::to_string(
816 return (std::hash<std::string>{}(
827 const double value_) :
833FRIF::EFS::QualityMeasure::operator bool()
837 return (this->hasValue());
845 return ((this->status == Status::Success) &&
846 this->value.has_value());
853 return (*this->value);
860 return (this->value.value());
867 return (this->status);
870std::optional<std::string>
874 return (this->message);
879 const std::string &message_)
881 this->message = message_;
std::vector< Segment > getSegments() const
void setFrictionRidgeGeneralizedPosition(const FrictionRidgeGeneralizedPosition fgp)
Crease(const FrictionRidgeGeneralizedPosition fgp, const CreaseClassification cld, const std::vector< Segment > &segments)
Crease constructor.
void addSegment(const Segment &segment)
void setCreaseClassification(const CreaseClassification cld)
void setSegments(const std::vector< Segment > &segments)
CreaseClassification getCreaseClassification() const
FrictionRidgeGeneralizedPosition getFrictionRidgeGeneralizedPosition() const
std::optional< PatternSubclassification > getPatternSubclassification() const
void setPatternGeneralClassification(const PatternGeneralClassification)
void setWhorlDeltaRelationship(const WhorlDeltaRelationship)
PatternClassification(const PatternGeneralClassification, const std::optional< PatternSubclassification >={}, const std::optional< WhorlDeltaRelationship >={})
std::optional< WhorlDeltaRelationship > getWhorlDeltaRelationship() const
void setPatternSubclassification(const PatternSubclassification)
PatternGeneralClassification getPatternGeneralClassification() const
Status
Status of QualityMeasure value computation.
void setMessage(const std::string &message)
bool hasValue() const noexcept
std::optional< std::string > getMessage() const
static const Description NFIQ2v23
Description for NFIQ 2 v2.3.
ArchPatternSubclassification toArchPatternSubclassification(const std::underlying_type_t< ArchPatternSubclassification > i)
Convert integer to enumerated type.
std::variant< FingerCrease, PalmCrease, LinearDiscontinuity > CreaseClassification
Collection of crease types.
Substrate toSubstrate(const std::underlying_type_t< Substrate > i)
Convert integer to enumerated type.
MinutiaType toMinutiaType(const std::underlying_type_t< MinutiaType > i)
Convert integer to enumerated type.
PatternGeneralClassification
General classification of friction ridge structure.
PatternGeneralClassification toPatternGeneralClassification(const std::underlying_type_t< PatternGeneralClassification > i)
Convert integer to enumerated type.
std::variant< ArchPatternSubclassification, WhorlPatternSubclassification > PatternSubclassification
Subclassification of PatternClassification.
FingerCrease
Permanent flexion creases on fingers.
@ DistalInterphalangeal
Below distal phalanx.
@ ProximalDigital
Between proximal phalanx and palm.
@ ProximalInterphalangeal
Below medial phalanx.
RidgeQuality toRidgeQuality(const std::underlying_type_t< RidgeQuality > i)
Convert integer to enumerated type.
FrictionRidgeGeneralizedPosition
Friction positions codes from ANSI/NIST-ITL 1-2011 (2015).
@ LeftFullPalmAndWritersPalm
@ RightFullPalmAndWritersPalm
LinearDiscontinuity
Linear discontinuities that are not named permanent creases.
WhorlPatternSubclassification
Subclassification when PatternClassification is Whorl.
FrictionRidgeCaptureTechnology
Capture device codes from ANSI/NIST-ITL 1-2011 (2015).
ProcessingMethod
Processing method codes from ANSI/NIST-ITL 1-2011 (2015).
WhorlDeltaRelationship toWhorlDeltaRelationship(const std::underlying_type_t< WhorlDeltaRelationship > i)
Convert integer to enumerated type.
WhorlPatternSubclassification toWhorlPatternSubclassification(const std::underlying_type_t< WhorlPatternSubclassification > i)
Convert integer to enumerated type.
ValueAssessment toValueAssessment(const std::underlying_type_t< ValueAssessment > i)
Convert integer to enumerated type.
FrictionRidgeGeneralizedPosition toFrictionRidgeGeneralizedPosition(const std::underlying_type_t< FrictionRidgeGeneralizedPosition > i)
Convert integer to enumerated type.
PalmCrease toPalmCrease(const std::underlying_type_t< PalmCrease > i)
Convert integer to enumerated type.
Impression
Friction ridge impression types from ANSI/NIST-ITL 1-202X.
@ PlainContactlessStationary
@ RolledContactlessStationary
ArchPatternSubclassification
Subclassification when PatternClassification is Arch.
CorrespondenceType toCorrespondenceType(const std::underlying_type_t< CorrespondenceType > i)
Convert integer to enumerated type.
ValueAssessment
Value assessment codes from ANSI/NIST-ITL 1-2011 (2015).
FingerCrease toFingerCrease(const std::underlying_type_t< FingerCrease > i)
Convert integer to enumerated type.
MinutiaType
Types of minutiae.
LinearDiscontinuity toLinearDiscontinuity(const std::underlying_type_t< LinearDiscontinuity > i)
Convert integer to enumerated type.
CorrespondenceType
Types of correspondence.
@ Definite
Probe feature definitely corresponds.
@ OutOfRegion
Probe feature lies outside the reference.
@ Possible
Probe feature possibly/debatably corresponds.
@ DoesNotExist
Probe feature definitely does not exist.
@ UnclearArea
Probe feature lies in an area experiencing quality issues in the reference.
ProcessingMethod toProcessingMethod(const std::underlying_type_t< ProcessingMethod > i)
Convert integer to enumerated type.
Impression toImpression(const std::underlying_type_t< Impression > i)
Convert integer to enumerated type.
PalmCrease
Permanent flexion creases on palms.
@ ProximalTransverse
Diagonal across palm.
@ Wrist
Bottom of the palm at the wrist.
@ RadialLongitudinal
Around the base of thenar.
@ DistalTransverse
Bottom of the interdigital area.
RidgeQuality
Local ridge quality codes from ANSI/NIST-ITL 1-2011 (2015).
@ DebatableMinutiae
Continuity of ridge flow is certain; minutiae are debatable.
@ DebatableRidgeFlow
Continuity of ridge flow is uncertain.
@ DefinitiveRidgeEdges
Ridge edges, minutiae, and ridge flow are obvious and unambiguous; pores are either debatable or not ...
@ DefinitivePores
Pores and ridge edges are obvious and unambiguous.
@ Background
No ridge information.
@ DefinitiveMinutiae
Minutiae and ridge flow are obvious and unambiguous; ridge edges are debatable.
FrictionRidgeCaptureTechnology toFrictionRidgeCaptureTechnology(const std::underlying_type_t< FrictionRidgeCaptureTechnology > i)
Convert integer to enumerated type.
Substrate
Substrate codes from ANSI/NIST-ITL 1-2011 (2015).
WhorlDeltaRelationship
Whorl-Delta relationship.
std::tuple< Coordinate, Coordinate > Segment
Line segment.
Pixel location in an image.
Core(const Coordinate &coordinate={}, const std::optional< uint16_t > &direction={}, const std::optional< uint16_t > coordinateUncertainty={}, const std::optional< uint8_t > directionUncertainty={})
Core constructor.
CorrespondenceRelationship(const CorrespondenceType type={}, const std::string &probeIdentifier={}, const FrictionRidgeGeneralizedPosition probeFGP={}, const uint8_t probeInputIdentifier={}, const Minutia &probeMinutia={}, const std::string &referenceIdentifier={}, const FrictionRidgeGeneralizedPosition referenceFGP={}, const uint8_t referenceInputIdentifier={}, const Minutia &referenceMinutia={})
CorrespondenceRelationship constructor.
Delta(const Coordinate &coordinate={}, const std::optional< std::tuple< std::optional< uint16_t >, std::optional< uint16_t >, std::optional< uint16_t > > > &direction={}, std::optional< uint16_t > coordinateUncertainty={}, const std::optional< std::tuple< std::optional< uint8_t >, std::optional< uint8_t >, std::optional< uint8_t > > > &directionUncertainty={})
Delta constructor.
Friction ridge feature details.
Minutia(const Coordinate &coordinate={}, const uint16_t theta={}, const MinutiaType type=MinutiaType::Unknown, const std::optional< uint16_t > coordinateUncertainty={}, const std::optional< uint8_t > thetaUncertainty={})
Minutia constructor.
Orientation(const int16_t direction=0, const std::optional< uint8_t > &uncertainty=15)
Orientation constructor.
std::size_t operator()(const Description &d) const
Description of algorithm that computed a QualityMeasure.
std::optional< ProductIdentifier > identifier
Registered algorithm identifier (QAV, QAP)
std::optional< std::string > comment
Other information (QCM)
std::optional< std::string > modelSHA256
Model SHA-256 checksum (QCK)
bool operator==(const Description &) const
std::optional< std::string > version
Algorithm product version (QPV)
auto operator<=>(const Description &) const
CBEFF information registered with and assigned by IBIA.
Identifying details about algorithm components for documentation.