Rerun C++ SDK
Loading...
Searching...
No Matches
tensor_slice_selection.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_slice_selection.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/tensor_dimension_index_slider.hpp"
7#include "../../collection.hpp"
8#include "../../compiler_utils.hpp"
9#include "../../component_batch.hpp"
10#include "../../components/tensor_dimension_index_selection.hpp"
11#include "../../components/tensor_height_dimension.hpp"
12#include "../../components/tensor_width_dimension.hpp"
13#include "../../indicator_component.hpp"
14#include "../../result.hpp"
15
16#include <cstdint>
17#include <optional>
18#include <utility>
19#include <vector>
20
21namespace rerun::blueprint::archetypes {
22 /// **Archetype**: Specifies a 2D slice of a tensor.
24 /// Which dimension to map to width.
25 ///
26 /// If not specified, the height will be determined automatically based on the name and index of the dimension.
27 std::optional<rerun::components::TensorWidthDimension> width;
28
29 /// Which dimension to map to height.
30 ///
31 /// If not specified, the height will be determined automatically based on the name and index of the dimension.
32 std::optional<rerun::components::TensorHeightDimension> height;
33
34 /// Selected indices for all other dimensions.
35 ///
36 /// If any of the here listed dimensions is equal to `width` or `height`, it will be ignored.
37 std::optional<Collection<rerun::components::TensorDimensionIndexSelection>> indices;
38
39 /// Any dimension listed here will have a slider for the index.
40 ///
41 /// Edits to the sliders will directly manipulate dimensions on the `indices` list.
42 /// If any of the here listed dimensions is equal to `width` or `height`, it will be ignored.
43 /// If not specified, adds slides for any dimension in `indices`.
44 std::optional<Collection<rerun::blueprint::components::TensorDimensionIndexSlider>> slider;
45
46 public:
47 static constexpr const char IndicatorComponentName[] =
48 "rerun.blueprint.components.TensorSliceSelectionIndicator";
49
50 /// Indicator component, used to identify the archetype when converting to a list of components.
52
53 public:
54 TensorSliceSelection() = default;
56
57 /// Which dimension to map to width.
58 ///
59 /// If not specified, the height will be determined automatically based on the name and index of the dimension.
61 width = std::move(_width);
62 // See: https://github.com/rerun-io/rerun/issues/4027
63 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
64 }
65
66 /// Which dimension to map to height.
67 ///
68 /// If not specified, the height will be determined automatically based on the name and index of the dimension.
70 height = std::move(_height);
71 // See: https://github.com/rerun-io/rerun/issues/4027
72 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
73 }
74
75 /// Selected indices for all other dimensions.
76 ///
77 /// If any of the here listed dimensions is equal to `width` or `height`, it will be ignored.
80 ) && {
81 indices = std::move(_indices);
82 // See: https://github.com/rerun-io/rerun/issues/4027
83 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
84 }
85
86 /// Any dimension listed here will have a slider for the index.
87 ///
88 /// Edits to the sliders will directly manipulate dimensions on the `indices` list.
89 /// If any of the here listed dimensions is equal to `width` or `height`, it will be ignored.
90 /// If not specified, adds slides for any dimension in `indices`.
93 ) && {
94 slider = std::move(_slider);
95 // See: https://github.com/rerun-io/rerun/issues/4027
96 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
97 }
98 };
99
100} // namespace rerun::blueprint::archetypes
101
102namespace rerun {
103 /// \private
104 template <typename T>
105 struct AsComponents;
106
107 /// \private
108 template <>
109 struct AsComponents<blueprint::archetypes::TensorSliceSelection> {
110 /// Serialize all set component batches.
111 static Result<std::vector<ComponentBatch>> serialize(
113 );
114 };
115} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A class for representing either a usable value, or an error.
Definition result.hpp:14
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Archetype: Specifies a 2D slice of a tensor.
Definition tensor_slice_selection.hpp:23
std::optional< rerun::components::TensorWidthDimension > width
Which dimension to map to width.
Definition tensor_slice_selection.hpp:27
std::optional< Collection< rerun::blueprint::components::TensorDimensionIndexSlider > > slider
Any dimension listed here will have a slider for the index.
Definition tensor_slice_selection.hpp:44
std::optional< rerun::components::TensorHeightDimension > height
Which dimension to map to height.
Definition tensor_slice_selection.hpp:32
TensorSliceSelection with_width(rerun::components::TensorWidthDimension _width) &&
Which dimension to map to width.
Definition tensor_slice_selection.hpp:60
TensorSliceSelection with_slider(Collection< rerun::blueprint::components::TensorDimensionIndexSlider > _slider) &&
Any dimension listed here will have a slider for the index.
Definition tensor_slice_selection.hpp:91
TensorSliceSelection with_height(rerun::components::TensorHeightDimension _height) &&
Which dimension to map to height.
Definition tensor_slice_selection.hpp:69
TensorSliceSelection with_indices(Collection< rerun::components::TensorDimensionIndexSelection > _indices) &&
Selected indices for all other dimensions.
Definition tensor_slice_selection.hpp:78
std::optional< Collection< rerun::components::TensorDimensionIndexSelection > > indices
Selected indices for all other dimensions.
Definition tensor_slice_selection.hpp:37
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30
Component: Specifies which dimension to use for height.
Definition tensor_height_dimension.hpp:14
Component: Specifies which dimension to use for width.
Definition tensor_width_dimension.hpp:14