OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — legacy C++ API referencev12.0

These are the pre-v12 classes, kept so existing code keeps building. New code should use the modern API — see Migration Guide: v11 to v12.

optris::TemperatureRegion

Characterizes a rectangular region by the indexes of the upper left and the lower right corners along with an associated temperature.

Note that the origin of coordinates is located in upper left corner with the x-axis pointing right and the y-axis pointing downwards.

+---> x
|
v     1-----------+
y     |           |
      |           |
      +-----------2

=> x1 <= x2 & y1 <= y2

Public attributes

temperature

float temperature

Associated temperature in °C.

x1

int x1

X index of the upper left corner.

y1

int y1

Y index of the upper left corner.

x2

int x2

X index of the lower right corner.

y2

int y2

Y index of the lower right corner.

Public functions

TemperatureRegion

TemperatureRegion() noexcept

Constructor.

TemperatureRegion

TemperatureRegion(int x1, int y1, int x2, int y2) noexcept

Constructor.

Parameters

Name Description
x1 x index of the upper left corner.
y1 y index of the upper left corner.
x2 x index of the lower right corner.
y2 y index of the lower right corner.

reset

void reset() noexcept

Resets the temperature and the coordinates of the corners.

fitsInRectangle

bool fitsInRectangle(int width, int height, int padding=0) const noexcept

Returns whether the region fits within a rectangle of the given dimensions.

Parameters

Name Description
width in pixels of the rectangle to fit the region in.
height in pixels of the rectangle to fit the region in.
padding in pixels applied to the region in all directions during the check.

Returns: true if the region fits in the given rectangle. False otherwise.