Rerun C++ SDK
Loading...
Searching...
No Matches
depth_image.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/build/re_type_definitions/rerun/archetypes/depth_image.def.rs".
3
4#pragma once
5
6#include "../archetype_utils.hpp"
7#include "../collection.hpp"
8#include "../component_batch.hpp"
9#include "../component_column.hpp"
10#include "../components/colormap.hpp"
11#include "../components/depth_meter.hpp"
12#include "../components/draw_order.hpp"
13#include "../components/fill_ratio.hpp"
14#include "../components/image_buffer.hpp"
15#include "../components/image_format.hpp"
16#include "../components/magnification_filter.hpp"
17#include "../components/value_range.hpp"
18#include "../image_utils.hpp"
19#include "../result.hpp"
20
21#include <cstdint>
22#include <optional>
23#include <utility>
24#include <vector>
25
26namespace rerun::archetypes {
27 /// **Archetype**: A depth image, i.e. as captured by a depth camera.
28 ///
29 /// Each pixel corresponds to a depth value in units specified by `components::DepthMeter`.
30 ///
31 /// Since the underlying `rerun::encodings::ImageBuffer` uses `rerun::Collection` internally,
32 /// data can be passed in without a copy from raw pointers or by reference from `std::vector`/`std::array`/c-arrays.
33 /// If needed, this "borrow-behavior" can be extended by defining your own `rerun::CollectionAdapter`.
34 ///
35 /// ## Example
36 ///
37 /// ### Depth to 3D example
38 /// ![image](https://static.rerun.io/depth_image_3d/924e9d4d6a39d63d4fdece82582855fdaa62d15e/full.png)
39 ///
40 /// ```cpp
41 /// #include <rerun.hpp>
42 ///
43 /// #include <algorithm> // fill_n
44 /// #include <vector>
45 ///
46 /// int main(int argc, char* argv[]) {
47 /// const auto rec = rerun::RecordingStream("rerun_example_depth_image_3d");
48 /// rec.spawn().exit_on_failure();
49 ///
50 /// // Create a synthetic depth image.
51 /// const int HEIGHT = 200;
52 /// const int WIDTH = 300;
53 /// std::vector<uint16_t> data(WIDTH * HEIGHT, 65535);
54 /// for (auto y = 50; y <150; ++y) {
55 /// std::fill_n(
56 /// data.begin() + y * WIDTH + 50,
57 /// 100,
58 /// static_cast<uint16_t>(20000)
59 /// );
60 /// }
61 /// for (auto y = 130; y <180; ++y) {
62 /// std::fill_n(
63 /// data.begin() + y * WIDTH + 100,
64 /// 180,
65 /// static_cast<uint16_t>(45000)
66 /// );
67 /// }
68 ///
69 /// // If we log a pinhole camera model, the depth gets automatically back-projected to 3D
70 /// rec.log(
71 /// "world/camera",
72 /// rerun::Pinhole::from_focal_length_and_resolution(
73 /// 200.0f,
74 /// {static_cast<float>(WIDTH), static_cast<float>(HEIGHT)}
75 /// )
76 /// );
77 ///
78 /// rec.log(
79 /// "world/camera/depth",
80 /// rerun::DepthImage(data.data(), {WIDTH, HEIGHT})
81 /// .with_meter(10000.0)
82 /// .with_colormap(rerun::Colormap::Viridis)
83 /// );
84 /// }
85 /// ```
86 struct DepthImage {
87 /// The raw depth image data.
88 std::optional<ComponentBatch> buffer;
89
90 /// The format of the image.
91 std::optional<ComponentBatch> format;
92
93 /// An optional floating point value that specifies how long a meter is in the native depth units.
94 ///
95 /// For instance: with uint16, perhaps meter=1000 which would mean you have millimeter precision
96 /// and a range of up to ~65 meters (2^16 / 1000).
97 ///
98 /// If omitted, the Viewer defaults to `1.0` for floating-point depth formats and `1000.0` for integer formats (millimeters).
99 ///
100 /// Note that the only effect on 2D views is the physical depth values shown when hovering the image.
101 /// In 3D views on the other hand, this affects where the points of the point cloud are placed.
102 std::optional<ComponentBatch> meter;
103
104 /// Colormap to use for rendering the depth image.
105 ///
106 /// If not set, the depth image will be rendered using the Turbo colormap.
107 std::optional<ComponentBatch> colormap;
108
109 /// The expected range of depth values.
110 ///
111 /// This is typically the expected range of valid values.
112 /// Everything outside of the range is clamped to the range for the purpose of colormpaping.
113 /// Note that point clouds generated from this image will still display all points, regardless of this range.
114 ///
115 /// If not specified, the range will be automatically estimated from the data.
116 /// Note that the Viewer may try to guess a wider range than the minimum/maximum of values
117 /// in the contents of the depth image.
118 /// E.g. if all values are positive, some bigger than 1.0 and all smaller than 255.0,
119 /// the Viewer will guess that the data likely came from an 8bit image, thus assuming a range of 0-255.
120 std::optional<ComponentBatch> depth_range;
121
122 /// Scale the radii of the points in the point cloud generated from this image.
123 ///
124 /// A fill ratio of 1.0 (the default) means that each point is as big as to touch the center of its neighbor
125 /// if it is at the same depth, leaving no gaps.
126 /// A fill ratio of 0.5 means that each point touches the edge of its neighbor if it has the same depth.
127 ///
128 /// TODO(#6744): This applies only to 3D views!
129 std::optional<ComponentBatch> point_fill_ratio;
130
131 /// An optional floating point value that specifies the 2D drawing order, used only if the depth image is shown as a 2D image.
132 ///
133 /// Objects with higher values are drawn on top of those with lower values.
134 /// Defaults to `-20.0`.
135 std::optional<ComponentBatch> draw_order;
136
137 /// Optional filter used when a texel is magnified (displayed larger than a screen pixel) in 2D views.
138 ///
139 /// The filter is applied to the scalar values *before* they are mapped to color via the colormap.
140 ///
141 /// Has no effect in 3D views.
142 std::optional<ComponentBatch> magnification_filter;
143
144 public:
145 /// The name of the archetype as used in `ComponentDescriptor`s.
146 static constexpr const char ArchetypeName[] = "rerun.archetypes.DepthImage";
147
148 /// `ComponentDescriptor` for the `buffer` field.
149 static constexpr auto Descriptor_buffer = ComponentDescriptor(
150 ArchetypeName, "DepthImage:buffer",
152 );
153 /// `ComponentDescriptor` for the `format` field.
154 static constexpr auto Descriptor_format = ComponentDescriptor(
155 ArchetypeName, "DepthImage:format",
157 );
158 /// `ComponentDescriptor` for the `meter` field.
159 static constexpr auto Descriptor_meter = ComponentDescriptor(
160 ArchetypeName, "DepthImage:meter",
162 );
163 /// `ComponentDescriptor` for the `colormap` field.
165 ArchetypeName, "DepthImage:colormap",
167 );
168 /// `ComponentDescriptor` for the `depth_range` field.
170 ArchetypeName, "DepthImage:depth_range",
172 );
173 /// `ComponentDescriptor` for the `point_fill_ratio` field.
175 ArchetypeName, "DepthImage:point_fill_ratio",
177 );
178 /// `ComponentDescriptor` for the `draw_order` field.
180 ArchetypeName, "DepthImage:draw_order",
182 );
183 /// `ComponentDescriptor` for the `magnification_filter` field.
185 ArchetypeName, "DepthImage:magnification_filter",
187 );
188
189 public: // START of extensions from depth_image_ext.cpp:
190 /// Constructs image from pointer + resolution, inferring the datatype from the pointer type.
191 ///
192 /// @param pixels The raw image data.
193 /// ⚠️ Does not take ownership of the data, the caller must ensure the data outlives the image.
194 /// The number of elements is assumed to be `W * H`.
195 /// @param resolution The resolution of the image as {width, height}.
196 template <typename TElement>
197 DepthImage(const TElement* pixels, WidthHeight resolution)
198 : DepthImage{
199 reinterpret_cast<const uint8_t*>(pixels), resolution, get_datatype(pixels)
200 } {}
201
202 /// Constructs image from pixel data + resolution with datatype inferred from the passed collection.
203 ///
204 /// @param pixels The raw image data.
205 /// If the data does not outlive the image, use `std::move` or create the `rerun::Collection`
206 /// explicitly ahead of time with `rerun::Collection::take_ownership`.
207 /// The length of the data should be `W * H`.
208 /// @param resolution The resolution of the image as {width, height}.
209 template <typename TElement>
211 : DepthImage{pixels.to_uint8(), resolution, get_datatype(pixels.data())} {}
212
213 /// Constructs image from pixel data + resolution with explicit datatype. Borrows data from a pointer (i.e. data must outlive the image!).
214 ///
215 /// @param bytes The raw image data.
216 /// ⚠️ Does not take ownership of the data, the caller must ensure the data outlives the image.
217 /// The byte size of the data is assumed to be `W * H * datatype.size`
218 /// @param resolution The resolution of the image as {width, height}.
219 /// @param datatype How the data should be interpreted.
220 DepthImage(const void* bytes, WidthHeight resolution, encodings::ChannelDatatype datatype)
221 : DepthImage{
222 Collection<uint8_t>::borrow(bytes, num_bytes(resolution, datatype)),
223 resolution,
224 datatype
225 } {}
226
227 /// Constructs image from pixel data + resolution + datatype.
228 ///
229 /// @param bytes The raw image data as bytes.
230 /// If the data does not outlive the image, use `std::move` or create the `rerun::Collection`
231 /// explicitly ahead of time with `rerun::Collection::take_ownership`.
232 /// The length of the data should be `W * H`.
233 /// @param resolution The resolution of the image as {width, height}.
234 /// @param datatype How the data should be interpreted.
237 ) {
238 auto image_format = encodings::ImageFormat{resolution, datatype};
239 if (bytes.size() != image_format.num_bytes()) {
240 Error(
241 ErrorCode::InvalidTensorDimension,
242 "DepthImage buffer has the wrong size. Got " + std::to_string(bytes.size()) +
243 " bytes, expected " + std::to_string(image_format.num_bytes())
244 )
245 .handle();
246 }
247 *this = std::move(*this).with_buffer(bytes).with_format(image_format);
248 }
249
250 // END of extensions from depth_image_ext.cpp, start of generated code:
251
252 public:
253 DepthImage() = default;
254 DepthImage(DepthImage&& other) = default;
255 DepthImage(const DepthImage& other) = default;
256 DepthImage& operator=(const DepthImage& other) = default;
257 DepthImage& operator=(DepthImage&& other) = default;
258
259 /// Update only some specific fields of a `DepthImage`.
261 return DepthImage();
262 }
263
264 /// Clear all the fields of a `DepthImage`.
266
267 /// The raw depth image data.
269 buffer = ComponentBatch::from_loggable(_buffer, Descriptor_buffer).value_or_throw();
270 return std::move(*this);
271 }
272
273 /// This method makes it possible to pack multiple `buffer` in a single component batch.
274 ///
275 /// This only makes sense when used in conjunction with `columns`. `with_buffer` should
276 /// be used when logging a single row's worth of data.
278 buffer = ComponentBatch::from_loggable(_buffer, Descriptor_buffer).value_or_throw();
279 return std::move(*this);
280 }
281
282 /// The format of the image.
284 format = ComponentBatch::from_loggable(_format, Descriptor_format).value_or_throw();
285 return std::move(*this);
286 }
287
288 /// This method makes it possible to pack multiple `format` in a single component batch.
289 ///
290 /// This only makes sense when used in conjunction with `columns`. `with_format` should
291 /// be used when logging a single row's worth of data.
293 format = ComponentBatch::from_loggable(_format, Descriptor_format).value_or_throw();
294 return std::move(*this);
295 }
296
297 /// An optional floating point value that specifies how long a meter is in the native depth units.
298 ///
299 /// For instance: with uint16, perhaps meter=1000 which would mean you have millimeter precision
300 /// and a range of up to ~65 meters (2^16 / 1000).
301 ///
302 /// If omitted, the Viewer defaults to `1.0` for floating-point depth formats and `1000.0` for integer formats (millimeters).
303 ///
304 /// Note that the only effect on 2D views is the physical depth values shown when hovering the image.
305 /// In 3D views on the other hand, this affects where the points of the point cloud are placed.
307 meter = ComponentBatch::from_loggable(_meter, Descriptor_meter).value_or_throw();
308 return std::move(*this);
309 }
310
311 /// This method makes it possible to pack multiple `meter` in a single component batch.
312 ///
313 /// This only makes sense when used in conjunction with `columns`. `with_meter` should
314 /// be used when logging a single row's worth of data.
316 meter = ComponentBatch::from_loggable(_meter, Descriptor_meter).value_or_throw();
317 return std::move(*this);
318 }
319
320 /// Colormap to use for rendering the depth image.
321 ///
322 /// If not set, the depth image will be rendered using the Turbo colormap.
324 colormap =
325 ComponentBatch::from_loggable(_colormap, Descriptor_colormap).value_or_throw();
326 return std::move(*this);
327 }
328
329 /// This method makes it possible to pack multiple `colormap` in a single component batch.
330 ///
331 /// This only makes sense when used in conjunction with `columns`. `with_colormap` should
332 /// be used when logging a single row's worth of data.
334 colormap =
335 ComponentBatch::from_loggable(_colormap, Descriptor_colormap).value_or_throw();
336 return std::move(*this);
337 }
338
339 /// The expected range of depth values.
340 ///
341 /// This is typically the expected range of valid values.
342 /// Everything outside of the range is clamped to the range for the purpose of colormpaping.
343 /// Note that point clouds generated from this image will still display all points, regardless of this range.
344 ///
345 /// If not specified, the range will be automatically estimated from the data.
346 /// Note that the Viewer may try to guess a wider range than the minimum/maximum of values
347 /// in the contents of the depth image.
348 /// E.g. if all values are positive, some bigger than 1.0 and all smaller than 255.0,
349 /// the Viewer will guess that the data likely came from an 8bit image, thus assuming a range of 0-255.
352 .value_or_throw();
353 return std::move(*this);
354 }
355
356 /// This method makes it possible to pack multiple `depth_range` in a single component batch.
357 ///
358 /// This only makes sense when used in conjunction with `columns`. `with_depth_range` should
359 /// be used when logging a single row's worth of data.
362 ) && {
364 .value_or_throw();
365 return std::move(*this);
366 }
367
368 /// Scale the radii of the points in the point cloud generated from this image.
369 ///
370 /// A fill ratio of 1.0 (the default) means that each point is as big as to touch the center of its neighbor
371 /// if it is at the same depth, leaving no gaps.
372 /// A fill ratio of 0.5 means that each point touches the edge of its neighbor if it has the same depth.
373 ///
374 /// TODO(#6744): This applies only to 3D views!
378 .value_or_throw();
379 return std::move(*this);
380 }
381
382 /// This method makes it possible to pack multiple `point_fill_ratio` in a single component batch.
383 ///
384 /// This only makes sense when used in conjunction with `columns`. `with_point_fill_ratio` should
385 /// be used when logging a single row's worth of data.
387 const Collection<rerun::components::FillRatio>& _point_fill_ratio
388 ) && {
391 .value_or_throw();
392 return std::move(*this);
393 }
394
395 /// An optional floating point value that specifies the 2D drawing order, used only if the depth image is shown as a 2D image.
396 ///
397 /// Objects with higher values are drawn on top of those with lower values.
398 /// Defaults to `-20.0`.
400 draw_order =
401 ComponentBatch::from_loggable(_draw_order, Descriptor_draw_order).value_or_throw();
402 return std::move(*this);
403 }
404
405 /// This method makes it possible to pack multiple `draw_order` in a single component batch.
406 ///
407 /// This only makes sense when used in conjunction with `columns`. `with_draw_order` should
408 /// be used when logging a single row's worth of data.
410 ) && {
411 draw_order =
412 ComponentBatch::from_loggable(_draw_order, Descriptor_draw_order).value_or_throw();
413 return std::move(*this);
414 }
415
416 /// Optional filter used when a texel is magnified (displayed larger than a screen pixel) in 2D views.
417 ///
418 /// The filter is applied to the scalar values *before* they are mapped to color via the colormap.
419 ///
420 /// Has no effect in 3D views.
422 const rerun::components::MagnificationFilter& _magnification_filter
423 ) && {
425 _magnification_filter,
427 )
428 .value_or_throw();
429 return std::move(*this);
430 }
431
432 /// This method makes it possible to pack multiple `magnification_filter` in a single component batch.
433 ///
434 /// This only makes sense when used in conjunction with `columns`. `with_magnification_filter` should
435 /// be used when logging a single row's worth of data.
437 const Collection<rerun::components::MagnificationFilter>& _magnification_filter
438 ) && {
440 _magnification_filter,
442 )
443 .value_or_throw();
444 return std::move(*this);
445 }
446
447 /// Partitions the component data into multiple sub-batches.
448 ///
449 /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
450 /// instead, via `ComponentBatch::partitioned`.
451 ///
452 /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
453 ///
454 /// The specified `lengths` must sum to the total length of the component batch.
456 return detail::partition_batches(
457 {&buffer,
458 &format,
459 &meter,
460 &colormap,
463 &draw_order,
465 lengths_
466 )
467 .value_or_throw();
468 }
469
470 /// Partitions the component data into unit-length sub-batches.
471 ///
472 /// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
473 /// where `n` is automatically guessed.
475 return detail::partition_batches_of_unit_length({&buffer,
476 &format,
477 &meter,
478 &colormap,
481 &draw_order,
483 .value_or_throw();
484 }
485 };
486
487} // namespace rerun::archetypes
488
489namespace rerun {
490 /// \private
491 template <typename T>
492 struct AsComponents;
493
494 /// \private
495 template <>
496 struct AsComponents<archetypes::DepthImage> {
497 /// Serialize all set component batches.
498 static Result<Collection<ComponentBatch>> as_batches(const archetypes::DepthImage& archetype
499 ) {
500 return detail::collect_batches(
501 {&archetype.buffer,
502 &archetype.format,
503 &archetype.meter,
504 &archetype.colormap,
505 &archetype.depth_range,
506 &archetype.point_fill_ratio,
507 &archetype.draw_order,
508 &archetype.magnification_filter}
509 );
510 }
511 };
512} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
size_t size() const
Returns the number of instances in this collection.
Definition collection.hpp:295
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:104
void handle() const
Handle this error based on the set log handler.
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:90
Colormap
Component: Colormap for mapping scalar values within a given range to a color.
Definition colormap.hpp:28
MagnificationFilter
Component: Filter used when a single texel/pixel of an image is displayed larger than a single screen...
Definition magnification_filter.hpp:27
ChannelDatatype
Encoding: The innermost datatype of an image.
Definition channel_datatype.hpp:26
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:26
Collection< TElement > borrow(const TElement *data, size_t num_instances=1)
Borrows binary data into a Collection from a pointer.
Definition collection.hpp:453
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &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:16
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
The width and height of an image.
Definition image_utils.hpp:13
Archetype: A depth image, i.e.
Definition depth_image.hpp:86
DepthImage with_colormap(const rerun::components::Colormap &_colormap) &&
Colormap to use for rendering the depth image.
Definition depth_image.hpp:323
DepthImage with_meter(const rerun::components::DepthMeter &_meter) &&
An optional floating point value that specifies how long a meter is in the native depth units.
Definition depth_image.hpp:306
std::optional< ComponentBatch > format
The format of the image.
Definition depth_image.hpp:91
static constexpr auto Descriptor_depth_range
ComponentDescriptor for the depth_range field.
Definition depth_image.hpp:169
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition depth_image.hpp:146
DepthImage with_many_magnification_filter(const Collection< rerun::components::MagnificationFilter > &_magnification_filter) &&
This method makes it possible to pack multiple magnification_filter in a single component batch.
Definition depth_image.hpp:436
DepthImage with_magnification_filter(const rerun::components::MagnificationFilter &_magnification_filter) &&
Optional filter used when a texel is magnified (displayed larger than a screen pixel) in 2D views.
Definition depth_image.hpp:421
DepthImage with_point_fill_ratio(const rerun::components::FillRatio &_point_fill_ratio) &&
Scale the radii of the points in the point cloud generated from this image.
Definition depth_image.hpp:375
static constexpr auto Descriptor_point_fill_ratio
ComponentDescriptor for the point_fill_ratio field.
Definition depth_image.hpp:174
std::optional< ComponentBatch > magnification_filter
Optional filter used when a texel is magnified (displayed larger than a screen pixel) in 2D views.
Definition depth_image.hpp:142
DepthImage with_many_draw_order(const Collection< rerun::components::DrawOrder > &_draw_order) &&
This method makes it possible to pack multiple draw_order in a single component batch.
Definition depth_image.hpp:409
static DepthImage update_fields()
Update only some specific fields of a DepthImage.
Definition depth_image.hpp:260
std::optional< ComponentBatch > colormap
Colormap to use for rendering the depth image.
Definition depth_image.hpp:107
std::optional< ComponentBatch > depth_range
The expected range of depth values.
Definition depth_image.hpp:120
static constexpr auto Descriptor_format
ComponentDescriptor for the format field.
Definition depth_image.hpp:154
DepthImage with_depth_range(const rerun::components::ValueRange &_depth_range) &&
The expected range of depth values.
Definition depth_image.hpp:350
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition depth_image.hpp:455
static constexpr auto Descriptor_colormap
ComponentDescriptor for the colormap field.
Definition depth_image.hpp:164
std::optional< ComponentBatch > meter
An optional floating point value that specifies how long a meter is in the native depth units.
Definition depth_image.hpp:102
DepthImage(Collection< TElement > pixels, WidthHeight resolution)
Constructs image from pixel data + resolution with datatype inferred from the passed collection.
Definition depth_image.hpp:210
std::optional< ComponentBatch > draw_order
An optional floating point value that specifies the 2D drawing order, used only if the depth image is...
Definition depth_image.hpp:135
static constexpr auto Descriptor_draw_order
ComponentDescriptor for the draw_order field.
Definition depth_image.hpp:179
DepthImage with_many_point_fill_ratio(const Collection< rerun::components::FillRatio > &_point_fill_ratio) &&
This method makes it possible to pack multiple point_fill_ratio in a single component batch.
Definition depth_image.hpp:386
static constexpr auto Descriptor_buffer
ComponentDescriptor for the buffer field.
Definition depth_image.hpp:149
DepthImage(Collection< uint8_t > bytes, WidthHeight resolution, encodings::ChannelDatatype datatype)
Constructs image from pixel data + resolution + datatype.
Definition depth_image.hpp:235
DepthImage with_many_colormap(const Collection< rerun::components::Colormap > &_colormap) &&
This method makes it possible to pack multiple colormap in a single component batch.
Definition depth_image.hpp:333
DepthImage(const TElement *pixels, WidthHeight resolution)
Constructs image from pointer + resolution, inferring the datatype from the pointer type.
Definition depth_image.hpp:197
DepthImage with_many_meter(const Collection< rerun::components::DepthMeter > &_meter) &&
This method makes it possible to pack multiple meter in a single component batch.
Definition depth_image.hpp:315
std::optional< ComponentBatch > point_fill_ratio
Scale the radii of the points in the point cloud generated from this image.
Definition depth_image.hpp:129
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition depth_image.hpp:474
DepthImage with_format(const rerun::components::ImageFormat &_format) &&
The format of the image.
Definition depth_image.hpp:283
DepthImage with_many_depth_range(const Collection< rerun::components::ValueRange > &_depth_range) &&
This method makes it possible to pack multiple depth_range in a single component batch.
Definition depth_image.hpp:360
DepthImage with_buffer(const rerun::components::ImageBuffer &_buffer) &&
The raw depth image data.
Definition depth_image.hpp:268
DepthImage with_many_format(const Collection< rerun::components::ImageFormat > &_format) &&
This method makes it possible to pack multiple format in a single component batch.
Definition depth_image.hpp:292
DepthImage with_draw_order(const rerun::components::DrawOrder &_draw_order) &&
An optional floating point value that specifies the 2D drawing order, used only if the depth image is...
Definition depth_image.hpp:399
static constexpr auto Descriptor_magnification_filter
ComponentDescriptor for the magnification_filter field.
Definition depth_image.hpp:184
static DepthImage clear_fields()
Clear all the fields of a DepthImage.
DepthImage with_many_buffer(const Collection< rerun::components::ImageBuffer > &_buffer) &&
This method makes it possible to pack multiple buffer in a single component batch.
Definition depth_image.hpp:277
DepthImage(const void *bytes, WidthHeight resolution, encodings::ChannelDatatype datatype)
Constructs image from pixel data + resolution with explicit datatype.
Definition depth_image.hpp:220
static constexpr auto Descriptor_meter
ComponentDescriptor for the meter field.
Definition depth_image.hpp:159
std::optional< ComponentBatch > buffer
The raw depth image data.
Definition depth_image.hpp:88
Component: The world->depth map scaling factor.
Definition depth_meter.hpp:24
Component: Draw order of 2D elements.
Definition draw_order.hpp:30
Component: How much a primitive fills out the available space.
Definition fill_ratio.hpp:19
Component: A buffer that is known to store image data.
Definition image_buffer.hpp:18
Component: The metadata describing the contents of a components::ImageBuffer.
Definition image_format.hpp:14
Component: Range of expected or valid values, specifying a lower and upper bound.
Definition value_range.hpp:18
Encoding: The metadata describing the contents of a components::ImageBuffer.
Definition image_format.hpp:25