|
Rerun C++ SDK
|
Archetype: An image encoded as e.g. More...
#include <rerun/archetypes/encoded_image.hpp>
Public Member Functions | |
| EncodedImage (EncodedImage &&other)=default | |
| EncodedImage (const EncodedImage &other)=default | |
| EncodedImage & | operator= (const EncodedImage &other)=default |
| EncodedImage & | operator= (EncodedImage &&other)=default |
| EncodedImage | with_blob (const rerun::components::Blob &_blob) && |
| The encoded content of some image file, e.g. a PNG or JPEG. | |
| EncodedImage | with_many_blob (const Collection< rerun::components::Blob > &_blob) && |
This method makes it possible to pack multiple blob in a single component batch. | |
| EncodedImage | with_media_type (const rerun::components::MediaType &_media_type) && |
| The Media Type of the asset. | |
| EncodedImage | with_many_media_type (const Collection< rerun::components::MediaType > &_media_type) && |
This method makes it possible to pack multiple media_type in a single component batch. | |
| EncodedImage | with_opacity (const rerun::components::Opacity &_opacity) && |
| Opacity of the image, useful for layering several media. | |
| EncodedImage | with_many_opacity (const Collection< rerun::components::Opacity > &_opacity) && |
This method makes it possible to pack multiple opacity in a single component batch. | |
| EncodedImage | with_draw_order (const rerun::components::DrawOrder &_draw_order) && |
| An optional floating point value that specifies the 2D drawing order. | |
| EncodedImage | 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. | |
| Collection< ComponentColumn > | columns (const Collection< uint32_t > &lengths_) |
| Partitions the component data into multiple sub-batches. | |
| Collection< ComponentColumn > | columns () |
| Partitions the component data into unit-length sub-batches. | |
Static Public Member Functions | |
| static Result< EncodedImage > | from_file (const std::filesystem::path &filepath) |
Create a new EncodedImage from the contents of a file on disk, e.g. a PNG or JPEG. | |
| static EncodedImage | from_bytes (rerun::Collection< uint8_t > image_contents, std::optional< rerun::components::MediaType > media_type={}) |
Create a new EncodedImage from the contents of an image file, like a PNG or JPEG. | |
| static EncodedImage | update_fields () |
Update only some specific fields of a EncodedImage. | |
| static EncodedImage | clear_fields () |
Clear all the fields of a EncodedImage. | |
Public Attributes | |
| std::optional< ComponentBatch > | blob |
| The encoded content of some image file, e.g. a PNG or JPEG. | |
| std::optional< ComponentBatch > | media_type |
| The Media Type of the asset. | |
| std::optional< ComponentBatch > | opacity |
| Opacity of the image, useful for layering several media. | |
| std::optional< ComponentBatch > | draw_order |
| An optional floating point value that specifies the 2D drawing order. | |
Static Public Attributes | |
| static constexpr const char | ArchetypeName [] = "rerun.archetypes.EncodedImage" |
The name of the archetype as used in ComponentDescriptors. | |
| static constexpr auto | Descriptor_blob |
ComponentDescriptor for the blob field. | |
| static constexpr auto | Descriptor_media_type |
ComponentDescriptor for the media_type field. | |
| static constexpr auto | Descriptor_opacity |
ComponentDescriptor for the opacity field. | |
| static constexpr auto | Descriptor_draw_order |
ComponentDescriptor for the draw_order field. | |
Archetype: An image encoded as e.g.
a JPEG or PNG.
Rerun also supports uncompressed images with the archetypes::Image. For images that refer to video frames see archetypes::VideoFrameReference.
|
inlinestatic |
Create a new EncodedImage from the contents of an image file, like a PNG or JPEG.
If no MediaType is specified, the Rerun Viewer will try to guess one from the data at render-time. If it can't, rendering will fail with an error.
|
inline |
This method makes it possible to pack multiple blob in a single component batch.
This only makes sense when used in conjunction with columns. with_blob should be used when logging a single row's worth of data.
|
inline |
The Media Type of the asset.
Supported values:
image/jpegimage/pngIf omitted, the viewer will try to guess from the data blob. If it cannot guess, it won't be able to render the asset.
|
inline |
This method makes it possible to pack multiple media_type in a single component batch.
This only makes sense when used in conjunction with columns. with_media_type should be used when logging a single row's worth of data.
|
inline |
Opacity of the image, useful for layering several media.
Defaults to 1.0 (fully opaque).
|
inline |
This method makes it possible to pack multiple opacity in a single component batch.
This only makes sense when used in conjunction with columns. with_opacity should be used when logging a single row's worth of data.
|
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.
|
inline |
This method makes it possible to pack multiple draw_order in a single component batch.
This only makes sense when used in conjunction with columns. with_draw_order should be used when logging a single row's worth of data.
| Collection< ComponentColumn > rerun::archetypes::EncodedImage::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.
| Collection< ComponentColumn > rerun::archetypes::EncodedImage::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.
| std::optional<ComponentBatch> rerun::archetypes::EncodedImage::media_type |
The Media Type of the asset.
Supported values:
image/jpegimage/pngIf omitted, the viewer will try to guess from the data blob. If it cannot guess, it won't be able to render the asset.
| std::optional<ComponentBatch> rerun::archetypes::EncodedImage::opacity |
Opacity of the image, useful for layering several media.
Defaults to 1.0 (fully opaque).
| std::optional<ComponentBatch> rerun::archetypes::EncodedImage::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 |
ComponentDescriptor for the blob field.
|
staticconstexpr |
ComponentDescriptor for the media_type field.
|
staticconstexpr |
ComponentDescriptor for the opacity field.
|
staticconstexpr |
ComponentDescriptor for the draw_order field.