Rerun C++ SDK
|
Archetype: A depth image. More...
#include <rerun/archetypes/depth_image.hpp>
Public Types | |
using | IndicatorComponent = components::IndicatorComponent< IndicatorComponentName > |
Indicator component, used to identify the archetype when converting to a list of components. | |
Public Member Functions | |
DepthImage (Collection< datatypes::TensorDimension > shape, datatypes::TensorBuffer buffer) | |
New depth image from height/width and tensor buffer. | |
DepthImage (components::TensorData data_) | |
New depth image from tensor data. | |
template<typename TElement > | |
DepthImage (Collection< datatypes::TensorDimension > shape, const TElement *data_) | |
New depth image from dimensions and pointer to depth image data. | |
DepthImage (DepthImage &&other)=default | |
DepthImage | with_meter (rerun::components::DepthMeter _meter) && |
An optional floating point value that specifies how long a meter is in the native depth units. | |
DepthImage | with_draw_order (rerun::components::DrawOrder _draw_order) && |
An optional floating point value that specifies the 2D drawing order. | |
size_t | num_instances () const |
Returns the number of primary instances of this archetype. | |
Public Attributes | |
rerun::components::TensorData | data |
The depth-image data. Should always be a rank-2 tensor. | |
std::optional< rerun::components::DepthMeter > | meter |
An optional floating point value that specifies how long a meter is in the native depth units. | |
std::optional< rerun::components::DrawOrder > | draw_order |
An optional floating point value that specifies the 2D drawing order. | |
Static Public Attributes | |
static constexpr const char | IndicatorComponentName [] |
Archetype: A depth image.
The shape of the TensorData
must be mappable to an HxW
tensor. Each pixel corresponds to a depth value in units specified by meter
.
Since the underlying rerun::datatypes::TensorData
uses rerun::Collection
internally, data can be passed in without a copy from raw pointers or by reference from std::vector
/std::array
/c-arrays. If needed, this "borrow-behavior" can be extended by defining your own rerun::CollectionAdapter
.
|
inline |
New depth image from height/width and tensor buffer.
shape | Shape of the image. Calls Error::handle() if the shape is not rank 2. Sets the dimension names to "height" and "width" if they are not specified. |
buffer | The tensor buffer containing the depth image data. |
|
explicit |
New depth image from tensor data.
data_ | The tensor buffer containing the depth image data. Sets the dimension names to "height" and "width" if they are not specified. Calls Error::handle() if the shape is not rank 2. |
|
inlineexplicit |
New depth image from dimensions and pointer to depth image data.
Type must be one of the types supported by rerun::datatypes::TensorData
.
shape | Shape of the image. Calls Error::handle() if the shape is not rank 2. Sets the dimension names to "height", "width" and "channel" if they are not specified. Determines the number of elements expected to be in data . |
data_ | Target of the pointer must outlive the archetype. |
|
inline |
An optional floating point value that specifies how long a meter is in the native depth units.
For instance: with uint16, perhaps meter=1000 which would mean you have millimeter precision and a range of up to ~65 meters (2^16 / 1000).
|
inline |
An optional floating point value that specifies the 2D drawing order.
Objects with higher values are drawn on top of those with lower values.
std::optional<rerun::components::DepthMeter> rerun::archetypes::DepthImage::meter |
An optional floating point value that specifies how long a meter is in the native depth units.
For instance: with uint16, perhaps meter=1000 which would mean you have millimeter precision and a range of up to ~65 meters (2^16 / 1000).
std::optional<rerun::components::DrawOrder> rerun::archetypes::DepthImage::draw_order |
An optional floating point value that specifies the 2D drawing order.
Objects with higher values are drawn on top of those with lower values.
|
staticconstexpr |