optris::sdk::RegionFrameState
One region's per-frame record.
Public attributes
region_id
uint64_t region_id = 0
transforms
std::vector< std::array< float, 6 > > transforms
One 2x3 affine per shape leaf, in tree order.
Always populated in memory, like definition below and for the same reason: a record is the previous frame's baseline, so a baseline that has had its matrices blanked can no longer say whether a region moved. Blanking it meant a STATIC region wrote its matrices on every second frame rather than once -- frame 1 wrote them, frame 2 compared equal and blanked, frame 3 compared a size-0 baseline against a size-1 current, read that as "a
different number of leaves", and wrote them again, for ever. Whether they go into the file is transforms_changed.
Empty only for a region with no shape leaves, and -- on the read path -- for a record that carried no m key, where transforms_changed is false and these two say the same thing about the same document.
transforms_changed
bool transforms_changed = false
Whether transforms goes into this frame's record.
Set the way definition_changed is: true on a region's first frame, and afterwards only when a leaf actually moved. On the read path it is m having been present.
min_c
float min_c = 0.0F
max_c
float max_c = 0.0F
mean_c
float mean_c = 0.0F
coverage
float coverage = 1.0F
alarm
AlarmState alarm = AlarmState::kUnknown
valid
bool valid = false
definition
std::string definition
The region's whole definition, as SerializeRegions() writes it.
A recording used to carry the definitions ONCE, captured when it opened, and then only the per-frame readings above. So a region drawn while recording had its samples written against an id the file had never heard of, and playback dropped them: the area simply never appeared. Same for a region whose shape, kind, aperture or name was changed mid-take.
Carried here so a frame can say "and this is what that region IS now". Always populated in memory, so an unchanged region can be recognised as unchanged; only written to the file when it differs from the frame before, so a static area still costs a couple of dozen bytes a frame.
definition_changed
bool definition_changed = false
Whether definition goes into this frame's record.