optris::sdk::rec::RoiGeometry
Geometry of one region, in normalized [0, 1] frame coordinates with the origin at the top-left.
Deliberately not typed against today's model: Deliberately not typed against today's model shape and the region type below are strings rather than enums, and styling is carried as an opaque JSON object. The ROI model is being redesigned, and freezing a wire format against the current Roi/MeasurementField split would have to be unpicked. A reader that meets a shape it does not know skips the region rather than failing the file.
Public attributes
shape
std::string shape
"point", "rect", "circle", "ellipse", "line" or "polygon".
rect
std::array< float, 4 > rect {0.0f, 0.0f, 0.0f, 0.0f}
Meaning follows shape: rect/ellipse [x, y, w, h]; circle [cx, cy, diameter, 0]; line [x0, y0, x1, y1]; point [x, y, 0, 0]. Unused for "polygon".
vertices
std::vector< std::array< float, 2 > > vertices
Vertices for "polygon", otherwise empty.