OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Rust API referencev12.0

ClippedWindow

pub struct ClippedWindow

Where a clipped video format's window sits on the detector.

The fastest formats are not the whole detector. A PI 640's 640x120 @ 125 Hz reads 120 of its 480 rows, and that strip is a window onto the full readout; it can be moved, and there is no reason the interesting part of the scene should be in the middle. The SDK centred it when it parsed the format definition and then offered nothing: no position, no setter, no limits.

Read it with Camera::clipped_window, which answers on every camera; clipped is false on a mode that reads the whole detector, which is most of them.

Examples

Look at the bottom of the detector rather than the middle:

# fn main() -> optris_sdk::Result<()> {
use optris_sdk::Camera;

let mut camera = Camera::open()?;
let window = camera.clipped_window()?;
if window.clipped {
    camera.set_clipped_window(window.x, window.max_y)?;
}
# Ok(())
# }

ClippedWindow — fields

clipped: bool

Whether the active mode is a clipped format at all. Every other field is zero when this is false, and Camera::set_clipped_window refuses.

x: i32

Left edge within the full readout, in detector pixels.

y: i32

Top edge, same units.

max_x: i32

Largest ClippedWindow::x this mode accepts. Usually zero: a fast format drops rows rather than columns, so the window moves vertically only.

max_y: i32

Largest ClippedWindow::y, under the same rule.

device_width: i32

Width of the full readout this window sits in. Not the frame width, which is the smaller of the two wherever ClippedWindow::max_x is non-zero.

device_height: i32

Height of the full readout.