feat: implement FBS to ANSI/NIST-ITL Type-9 Minutiae Mapping & XML Serialization#159
Open
dawid200272 wants to merge 6 commits into
Open
feat: implement FBS to ANSI/NIST-ITL Type-9 Minutiae Mapping & XML Serialization#159dawid200272 wants to merge 6 commits into
dawid200272 wants to merge 6 commits into
Conversation
…T-ITL standard Defined data structures to store minutiae information based on the Interpol Implementation of the ANSI/NIST-ITL standard.
…tiae types Introduces concrete and abstract object models (`MinutiaBase`, `Minutia`, `CoreMinutia`, `DeltaMinutia`) to encapsulate biometrics features mapping. - Ensures compliance with fields 09.137 (FMD), 09.139 (CIN), 09.140 (DIN), and 09.141 (ADA) of the ANSI/NIST-ITL standard (INTERPOL v6.00.02 profile). - Utilizes TypeScript parameter properties and `override` keywords for robust type-safety against base interface shapes. - Adds comprehensive JSDoc annotations referencing specific NIST field codes (e.g., MAN, MXC, XCC, ANG1) for complete IDE hover menu context.
… format conversion Implement the `mapMinutiaFromFbsToAnsiNist` utility function to convert internal Forensic Biometrics Studio (FBS) fingerprint markings into structures conforming to the "ANSI/NIST-ITL 1-2011: UPDATE 2015" standard (INTERPOL v6.00.02 profile). Key implementations: - Added coordinate rounding and conditional ray angle validation via TypeScript Type Guards (`isRayMarking`). - Implemented `mapAppRadiansToInterpolDegrees` pipeline to map internal radians to quantized 2-degree integer steps in the [0, 179] range matching INCITS 378 blocks. - Used Dependency Injection (DI) for available marking types to decouple the mapper from the global store state and ensure isolated unit testing. - Handled polymorphic mapping to `CoreMinutia`, `DeltaMinutia`, and standard `Minutia` with appropriate `MinutiaType` enum fallbacks.
Introduce a Jest-based test suite in `MinutiaMapper.test.ts` to validate the data mapping pipeline from internal FBS markings to ANSI/NIST-ITL compliant structures. Key test coverages: - Verified coordinate rounding for precise image-space mapping. - Validated polymorphic class resolution for CoreMinutia, DeltaMinutia, and standard Minutia instances. - Covered fallback logic ensuring unknown or unmapped marking types resolve gracefully to MinutiaType.Other with a default quality of 0. - Authenticated mathematical orientation conversion (app radians to 2-degree quantized INTERPOL steps) using real dataset coordinates. - Tested biometric boundary conditions, specifically the 180 to 0 degree wrapping logic for INCITS 378 compliance. Bypassed global store states by utilizing isolated static configurations via Dependency Injection.
…L generation Add `MinutiaeXmlSerializer.ts` to handle the transformation of internal polymorphic minutiae objects into ANSI/NIST-ITL 1-2011 (Update 2015) compliant XML structures for the INTERPOL profile. Key implementations: - Exposed a single clean public API entry point: `serializeToType9AnsiRecordXml`. - Encapsulated low-level rendering logic by keeping sub-component serializers (Standard Minutiae, Cores, Deltas) private within the module. - Refactored array streaming to safely enforce TypeScript type assertions on filtered sub-arrays rather than inline mapping casts. - Implemented multi-angle evaluation for delta points (handling primary, secondary, and tertiary orientations dynamically). - Replaced tight string concatenation with newline-joined arrays to produce human-readable, pretty-printed XML outputs. Removes low-level IO/Writer vocabulary in favor of data-transformative Serialization semantics.
…erializer Introduce `MinutiaeXmlSerializer.test.ts` to validate the Type-9 logical record XML serialization pipeline using a black-box testing approach. Key test scenarios covered: - Structural compliance for boundary edge cases (zero inputs/empty array). - Precise schema validation and property mapping for standard INCITS minutiae. - Accurate coordinate assignment for Core fingerprint pattern locations. - Conditional multi-angle data injection for Delta points (handling up to 3 angles dynamically). - Formatting layout verification ensuring output blocks are line-broken with newlines. - Polymorphic collection routing across a combined mixed array of sub-classes. All test cases are fully documented using strict JSDoc syntax for enhanced readability and maintainability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Implement FBS to ANSI/NIST-ITL Type-9 Minutiae Mapping & XML Serialization
📝 Description
This Pull Request delivers a fully tested, standard-compliant pipeline to map, transform, and serialize fingerprint biometric markings from the internal FBS (Forensic Biometrics Studio) format into the ANSI/NIST-ITL 1-2011: UPDATE 2015 standard, specifically adhering to the INTERPOL v6.00.02 XML implementation profile.
The implementation is split into four foundational layers:
PackageMinutiaeRecord) XML blocks.🛠️ Detailed Change Log (Based on Commit History)
1. Core Data Structures & Biometric Domain Models (
feat)InterpolMinutiaeTypes.tsto establish core dictionary standards. It defines explicit, strict classifications (such asMinutiaTyperepresenting RidgeEnding, RidgeBifurcation, and Other) directly extracted from the official INTERPOL XML implementation profile reference tables.MinutiaBase,Minutia(standard INCITS points),CoreMinutia, andDeltaMinutia.overridekeyword) to shield mapped objects against unintended runtime alterations.Field 09.137 / FMD,Field 09.139 / CIN,Field 09.140 / DIN, andField 09.141 / ADA) ensuring hover context inside IDEs.2. Coordinate Mapping & Angular Quantization (
feat&refactor)MinutiaMapper.tsto translate internal application markings (RayMarking,PointMarking) into unified biometric standard primitives.MarkingTypesStore.state.types) by utilizing Dependency Injection (DI) via method parameters. This isolates the mapping engine and enables reliable standalone unit testing.% 180).3. Isolated XML Serializer Engine (
feat&refactor)MinutiaeXmlSerializer.tsto fully isolate the generation ofType-9logical records from other domain boundaries.serializeStandardMinutia,serializeCoreLocation,serializeDeltaLocation) are now private and strictly encapsulated.serializeToType9AnsiRecordXml.DeltaMinutiamarkings..join("\n")) to guarantee pretty-printed, human-readable XML documents.4. Comprehensive Unit Test Suites (
test)MinutiaMapper.test.tsandMinutiaeXmlSerializer.test.ts.<biom:MinutiaeQuantity>0</biom:MinutiaeQuantity>.📋 Biometric Field Coverage Checklist
🧪 Verification & Test Execution Results
All automated test suites pass cleanly inside the local environment: