Archetype: The annotation context provides additional information on how to display entities.
Entities can use components::ClassId
s and components::KeypointId
s to provide annotations, and the labels and colors will be looked up in the appropriate annotation context. We use the first annotation context we find in the path-hierarchy when searching up through the ancestors of a given entity path.
See also datatypes::ClassDescription
.
Example
Segmentation
#include <rerun.hpp>
#include <algorithm>
#include <vector>
int main() {
rec.spawn().exit_on_failure();
rec.log_static(
"segmentation",
})
);
const int HEIGHT = 200;
const int WIDTH = 300;
std::vector<uint8_t> data(WIDTH * HEIGHT, 0);
for (auto y = 50; y <100; ++y) {
std::fill_n(data.begin() + y * WIDTH + 50, 70, static_cast<uint8_t>(1));
}
for (auto y = 100; y <180; ++y) {
std::fill_n(data.begin() + y * WIDTH + 130, 150, static_cast<uint8_t>(2));
}
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:60
Archetype: The annotation context provides additional information on how to display entities.
Definition annotation_context.hpp:65
Archetype: An image made up of integer components::ClassIds.
Definition segmentation_image.hpp:74
Datatype: Annotation info annotating a class id or key-point id.
Definition annotation_info.hpp:25
Datatype: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
Definition rgba32.hpp:27