optris::sdk::CanvasControl
Where this camera's frame sits in view space: turned, zoomed and moved, without changing a single measured temperature.
Two things change once a canvas is placed, and nothing changes before it, because the default is a pass-through:
- The RGBA callback delivers the canvas composite rather than the sensor-native frame, at the canvas's extent. The thermal, raw and energy callbacks are untouched and stay sensor-native -- the composite resamples, and resampled thermal data is exactly what this design exists to avoid.
- Regions are read as canvas coordinates. They stay where they are on the canvas while the picture moves under them, and are measured by mapping back through the inverse placement into sensor space, where the original pixels are. A region that should follow the picture instead is one whose geometry moves with the placement;
ToCanvas()incanvas.hdoes that in one call.
A region that ends up partly off the sensor still measures, over the part that had data, and says so through RegionStats::coverage.
A handle, not an owner. Reached through Imager::Canvas().
Public functions
CanvasControl
CanvasControl(ClientBridge *bridge)
Set
void Set(Canvas canvas)
Get
auto Get() const -> Canvas
EditPlacement
auto EditPlacement(size_t index, const std::function< void(Placement &)> &mutate) -> bool
Edit the placement in place, the way Regions().Edit() edits a region: under the same lock the frame thread reads it, so dragging while frames arrive is safe. index is the camera -- zero for this imager, and the reason this takes an index at all is that a placement is per-camera.
Returns: false if there is no placement at index.