optris::sdk::rec::FileMetadata
The shared metadata document.
Its temperatures are always Celsius (and its differences kelvin), including those of its nested records (CaptureMeta, RadiationMeta, RangeMeta, SceneMeta, render, flag_policy, lossy) and of FrameRecord: this is the file's own record, which means the same on every machine, and it does not follow SetTemperatureUnit(). ParseMetadata() and SerializeMetadata() read and write it as it is. For the same values in the SDK's temperature unit, use the readers above it: Snapshot::ReadInfo(), optris::sdk::Player::GetRecordedRender(), GetRecordedFlagPolicy() and GetRecordedLossy(), and a replayed frame's ThermalFrame getters and Telemetry.
Public attributes
otc_format
int otc_format = kOtcFormatVersion
Schema version. A reader that does not know it should say so rather than guess.
encoding
PixelEncoding encoding = PixelEncoding::kTemperature
What a pixel in the image means.
unit
std::string unit
The unit scale and offset are expressed in. "K" for a temperature file, absent otherwise.
scale
std::optional< double > scale
How wide one count is, in unit. Together with offset it is the whole rule for turning a sample into a measurement:
value = pixel * scale + offset
Absent for a float temperature file, which carries the value directly, and for raw ADU.
offset
std::optional< double > offset
Where the grid's zero sits, in unit. Absent means zero.
That default is what every still image the SDK has written relies on: a snapshot's grid is anchored at absolute zero, so pixel * scale is the whole rule there and this field never appears on one.
A recording is the case it exists for. Its video track carries the SDK's internal int16, (celsius * 10) + 1000 (0.1 K per count with the grid's zero at 173.15 K) and no scale alone can express that. Before this field a recording declared encoding: "temperature" and then said nothing whatever about its samples, so a reader following the schema had to guess and a reader following the code had to know the SDK by heart.
A recording that declares no unit and no scale: A recording that declares no unit and no scale It was written before this field existed, and the rule above is the one it was written with. That is the documented fallback rather than an invitation to guess: a recording has always carried the internal int16 and still does. Nothing about the pixels changed when this field arrived, only what the document is willing to say about them.
adu_bit_depth
std::optional< uint8_t > adu_bit_depth
Valid detector bits for a raw-ADU file, e.g. 14. Absent otherwise.
width
uint32_t width = 0
Image width in pixels.
Image dimensions. A reader checks these against the image it actually decoded; a mismatch means the file was tampered with.
height
uint32_t height = 0
Image height in pixels.
software
std::string software
What wrote the file, e.g. "OTC.SDK 12.0.1".
device
DeviceMeta device
Which camera produced it.
capture
CaptureMeta capture
The frame's own telemetry.
radiation
RadiationMeta radiation
Radiometry in force at capture.
range
RangeMeta range
The camera's configured range.
scene
SceneMeta scene
What was actually in the scene.
render
std::optional< RenderMeta > render
How the colour image was drawn.
In a snapshot: absent when the primary image is the raw 16-bit greyscale one, and otherwise the complete answer -- a snapshot is one frame, so there is nothing for it to disagree with.
In a recording: the state as this file opened. A recording is not one frame, and both the palette and the colour scale can move while it runs, so this is a starting point and not a summary. Every frame for which it is wrong carries its own Telemetry::render, so a reader that prefers the frame's block over this one is never reading a value that stood for something that varied. Written for the same reason the device and the radiometry are written here: it is reachable from the otc-meta.json attachment alone, without decoding the video.
Absent in any recording written before this existed, and a reader meeting one behaves exactly as it did before.
palette_colors
std::vector< optris::sdk::Rgb24 > palette_colors
The colours behind a render.palette of "custom".
Exactly optris::sdk::kPaletteColorCount entries, coldest first, or empty. Empty is the normal case: a built-in palette is named in render.palette and its colours are the SDK's, so carrying them would be carrying a constant.
Why the colours are here and not in RenderMeta: Why the colours are here and not in RenderMeta RenderMeta is written once per file and once per frame, on every frame the file-level block would be wrong for. A colour table is 720 bytes; beside every frame that is the cost the whole design exists to avoid, which is why a recording used to carry the name "custom" and nothing else. Here it is paid once for the file, which is why the 720 bytes are affordable.
What it covers, exactly: What it covers, exactly These are the colours that were in force when this file opened, and they belong to the file-level render block. They are not a lookup table and not a history: a frame carrying a render block of its own is a frame for which the file-level block was wrong, and these colours are not its answer.
The limit is the container's, not a choice. A Matroska header is written when the file opens and no attachment or metadata document can be added afterwards, so a palette adopted at second forty cannot be put into a header that went down at second zero. A segmented recording opens a header per segment, so each segment carries the palette in force at its own start.
The half a reader can see, and the half it cannot: The half a reader can see, and the half it cannot Switching to a custom palette with a different palette_name makes the per-frame block differ from the file-level one, so those frames carry their own block and a reader can tell that these colours stopped applying. Switching to different colours under the same name is invisible in the file; the two blocks compare equal, so no per-frame block is written. CustomPalette::name is documented as identifying nothing, so an application that changes its colours should change the name with them if it wants the change to be legible to a reader.
The cover's colours are these colours: The cover's colours are these colours CoverMeta::render can also say "custom", and when it does this is the table behind it: the recorder draws the cover from this field. There is one table per file and no second copy beside the cover, which is the point -- the two used to come from separate hand-offs and only the cover ever got the real colours.
rois
std::vector< RoiDefinition > rois
The measuring regions as they were configured.
attachments
std::vector< AttachmentMeta > attachments
One entry per attachment, readable without decoding the container the payloads live in.
cover
std::optional< CoverMeta > cover
What the cover image shows and what drew it. See CoverMeta. Absent when the file carries no cover.
flag_policy
std::optional< FlagPolicyMeta > flag_policy
Whether the shutter was held back while this was recorded. See FlagPolicyMeta, which explains why a recording has to say so.
Absent when the policy was FlagWhileRecording::kUse, which is the default and every recording written before the setting existed. At this level it carries only while_recording and override_drift_c -- what was asked for. What actually happened is on the per-frame track, because the header is written before the first frame and cannot know yet.
lossy
std::optional< LossyMeta > lossy
What was done to the samples that a lossless recording would not have done. See LossyMeta.
Absent means lossless, which is every recording this SDK has ever written by default and every one written before the field existed. The recorder fills this in by itself from the stream configuration -- a caller that asks for StreamConfig:: quantize_counts or StreamConfig::jpeg_quality does not also have to remember to declare it, because a lossy file that does not say so is the one outcome worth ruling out mechanically.
series
std::optional< SeriesMeta > series
Where this file sits in a multipart recording, when it is part of one. Filled by the recorder per part, not by the caller. See SeriesMeta -- in particular that absent means a whole recording.
description
std::string description
Free text from the caller.
extra_json
std::string extra_json
Caller-supplied JSON object, merged into the document at the top level. Keys already used by this schema are not overwritten. Empty or invalid JSON is ignored.