6#include "../../blueprint/components/tensor_dimension_index_slider.hpp"
7#include "../../collection.hpp"
8#include "../../component_batch.hpp"
9#include "../../component_column.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"
21namespace rerun::blueprint::archetypes {
27 std::optional<ComponentBatch>
width;
32 std::optional<ComponentBatch>
height;
44 std::optional<ComponentBatch>
slider;
47 static constexpr const char IndicatorComponentName[] =
48 "rerun.blueprint.components.TensorSliceSelectionIndicator";
54 "rerun.blueprint.archetypes.TensorSliceSelection";
98 return std::move(*
this);
107 return std::move(*
this);
117 return std::move(*
this);
129 return std::move(*
this);
153 template <
typename T>
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:23
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor=rerun::Loggable< T >::Descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:14
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: Specifies a 2D slice of a tensor.
Definition tensor_slice_selection.hpp:23
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition tensor_slice_selection.hpp:53
std::optional< ComponentBatch > width
Which dimension to map to width.
Definition tensor_slice_selection.hpp:27
std::optional< ComponentBatch > indices
Selected indices for all other dimensions.
Definition tensor_slice_selection.hpp:37
static constexpr auto Descriptor_slider
ComponentDescriptor for the slider field.
Definition tensor_slice_selection.hpp:72
TensorSliceSelection with_height(const rerun::components::TensorHeightDimension &_height) &&
Which dimension to map to height.
Definition tensor_slice_selection.hpp:104
static constexpr auto Descriptor_indices
ComponentDescriptor for the indices field.
Definition tensor_slice_selection.hpp:67
TensorSliceSelection with_width(const rerun::components::TensorWidthDimension &_width) &&
Which dimension to map to width.
Definition tensor_slice_selection.hpp:96
TensorSliceSelection with_slider(const Collection< rerun::blueprint::components::TensorDimensionIndexSlider > &_slider) &&
Any dimension listed here will have a slider for the index.
Definition tensor_slice_selection.hpp:125
static constexpr auto Descriptor_width
ComponentDescriptor for the width field.
Definition tensor_slice_selection.hpp:57
TensorSliceSelection with_indices(const Collection< rerun::components::TensorDimensionIndexSelection > &_indices) &&
Selected indices for all other dimensions.
Definition tensor_slice_selection.hpp:113
static TensorSliceSelection update_fields()
Update only some specific fields of a TensorSliceSelection.
Definition tensor_slice_selection.hpp:86
static constexpr auto Descriptor_height
ComponentDescriptor for the height field.
Definition tensor_slice_selection.hpp:62
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
static TensorSliceSelection clear_fields()
Clear all the fields of a TensorSliceSelection.
std::optional< ComponentBatch > height
Which dimension to map to height.
Definition tensor_slice_selection.hpp:32
std::optional< ComponentBatch > slider
Any dimension listed here will have a slider for the index.
Definition tensor_slice_selection.hpp:44
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32
Component: Specifies which dimension to use for height.
Definition tensor_height_dimension.hpp:15
Component: Specifies which dimension to use for width.
Definition tensor_width_dimension.hpp:15