Line tool annotation schema

Schema

FieldTypeRequiredDefaultDescription
id
string
Yes-identifier
type
string
Yeslineline or spline
controlPoints
array
No-control points
points
array
Yes-points
visible
boolean
No-visibility
attributes
object
No-category attributes, key-value pairs
order
number
Yes-order of annotation
label
string
Yes-annotation category

Example

line

{
  "toolName": "lineTool",
  "result": [
    {
      "points": [
        {
          "x": 346.88414634146346,
          "y": 229.8300304878049,
          "id": "eWT6BJJv"
        },
        {
          "x": 481.39024390243907,
          "y": 328.9397865853659,
          "id": "ITAQu1gF"
        },
        {
          "x": 322.10670731707324,
          "y": 385.5739329268293,
          "id": "G4c3972f"
        },
        {
          "x": 300.86890243902445,
          "y": 309.4717987804878,
          "id": "PMCqLAsQ"
        }
      ],
      "id": "rW5Jbd8G",
      "visible": true,
      "attributes": {},
      "order": 1,
      "label": "noneAttribute"
    }
  ]
}

spline

{
  "toolName": "lineTool",
  "result": [
    {
      "id": "220b11fb-7a66-4301-8c30-a0616a51eac8",
      "type": "spline",
      "controlPoints": [
        {
          "x": 81.88775510204081,
          "y": 328.9387755102041
        },
        {
          "x": 132.1122448979592,
          "y": 368.2448979591837
        },
        {
          "x": 223.8265306122449,
          "y": 326.7551020408163
        },
        {
          "x": 180.1530612244898,
          "y": 273.2551020408163
        }
      ],
      "order": 1,
      "attribute": "label-1",
      "points": [
        {
          "id": "74aede72-8b5e-4f28-978e-04f2827b95ae",
          "x": 55.683673469387756,
          "y": 382.4387755102041
        },
        {
          "id": "2a9eee33-fba5-400e-96cc-432f6533ad44",
          "x": 177.96938775510205,
          "y": 347.5
        },
        {
          "id": "0bbab3db-efca-4319-a1fe-2e506d5053b5",
          "x": 201.98979591836735,
          "y": 243.77551020408166
        }
      ]
    }
  ]
}