optris::sdk::rec::SnapshotRendering
The colorized picture to make the primary image of a snapshot, and what a reader needs to say what its colours meant.
Why the pixels come in rather than being computed here: Why the pixels come in rather than being computed here Snapshot is stateless and knows nothing about palettes, colour scales or overlays -- deciding what a pixel should look like is the live pipeline's job, and it has already done it for the screen. Handing the finished picture down means the file shows exactly what the operator was looking at, rather than a second rendering that could disagree with the first.
Leave SnapshotInfo::rendering unset and the snapshot keeps its 16-bit greyscale primary image. There is deliberately no default palette: with no live view there is no picture to reproduce, and inventing one would put the file in colours nobody chose.
Public attributes
rgb
std::vector< uint8_t > rgb
Packed RGB, 3 bytes per pixel, row-major, no padding. Must be exactly width * height * 3 bytes.
width
uint32_t width = 0
Width of rgb in pixels. Must match the frame being saved.
height
uint32_t height = 0
Height of rgb in pixels. Must match the frame being saved.
palette
std::string palette
Palette name as GetPaletteName() spells it -- "Iron", "IronHi", "GrayBW", "GrayWB", "Jet" and so on -- or "custom". The same spelling a recording uses; see rec::RenderMeta::palette for the full list and for what "custom" obliges a reader to do.
Note: A snapshot does not carry the 240 colours behind "custom"; a recording does, in FileMetadata::palette_colors. The reason is that a still already has them: a colour snapshot is rgb, drawn with those colours, so the picture a reader shows is the picture the operator saw whether or not it can name the palette. A recording's video track is measurements, and a reader has to redraw it.
palette_name
std::string palette_name
Display name of an application-supplied palette. Empty for a built-in one.
range_min_c
std::optional< float > range_min_c
The cold end of the colour scale, in the SDK's temperature unit (Celsius unless SetTemperatureUnit() chose Fahrenheit). The file stores Celsius whichever unit it was written in.
range_max_c
std::optional< float > range_max_c
The warm end of the colour scale, in the SDK's temperature unit.
auto_scale_mode
std::string auto_scale_mode
"percentile", "absolute", "sigma1", "sigma3", or empty when a fixed range was in force.
overlays
std::optional< bool > overlays
Whether region and blob overlays are painted into rgb.
thermal_data_reliable
std::optional< bool > thermal_data_reliable
Whether the detector had settled when the frame was taken.