Friction Ridge Image and Features Technology Evaluations
API for participating in NIST's Friction Ridge Image and Features Technology Evaluations.
Loading...
Searching...
No Matches
io.h
Go to the documentation of this file.
1/*
2 * This software was developed at the National Institute of Standards and
3 * Technology (NIST) by employees of the Federal Government in the course
4 * of their official duties. Pursuant to title 17 Section 105 of the
5 * United States Code, this software is not subject to copyright protection
6 * and is in the public domain. NIST assumes no responsibility whatsoever for
7 * its use by other parties, and makes no guarantees, expressed or implied,
8 * about its quality, reliability, or any other characteristic.
9 */
10
11#ifndef FRIF_IO_H_
12#define FRIF_IO_H_
13
14#include <cstdint>
15#include <filesystem>
16#include <optional>
17#include <string>
18#include <unordered_map>
19#include <vector>
20
21#include <frifte/common.h>
22#include <frifte/efs.h>
23
25namespace FRIF
26{
37 {
39 std::string identifier{};
40
42 uint8_t inputIdentifier{};
43
45 std::optional<EFS::Features> features{};
46 };
47
50 {
52 std::vector<std::byte> data{};
53
77 std::optional<std::vector<TemplateData>> extractedData{};
78 };
79
82 {
92 std::vector<EFS::CorrespondenceRelationship> relationships{};
93
103 std::optional<bool> complex{};
104 };
105
112 {
114 std::string identifier{};
117
128 const std::string &identifier = {},
130
131 std::strong_ordering
134 const;
136 };
137
144 using SubjectCandidate = std::string;
145
148 {
149 std::size_t
152 const
153 noexcept;
154 };
155
169 using SubjectPositionCandidateList = std::unordered_map<
172
184 using SubjectCandidateList = std::unordered_map<std::string, double>;
185
197 std::unordered_map<SubjectPositionCandidate, Correspondence,
199
210 std::unordered_map<std::string, Correspondence>;
211
214 {
219 bool decision{};
220
222 double similarity{};
223
243 std::optional<Correspondence> correspondence{};
244 };
245
250 {
254 bool decision{};
255
261
281 std::optional<SubjectPositionCandidateListCorrespondence>
283 };
284
290 {
294 bool decision{};
295
301
321 std::optional<SubjectCandidateListCorrespondence>
323 };
324
327 {
329 std::filesystem::path archive{};
348 std::filesystem::path manifest{};
349 };
350
352 using Sample = std::tuple<std::optional<Image>,
353 std::optional<EFS::Features>>;
354
356 enum class TemplateType
357 {
368 };
369}
370
371#endif /* FRIF_IO_H_ */
FrictionRidgeGeneralizedPosition
Friction positions codes from ANSI/NIST-ITL 1-2011 (2015).
Definition efs.h:93
TE input/output types.
Definition common.h:26
std::tuple< std::optional< Image >, std::optional< EFS::Features > > Sample
Convenience definition for a friction ridge sample.
Definition io.h:352
std::unordered_map< SubjectPositionCandidate, double, SubjectPositionCandidateListKeyHash > SubjectPositionCandidateList
Representation of a list of likely candidates returned from a search.
Definition io.h:169
std::string SubjectCandidate
Candidate list entry identifying a subject without respect for region.
Definition io.h:144
TemplateType
Use for data extracted from Sample.
Definition io.h:357
@ Reference
Use within a database for search, or the initial capture during a comparison.
Definition io.h:367
@ Probe
Item being compared to a reference or searched against a reference database.
Definition io.h:362
std::unordered_map< SubjectPositionCandidate, Correspondence, SubjectPositionCandidateListKeyHash > SubjectPositionCandidateListCorrespondence
Representation to output Correspondence for each SubjectPositionCandidate from a SubjectPositionCandi...
Definition io.h:196
std::unordered_map< std::string, double > SubjectCandidateList
Representation of a list of likely candidates returned from a search.
Definition io.h:184
std::unordered_map< std::string, Correspondence > SubjectCandidateListCorrespondence
Representation to output Correspondence for each SubjectCandidate from a SubjectCandidateList.
Definition io.h:209
The results of comparing two templates.
Definition io.h:214
double similarity
Quantification of probe's similarity to reference sample.
Definition io.h:222
bool decision
Best guess on if probe and reference come from the same source.
Definition io.h:219
std::optional< Correspondence > correspondence
Pairs of corresponding Minutia between TemplateType::Probe and TemplateType::Reference templates.
Definition io.h:243
Information about a probe/reference relationship.
Definition io.h:82
std::optional< bool > complex
Whether or not the comparison was complex.
Definition io.h:103
std::vector< EFS::CorrespondenceRelationship > relationships
Groups of relationships between features.
Definition io.h:92
Output from extracting features into a template .
Definition io.h:50
std::vector< std::byte > data
Contents of the template.
Definition io.h:52
std::optional< std::vector< TemplateData > > extractedData
Information contained within data.
Definition io.h:77
The results of a searching a database for subject finger positions.
Definition io.h:250
std::optional< SubjectPositionCandidateListCorrespondence > correspondence
Pairs of corresponding Minutia between TemplateType::Probe and TemplateType::Reference templates.
Definition io.h:282
SubjectPositionCandidateList candidateList
List of SubjectPositionCandidate most similar to the probe.
Definition io.h:260
bool decision
Best guess on if candidateList contains an identification.
Definition io.h:254
The results of a searching a database for a subject, without respect to finger positions.
Definition io.h:290
bool decision
Best guess on if candidateList contains an identification.
Definition io.h:294
std::optional< SubjectCandidateListCorrespondence > correspondence
Pairs of corresponding Minutia between TemplateType::Probe and TemplateType::Reference templates.
Definition io.h:322
SubjectCandidateList candidateList
List of SubjectCandidate most similar to the probe.
Definition io.h:300
Candidate list entry identifying a specific region of a subject.
Definition io.h:112
SubjectPositionCandidate(const std::string &identifier={}, const EFS::FrictionRidgeGeneralizedPosition fgp={})
SubjectPositionCandidate constructor.
EFS::FrictionRidgeGeneralizedPosition fgp
Most localized position in the identifier.
Definition io.h:116
bool operator==(const SubjectPositionCandidate &) const
std::strong_ordering operator<=>(const SubjectPositionCandidate &) const
std::string identifier
Identifier of the sample in the reference database.
Definition io.h:114
Hash function for SubjectPositionCandidate.
Definition io.h:148
std::size_t operator()(const FRIF::SubjectPositionCandidate &c) const noexcept
Collection of templates on disk.
Definition io.h:327
std::filesystem::path archive
File containing concatenated CreateTemplateResult::data.
Definition io.h:329
std::filesystem::path manifest
Manifest for parsing archive.
Definition io.h:348
Information possibly stored in a template.
Definition io.h:37
std::optional< EFS::Features > features
Extended feature set data.
Definition io.h:45
std::string identifier
Identifier provided during template creation.
Definition io.h:39
uint8_t inputIdentifier
Link to Image::identifier and/or EFS::Features::identifier.
Definition io.h:42