Skip to main content

Visual Annotations API

The Visual Annotations endpoints of the Investigation Service expose CRUD operations on the annotation layer drawn over examinations. Annotations are stored as a separate layer that does not modify the source image, and can be linked between probe and candidate to highlight matching features in the Hit detail report.

Annotations are scoped to the examination they were drawn in – two examinations that compare against the same biometric sample have fully independent annotation layers.

Operations

OperationVerb / path
Annotation creationPUT visual-annotations/{annotationId}/create
Annotation retrievalGET visual-annotations/{annotationId}
Annotation updatePUT visual-annotations/{annotationId}/update
Annotation soft-deletePOST visual-annotations/{annotationId}/delete
Linked annotation createPUT linked-visual-annotations/{linkId}/create
Linked annotation retrievalGET linked-visual-annotations/{linkId}
Linked annotation soft-deletePOST linked-visual-annotations/{linkId}/delete

Annotation shapes

The supported annotation shapes are:

  • Freehand stroke – polyline of points.
  • Rectangle – axis-aligned bounding box.
  • Ellipse – defined by a centre and two radii.
  • Arrow – two endpoints; the head is rendered at the second point.
  • Text label – a position and a text string.

Every annotation is associated with a snapshot of the underlying examination, so the annotation always references a stable view of the image even after subsequent edits.

Sample – creating a rectangle annotation

var va = new VisualAnnotationsApi(BuildAbisConfiguration(accessToken));

var createAnnotationRequest = new CreateVisualAnnotationRequest
{
ExaminationId = Guid.Parse("existing-examination-id"),
SnapshotId = Guid.Parse("snapshot-id"),
Shape = AnnotationShape.RECTANGLE,
Geometry = new RectangleGeometry { X = 120, Y = 80, Width = 60, Height = 40 },
Color = "#FF0000",
Note = "Distinct ridge cluster"
};

var annotationId = Guid.NewGuid().ToString();
var annotation = va.CreateVisualAnnotation(annotationId, createAnnotationRequest);
Console.WriteLine($"Annotation created with ID: {annotation.Id}");

Linking annotations

To indicate that two annotations represent the same physiological feature in the probe and in the candidate, create a linked annotation that references both annotation IDs.

var lva = new LinkedVisualAnnotationsApi(BuildAbisConfiguration(accessToken));

var createLinkRequest = new CreateLinkedVisualAnnotationRequest
{
ProbeAnnotationId = Guid.Parse("probe-annotation-id"),
CandidateAnnotationId = Guid.Parse("candidate-annotation-id"),
Note = "Matching delta"
};

var linkId = Guid.NewGuid().ToString();
var link = lva.CreateLinkedVisualAnnotation(linkId, createLinkRequest);
Console.WriteLine($"Link created with ID: {link.Id}");

Linked annotations show up as paired annotations in the Comparison Tool and as paired callouts in the Hit detail report.