Line tool annotation schema

Schema

字段类型必填默认值描述
id
string
-唯一标识
type
string
line线条类型: line(直线),spline(曲线)
controlPoints
array
-贝塞尔曲线控制点列表
points
array
-标注点列表
visible
boolean
-是否可见
attributes
object
-类别属性,键值对
order
number
-标注顺序
label
string
-标注类别

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
        }
      ]
    }
  ]
}