Rerun C++ SDK
Loading...
Searching...
No Matches
tensor_scalar_mapping.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/blueprint/archetypes/tensor_scalar_mapping.fbs".
3
4#pragma once
5
6#include "../../collection.hpp"
7#include "../../compiler_utils.hpp"
8#include "../../component_batch.hpp"
9#include "../../components/colormap.hpp"
10#include "../../components/gamma_correction.hpp"
11#include "../../components/magnification_filter.hpp"
12#include "../../indicator_component.hpp"
13#include "../../result.hpp"
14
15#include <cstdint>
16#include <optional>
17#include <utility>
18#include <vector>
19
20namespace rerun::blueprint::archetypes {
21 /// **Archetype**: Configures how tensor scalars are mapped to color.
23 /// Filter used when zooming in on the tensor.
24 ///
25 /// Note that the filter is applied to the scalar values *before* they are mapped to color.
26 std::optional<rerun::components::MagnificationFilter> mag_filter;
27
28 /// How scalar values map to colors.
29 std::optional<rerun::components::Colormap> colormap;
30
31 /// Gamma exponent applied to normalized values before mapping to color.
32 ///
33 /// Raises the normalized values to the power of this value before mapping to color.
34 /// Acts like an inverse brightness. Defaults to 1.0.
35 std::optional<rerun::components::GammaCorrection> gamma;
36
37 public:
38 static constexpr const char IndicatorComponentName[] =
39 "rerun.blueprint.components.TensorScalarMappingIndicator";
40
41 /// Indicator component, used to identify the archetype when converting to a list of components.
43
44 public:
45 TensorScalarMapping() = default;
47
48 /// Filter used when zooming in on the tensor.
49 ///
50 /// Note that the filter is applied to the scalar values *before* they are mapped to color.
52 mag_filter = std::move(_mag_filter);
53 // See: https://github.com/rerun-io/rerun/issues/4027
54 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
55 }
56
57 /// How scalar values map to colors.
59 colormap = std::move(_colormap);
60 // See: https://github.com/rerun-io/rerun/issues/4027
61 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
62 }
63
64 /// Gamma exponent applied to normalized values before mapping to color.
65 ///
66 /// Raises the normalized values to the power of this value before mapping to color.
67 /// Acts like an inverse brightness. Defaults to 1.0.
69 gamma = std::move(_gamma);
70 // See: https://github.com/rerun-io/rerun/issues/4027
71 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
72 }
73 };
74
75} // namespace rerun::blueprint::archetypes
76
77namespace rerun {
78 /// \private
79 template <typename T>
80 struct AsComponents;
81
82 /// \private
83 template <>
84 struct AsComponents<blueprint::archetypes::TensorScalarMapping> {
85 /// Serialize all set component batches.
86 static Result<std::vector<ComponentBatch>> serialize(
88 );
89 };
90} // namespace rerun
A class for representing either a usable value, or an error.
Definition result.hpp:14
Colormap
Component: Colormap for mapping scalar values within a given range to a color.
Definition colormap.hpp:28
MagnificationFilter
Component: Filter used when magnifying an image/texture such that a single pixel/texel is displayed a...
Definition magnification_filter.hpp:24
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Archetype: Configures how tensor scalars are mapped to color.
Definition tensor_scalar_mapping.hpp:22
std::optional< rerun::components::Colormap > colormap
How scalar values map to colors.
Definition tensor_scalar_mapping.hpp:29
TensorScalarMapping with_gamma(rerun::components::GammaCorrection _gamma) &&
Gamma exponent applied to normalized values before mapping to color.
Definition tensor_scalar_mapping.hpp:68
TensorScalarMapping with_colormap(rerun::components::Colormap _colormap) &&
How scalar values map to colors.
Definition tensor_scalar_mapping.hpp:58
TensorScalarMapping with_mag_filter(rerun::components::MagnificationFilter _mag_filter) &&
Filter used when zooming in on the tensor.
Definition tensor_scalar_mapping.hpp:51
std::optional< rerun::components::GammaCorrection > gamma
Gamma exponent applied to normalized values before mapping to color.
Definition tensor_scalar_mapping.hpp:35
std::optional< rerun::components::MagnificationFilter > mag_filter
Filter used when zooming in on the tensor.
Definition tensor_scalar_mapping.hpp:26
Component: A gamma correction value to be used with a scalar value or color.
Definition gamma_correction.hpp:20
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30