Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::datatypes::ImageFormat Struct Reference

Datatype: The metadata describing the contents of a components::ImageBuffer. More...

#include <rerun/datatypes/image_format.hpp>

Public Member Functions

 ImageFormat (rerun::WidthHeight resolution, datatypes::PixelFormat pixel_format_)
 From a specific pixel format.
 
 ImageFormat (rerun::WidthHeight resolution, datatypes::ChannelDatatype datatype_)
 Create a new image format for depth or segmentation images with the given resolution and datatype.
 
 ImageFormat (rerun::WidthHeight resolution, datatypes::ColorModel color_model_, datatypes::ChannelDatatype datatype_)
 
size_t num_bytes () const
 How many bytes will this image occupy?
 

Public Attributes

uint32_t width
 The width of the image in pixels.
 
uint32_t height
 The height of the image in pixels.
 
std::optional< rerun::datatypes::PixelFormatpixel_format
 Used mainly for chroma downsampled formats and differing number of bits per channel.
 
std::optional< rerun::datatypes::ColorModelcolor_model
 L, RGB, RGBA, …
 
std::optional< rerun::datatypes::ChannelDatatypechannel_datatype
 The data type of each channel (e.g.
 

Detailed Description

Datatype: The metadata describing the contents of a components::ImageBuffer.

Member Data Documentation

◆ pixel_format

std::optional<rerun::datatypes::PixelFormat> rerun::datatypes::ImageFormat::pixel_format

Used mainly for chroma downsampled formats and differing number of bits per channel.

If specified, this takes precedence over both datatypes::ColorModel and datatypes::ChannelDatatype (which are ignored).

◆ color_model

std::optional<rerun::datatypes::ColorModel> rerun::datatypes::ImageFormat::color_model

L, RGB, RGBA, …

Also requires a datatypes::ChannelDatatype to fully specify the pixel format.

◆ channel_datatype

std::optional<rerun::datatypes::ChannelDatatype> rerun::datatypes::ImageFormat::channel_datatype

The data type of each channel (e.g.

the red channel) of the image data (U8, F16, …).

Also requires a datatypes::ColorModel to fully specify the pixel format.


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