Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::blueprint::archetypes::TensorScalarMapping Struct Reference

Archetype: Configures how tensor scalars are mapped to color. More...

#include <rerun/blueprint/archetypes/tensor_scalar_mapping.hpp>

Public Types

using IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName >
 Indicator component, used to identify the archetype when converting to a list of components.
 

Public Member Functions

 TensorScalarMapping (TensorScalarMapping &&other)=default
 
 TensorScalarMapping (const TensorScalarMapping &other)=default
 
TensorScalarMappingoperator= (const TensorScalarMapping &other)=default
 
TensorScalarMappingoperator= (TensorScalarMapping &&other)=default
 
TensorScalarMapping with_mag_filter (const rerun::components::MagnificationFilter &_mag_filter) &&
 Filter used when zooming in on the tensor.
 
TensorScalarMapping with_colormap (const rerun::components::Colormap &_colormap) &&
 How scalar values map to colors.
 
TensorScalarMapping with_gamma (const rerun::components::GammaCorrection &_gamma) &&
 Gamma exponent applied to normalized values before mapping to color.
 
Collection< ComponentColumncolumns (const Collection< uint32_t > &lengths_)
 Partitions the component data into multiple sub-batches.
 
Collection< ComponentColumncolumns ()
 Partitions the component data into unit-length sub-batches.
 

Static Public Member Functions

static TensorScalarMapping update_fields ()
 Update only some specific fields of a TensorScalarMapping.
 
static TensorScalarMapping clear_fields ()
 Clear all the fields of a TensorScalarMapping.
 

Public Attributes

std::optional< ComponentBatchmag_filter
 Filter used when zooming in on the tensor.
 
std::optional< ComponentBatchcolormap
 How scalar values map to colors.
 
std::optional< ComponentBatchgamma
 Gamma exponent applied to normalized values before mapping to color.
 

Static Public Attributes

static constexpr const char IndicatorComponentName []
 
static constexpr const char ArchetypeName []
 The name of the archetype as used in ComponentDescriptors.
 
static constexpr auto Descriptor_mag_filter
 ComponentDescriptor for the mag_filter field.
 
static constexpr auto Descriptor_colormap
 ComponentDescriptor for the colormap field.
 
static constexpr auto Descriptor_gamma
 ComponentDescriptor for the gamma field.
 

Detailed Description

Archetype: Configures how tensor scalars are mapped to color.

This type is unstable and may change significantly in a way that the data won't be backwards compatible.

Member Function Documentation

◆ with_mag_filter()

TensorScalarMapping rerun::blueprint::archetypes::TensorScalarMapping::with_mag_filter ( const rerun::components::MagnificationFilter _mag_filter) &&
inline

Filter used when zooming in on the tensor.

Note that the filter is applied to the scalar values before they are mapped to color.

◆ with_gamma()

TensorScalarMapping rerun::blueprint::archetypes::TensorScalarMapping::with_gamma ( const rerun::components::GammaCorrection _gamma) &&
inline

Gamma exponent applied to normalized values before mapping to color.

Raises the normalized values to the power of this value before mapping to color. Acts like an inverse brightness. Defaults to 1.0.

The final value for display is set as: colormap( ((value - data_display_range.min) / (data_display_range.max - data_display_range.min)) ** gamma )

◆ columns() [1/2]

Collection< ComponentColumn > rerun::blueprint::archetypes::TensorScalarMapping::columns ( const Collection< uint32_t > &  lengths_)

Partitions the component data into multiple sub-batches.

Specifically, this transforms the existing ComponentBatch data into ComponentColumns instead, via ComponentBatch::partitioned.

This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.

The specified lengths must sum to the total length of the component batch.

◆ columns() [2/2]

Collection< ComponentColumn > rerun::blueprint::archetypes::TensorScalarMapping::columns ( )

Partitions the component data into unit-length sub-batches.

This is semantically similar to calling columns with std::vector<uint32_t>(n, 1), where n is automatically guessed.

Member Data Documentation

◆ mag_filter

std::optional<ComponentBatch> rerun::blueprint::archetypes::TensorScalarMapping::mag_filter

Filter used when zooming in on the tensor.

Note that the filter is applied to the scalar values before they are mapped to color.

◆ gamma

std::optional<ComponentBatch> rerun::blueprint::archetypes::TensorScalarMapping::gamma

Gamma exponent applied to normalized values before mapping to color.

Raises the normalized values to the power of this value before mapping to color. Acts like an inverse brightness. Defaults to 1.0.

The final value for display is set as: colormap( ((value - data_display_range.min) / (data_display_range.max - data_display_range.min)) ** gamma )

◆ IndicatorComponentName

constexpr const char rerun::blueprint::archetypes::TensorScalarMapping::IndicatorComponentName[]
staticconstexpr
Initial value:
=
"rerun.blueprint.components.TensorScalarMappingIndicator"

◆ ArchetypeName

constexpr const char rerun::blueprint::archetypes::TensorScalarMapping::ArchetypeName[]
staticconstexpr
Initial value:
=
"rerun.blueprint.archetypes.TensorScalarMapping"

The name of the archetype as used in ComponentDescriptors.

◆ Descriptor_mag_filter

constexpr auto rerun::blueprint::archetypes::TensorScalarMapping::Descriptor_mag_filter
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "mag_filter",
Loggable<rerun::components::MagnificationFilter>::Descriptor.component_name
)
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition tensor_scalar_mapping.hpp:50

ComponentDescriptor for the mag_filter field.

◆ Descriptor_colormap

constexpr auto rerun::blueprint::archetypes::TensorScalarMapping::Descriptor_colormap
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "colormap",
Loggable<rerun::components::Colormap>::Descriptor.component_name
)

ComponentDescriptor for the colormap field.

◆ Descriptor_gamma

constexpr auto rerun::blueprint::archetypes::TensorScalarMapping::Descriptor_gamma
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "gamma",
Loggable<rerun::components::GammaCorrection>::Descriptor.component_name
)

ComponentDescriptor for the gamma field.


The documentation for this struct was generated from the following file: