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 "../component_descriptor.hpp"
7#include "../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 /// \private
14 template <typename T>
15 class NumericBuilder;
16
17 class Array;
18 class DataType;
19 class UInt8Type;
20 using UInt8Builder = NumericBuilder<UInt8Type>;
21} // namespace arrow
22
23namespace rerun::datatypes {
24 /// **Datatype**: Specified what color components are present in an `archetypes::Image`.
25 ///
26 /// This combined with `datatypes::ChannelDatatype` determines the pixel format of an image.
27 enum class ColorModel : uint8_t {
28
29 /// Grayscale luminance intencity/brightness/value, sometimes called `Y`
30 L = 1,
31
32 /// Red, Green, Blue
33 RGB = 2,
34
35 /// Red, Green, Blue, Alpha
36 RGBA = 3,
37
38 /// Blue, Green, Red
39 BGR = 4,
40
41 /// Blue, Green, Red, Alpha
42 BGRA = 5,
43 };
44} // namespace rerun::datatypes
45
46namespace rerun {
47 template <typename T>
48 struct Loggable;
49
50 /// \private
51 template <>
52 struct Loggable<datatypes::ColorModel> {
53 static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.ColorModel";
54
55 /// Returns the arrow data type this type corresponds to.
56 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
57
58 /// Serializes an array of `rerun::datatypes::ColorModel` into an arrow array.
59 static Result<std::shared_ptr<arrow::Array>> to_arrow(
60 const datatypes::ColorModel* instances, size_t num_instances
61 );
62
63 /// Fills an arrow array builder with an array of this type.
64 static rerun::Error fill_arrow_array_builder(
65 arrow::UInt8Builder* builder, const datatypes::ColorModel* elements, size_t num_elements
66 );
67 };
68} // 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:83
ColorModel
Datatype: Specified what color components are present in an archetypes::Image.
Definition color_model.hpp:27
@ 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:23