Relations

The relations object is part of the task object in the Ango Annotation Format. It contains all data pertaining to labels created with relations, e.g. not tools, classifications, or brushes.

Relations created with the following classification classes will appear in the relations object:

General Structure

"relations" : [
    {
        from // string, only in single relations, objectID of the object from where the relation starts
        to // string, only in single relations, objectID of the object where the relation stops
        objectId // string, ID of the relation
        schemaId, // string, ID of the relation class in the project
        group // list, only in group relation, the objectIDs of the objects present in the relation
        direction, // string, only in single relations, one of straight, reverse, bidirectional.
        title // string, title of the relation class
        page // int, optional, if asset is multi-frame (video, TIFF, DICOM) frame where the relation takes place
    },
    { ... }
]

Sample

Single Relation

{
  "from": "3d52bc1cd570e28fa9da319",
  "to": "4e8dbe33e3223d9da92e638",
  "objectId": "572c2545502ba09bd661714",
  "schemaId": "8f8e617174718e80bbea268",
  "direction": "straight",
  "page": 0,
  "title": "sng"
}

Group Relation

{
  "objectId": "15ff30bd776c19fee934398",
  "schemaId": "37ccadce8a7505b93659450",
  "group": [
    "3d52bc1cd570e28fa9da319",
    "4e8dbe33e3223d9da92e638",
    "4342e79c0c77a8252a7b188"
  ],
  "page": 0,
  "title": "gru"
}

Properties

PropertyTypeDescription

from

String

In single relations only, object ID of the object which was clicked first when setting up the relation.

to

String

In single relations only, object ID of the object which was clicked second when setting up the relation.

objectId

String

Object ID of the relation. Unique in the asset.

schemaId

String

ID of the class to which the relation belongs.

group

List

In group relations only, the objectIDs of the objects in the relation.

title

String

Name of the class.

direction

String

In single relations only, direction of the relation. One of: straight: The relation has an arrow starting from the object indicated by from and pointing towards the object with the objectID indicated by to. reverse: The relation has an arrow starting from the object indicated by to and pointing towards the object with the objectID indicated by from. bidirectional: The relation has two arrows, each starting from one of the two objects and pointing towards the other.

Sample Relation Object

"relations": [
  {
    "objectId": "d64c9411b9e040691f72813",
    "schemaId": "bbe5d081089f774a2fef435",
    "from": "f9b1e50ec081e156c718420",
    "to": "961dc4d7cb430aca8f2f096",
    "direction": "straight",
    "title": "singleRelationName"
  },
  {
    "objectId": "5b7563fe8f76a2fdd1aa889",
    "schemaId": "1c2d75ce36cbf0aea306012",
    "group": [
      "58a07df98f7747a597a8437",
      "2c93005a971933a40831133",
      "065fb5c8738fef22e267333"
    ],
    "title": "groupRelationName"
  }  
]

Last updated