6#include "../collection.hpp"
7#include "../component_batch.hpp"
8#include "../component_column.hpp"
9#include "../components/blob.hpp"
10#include "../components/draw_order.hpp"
11#include "../components/magnification_filter.hpp"
12#include "../components/media_type.hpp"
13#include "../components/opacity.hpp"
14#include "../result.hpp"
54 std::optional<ComponentBatch>
blob;
81 static constexpr const char ArchetypeName[] =
"rerun.archetypes.EncodedImage";
118 std::optional<rerun::components::MediaType>
media_type = {}
124 return encoded_image;
130 EncodedImage() =
default;
131 EncodedImage(EncodedImage&& other) =
default;
132 EncodedImage(
const EncodedImage& other) =
default;
133 EncodedImage& operator=(
const EncodedImage& other) =
default;
134 EncodedImage& operator=(EncodedImage&& other) =
default;
147 return std::move(*
this);
156 return std::move(*
this);
170 return std::move(*
this);
182 return std::move(*
this);
190 return std::move(*
this);
199 return std::move(*
this);
208 return std::move(*
this);
220 return std::move(*
this);
228 _magnification_filter,
232 return std::move(*
this);
243 _magnification_filter,
247 return std::move(*
this);
271 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 built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:76
MagnificationFilter
Component: Filter used when a single texel/pixel of an image is displayed larger than a single screen...
Definition magnification_filter.hpp:27
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)
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
Archetype: An image encoded as e.g.
Definition encoded_image.hpp:52
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.
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.
Definition encoded_image.hpp:215
EncodedImage with_draw_order(const rerun::components::DrawOrder &_draw_order) &&
An optional floating point value that specifies the 2D drawing order.
Definition encoded_image.hpp:205
static constexpr auto Descriptor_media_type
ComponentDescriptor for the media_type field.
Definition encoded_image.hpp:88
std::optional< ComponentBatch > draw_order
An optional floating point value that specifies the 2D drawing order.
Definition encoded_image.hpp:74
std::optional< ComponentBatch > opacity
Opacity of the image, useful for layering several media.
Definition encoded_image.hpp:69
std::optional< ComponentBatch > media_type
The Media Type of the asset.
Definition encoded_image.hpp:64
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition encoded_image.hpp:81
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
static constexpr auto Descriptor_draw_order
ComponentDescriptor for the draw_order field.
Definition encoded_image.hpp:98
EncodedImage with_many_blob(const Collection< rerun::components::Blob > &_blob) &&
This method makes it possible to pack multiple blob in a single component batch.
Definition encoded_image.hpp:154
std::optional< ComponentBatch > blob
The encoded content of some image file, e.g. a PNG or JPEG.
Definition encoded_image.hpp:54
static EncodedImage clear_fields()
Clear all the fields of a EncodedImage.
std::optional< ComponentBatch > magnification_filter
Optional filter used when a texel is magnified (displayed larger than a screen pixel).
Definition encoded_image.hpp:77
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
EncodedImage with_media_type(const rerun::components::MediaType &_media_type) &&
The Media Type of the asset.
Definition encoded_image.hpp:167
static EncodedImage update_fields()
Update only some specific fields of a EncodedImage.
Definition encoded_image.hpp:137
EncodedImage with_many_opacity(const Collection< rerun::components::Opacity > &_opacity) &&
This method makes it possible to pack multiple opacity in a single component batch.
Definition encoded_image.hpp:197
EncodedImage with_magnification_filter(const rerun::components::MagnificationFilter &_magnification_filter) &&
Optional filter used when a texel is magnified (displayed larger than a screen pixel).
Definition encoded_image.hpp:224
static constexpr auto Descriptor_blob
ComponentDescriptor for the blob field.
Definition encoded_image.hpp:84
EncodedImage with_opacity(const rerun::components::Opacity &_opacity) &&
Opacity of the image, useful for layering several media.
Definition encoded_image.hpp:188
EncodedImage with_blob(const rerun::components::Blob &_blob) &&
The encoded content of some image file, e.g. a PNG or JPEG.
Definition encoded_image.hpp:145
static constexpr auto Descriptor_opacity
ComponentDescriptor for the opacity field.
Definition encoded_image.hpp:93
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.
Definition encoded_image.hpp:116
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.
Definition encoded_image.hpp:177
static constexpr auto Descriptor_magnification_filter
ComponentDescriptor for the magnification_filter field.
Definition encoded_image.hpp:103
EncodedImage 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 encoded_image.hpp:239
Component: A binary blob of data.
Definition blob.hpp:16
Component: Draw order of 2D elements.
Definition draw_order.hpp:19
Component: Degree of transparency ranging from 0.0 (fully transparent) to 1.0 (fully opaque).
Definition opacity.hpp:17