Rerun C++ SDK
Loading...
Searching...
No Matches
color_model.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/datatypes/color_model.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7
8#include <cstdint>
9#include <memory>
10
11namespace arrow {
12 /// \private
13 template <typename T>
14 class NumericBuilder;
15
16 class Array;
17 class DataType;
18 class UInt8Type;
19 using UInt8Builder = NumericBuilder<UInt8Type>;
20} // namespace arrow
21
22namespace rerun::datatypes {
23 /// **Datatype**: Specified what color components are present in an `archetypes::Image`.
24 ///
25 /// This combined with `datatypes::ChannelDatatype` determines the pixel format of an image.
26 enum class ColorModel : uint8_t {
27
28 /// Grayscale luminance intencity/brightness/value, sometimes called `Y`
29 L = 1,
30
31 /// Red, Green, Blue
32 RGB = 2,
33
34 /// Red, Green, Blue, Alpha
35 RGBA = 3,
36
37 /// Blue, Green, Red
38 BGR = 4,
39
40 /// Blue, Green, Red, Alpha
41 BGRA = 5,
42 };
43} // namespace rerun::datatypes
44
45namespace rerun {
46 template <typename T>
47 struct Loggable;
48
49 /// \private
50 template <>
51 struct Loggable<datatypes::ColorModel> {
52 static constexpr const char Name[] = "rerun.datatypes.ColorModel";
53
54 /// Returns the arrow data type this type corresponds to.
55 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
56
57 /// Serializes an array of `rerun::datatypes::ColorModel` into an arrow array.
58 static Result<std::shared_ptr<arrow::Array>> to_arrow(
59 const datatypes::ColorModel* instances, size_t num_instances
60 );
61
62 /// Fills an arrow array builder with an array of this type.
63 static rerun::Error fill_arrow_array_builder(
64 arrow::UInt8Builder* builder, const datatypes::ColorModel* elements, size_t num_elements
65 );
66 };
67} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:79
ColorModel
Datatype: Specified what color components are present in an archetypes::Image.
Definition color_model.hpp:26
@ BGR
Blue, Green, Red.
@ BGRA
Blue, Green, Red, Alpha.
@ RGB
Red, Green, Blue.
@ L
Grayscale luminance intencity/brightness/value, sometimes called Y
@ RGBA
Red, Green, Blue, Alpha.
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22