Skip to content

ImageAnnotation

The Annotorious image annotation model aligns closely with the W3C Web Annotation Data Model, but has a few key differences and simplifications which are explained in detail in this guide.

Example

Here’s an example of a typical Annotorious annotation object:

{
id: '97d01785-bdc3-46ec-94d6-c03700c72d7c',
bodies: [
{
id: '5883e985-5b62-412b-b114-471b8b77c48d',
annotation: '97d01785-bdc3-46ec-94d6-c03700c72d7c',
purpose: 'commenting',
value: 'This is an interesting area!',
creator: {
id: 'aboutgeo',
name: 'Rainer'
},
created: new Date('2023-08-23T10:30:00Z')
}
]
target: {
annotation: '97d01785-bdc3-46ec-94d6-c03700c72d7c',
selector: {
type: 'RECTANGLE',
geometry: {
x: 100,
y: 100,
w: 100,
h: 50
}
},
creator: {
id: 'aboutgeo',
name: 'Rainer'
},
created: new Date('2023-08-23T10:30:00Z')
}
};

Properties

PropertyTypeDefaultDescription
idstringrequiredUnique ID. Will be autp-generated if not provided.
targetImageAnnotationTargetrequiredDefines the annotated image region.
bodiesAnnotationBody[][]List of annotation bodies.
propertiesobjectCan hold any custom properties you want to associate with the annotation.

ImageAnnotationTarget

Represents the target of an image annotation.

PropertyTypeDefaultDescription
annotationstringReference to the parent annotation. Will be auto-generated if not provided.
selectorShaperequiredAnnotated image region shape.
creatorUserUser who created the annotation.
createdDateCreation timestamp of the annotation.
updatedByUserUser who last modified the annotation.
updatedDateLast update timestamp of the annotation.

AnnotationBody

Represents a payload body of an annotation.

PropertyTypeDefaultDescription
idstringrequiredUnique identifier for the body.
annotationstringReference to the parent annotation. Will be auto-generated if not provided.
typestringAnnotation body type.
purposestringAnnotation body purpose.
valuestringAnnotation body value.
creatorUserUser who created the body.
createdDateCreation timestamp of the body.
updatedByUserUser who last modified the body.
updatedDateLast update timestamp of the body.

Purposes

You can use any string of your choice for the purpose field of the AnnotationBody. However, it is recommended to use the purpose values predefined in the W3C model for better interoperability with other systems.

For convenience, Annotorious provides IDE auto-complete support for these standard purposes:

  • assessing
  • bookmarking
  • classifying
  • commenting
  • describing
  • editing
  • highlighting
  • identifying
  • linking
  • moderating
  • questioning
  • replying
  • tagging