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
134
141 using SubjectCandidate = std::string;
142
145 {
146 std::size_t
149 const
150 noexcept;
151 };
152
166 using SubjectPositionCandidateList = std::unordered_map<
169
181 using SubjectCandidateList = std::unordered_map<std::string, double>;
182
194 std::unordered_map<SubjectPositionCandidate, Correspondence,
196
207 std::unordered_map<std::string, Correspondence>;
208
211 {
216 bool decision{};
217
219 double similarity{};
220
240 std::optional<Correspondence> correspondence{};
241 };
242
247 {
251 bool decision{};
252
258
278 std::optional<SubjectPositionCandidateListCorrespondence>
280 };
281
287 {
291 bool decision{};
292
298
318 std::optional<SubjectCandidateListCorrespondence>
320 };
321
324 {
326 std::filesystem::path archive{};
345 std::filesystem::path manifest{};
346 };
347
349 using Sample = std::tuple<std::optional<Image>,
350 std::optional<EFS::Features>>;
351
353 enum class TemplateType
354 {
359 Probe,
365 };
366}
367
368#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:349
std::unordered_map< SubjectPositionCandidate, double, SubjectPositionCandidateListKeyHash > SubjectPositionCandidateList
Representation of a list of likely candidates returned from a search.
Definition io.h:166
std::string SubjectCandidate
Candidate list entry identifying a subject without respect for region.
Definition io.h:141
TemplateType
Use for data extracted from Sample.
Definition io.h:354
@ Reference
Use within a database for search, or the initial capture during a comparison.
@ Probe
Item being compared to a reference or searched against a reference database.
std::unordered_map< SubjectPositionCandidate, Correspondence, SubjectPositionCandidateListKeyHash > SubjectPositionCandidateListCorrespondence
Representation to output Correspondence for each SubjectPositionCandidate from a SubjectPositionCandi...
Definition io.h:193
std::unordered_map< std::string, Correspondence > SubjectCandidateListCorrespondence
Representation to output Correspondence for each SubjectCandidate from a SubjectCandidateList.
Definition io.h:206
std::unordered_map< std::string, double > SubjectCandidateList
Representation of a list of likely candidates returned from a search.
Definition io.h:181
The results of comparing two templates.
Definition io.h:211
double similarity
Quantification of probe's similarity to reference sample.
Definition io.h:219
bool decision
Best guess on if probe and reference come from the same source.
Definition io.h:216
std::optional< Correspondence > correspondence
Pairs of corresponding Minutia between TemplateType::Probe and TemplateType::Reference templates.
Definition io.h:240
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:247
std::optional< SubjectPositionCandidateListCorrespondence > correspondence
Pairs of corresponding Minutia between TemplateType::Probe and TemplateType::Reference templates.
Definition io.h:279
SubjectPositionCandidateList candidateList
List of SubjectPositionCandidate most similar to the probe.
Definition io.h:257
bool decision
Best guess on if candidateList contains an identification.
Definition io.h:251
The results of a searching a database for a subject, without respect to finger positions.
Definition io.h:287
bool decision
Best guess on if candidateList contains an identification.
Definition io.h:291
std::optional< SubjectCandidateListCorrespondence > correspondence
Pairs of corresponding Minutia between TemplateType::Probe and TemplateType::Reference templates.
Definition io.h:319
SubjectCandidateList candidateList
List of SubjectCandidate most similar to the probe.
Definition io.h:297
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.
auto operator<=>(const SubjectPositionCandidate &) const
EFS::FrictionRidgeGeneralizedPosition fgp
Most localized position in the identifier.
Definition io.h:116
bool 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:145
std::size_t operator()(const FRIF::SubjectPositionCandidate &c) const noexcept
Collection of templates on disk.
Definition io.h:324
std::filesystem::path archive
File containing concatenated CreateTemplateResult::data.
Definition io.h:326
std::filesystem::path manifest
Manifest for parsing archive.
Definition io.h:345
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