Struct CircleAnnotation

Struct Documentation

struct CircleAnnotation

A circle annotation on a 2D image.

Public Functions

FoxgloveError encode(uint8_t *ptr, size_t len, size_t *encoded_len)

Encoded the CircleAnnotation as protobuf to the provided buffer.

On success, writes the serialized length to *encoded_len. If the provided buffer has insufficient capacity, writes the required capacity to *encoded_len and returns FoxgloveError::BufferTooShort. If the message cannot be encoded, writes the reason to stderr and returns FoxgloveError::EncodeError.

Parameters:
  • ptr – the destination buffer. must point to at least len valid bytes.

  • len – the length of the destination buffer.

  • encoded_len – where the serialized length or required capacity will be written to.

Public Members

std::optional<Timestamp> timestamp

Timestamp of circle.

std::optional<Point2> position

Center of the circle in 2D image coordinates (pixels).

The coordinate uses the top-left corner of the top-left pixel of the image as the origin.

double diameter = 0

Circle diameter in pixels.

double thickness = 0

Line thickness in pixels.

std::optional<Color> fill_color

Fill color.

std::optional<Color> outline_color

Outline color.

Public Static Functions

static Schema schema()

Get the CircleAnnotation schema.

The schema data returned is statically allocated.