Thermal Camera SDK 11.3.0
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
ThermalFrame.h
Go to the documentation of this file.
1// Copyright (c) 2008-2026 Optris GmbH & Co. KG
2
10
11#pragma once
12
13#include "otcsdk/Api.h"
14#include "otcsdk/common/Frame.h"
16
17
18namespace optris
19{
20
22class ThermalFrame : public Frame
23{
24public:
27
32
37
39 OTC_SDK_API ~ThermalFrame() override = default;
40
41
51 float getTemperature(int index) const;
52
63 float getTemperature(int x, int y) const;
64
71
72
81 OTC_SDK_API void copyTemperaturesTo(float* destination, int size) const noexcept;
82
91 OTC_SDK_API void setData(const unsigned short* source, TemperaturePrecision precision);
92
102 OTC_SDK_API void setFromRawData(const void* source, TemperaturePrecision precision);
103
111 TemperatureConverter getConverter() const noexcept;
112
113
114private:
115 TemperatureConverter _converter;
116};
117
118
119// Inline implementations
120inline float ThermalFrame::getTemperature(int index) const noexcept(false)
121{
122 return _converter.toTemperature(getValue(index));
123}
124
125inline float ThermalFrame::getTemperature(int x, int y) const noexcept(false)
126{
127 return _converter.toTemperature(getValue(x, y));
128}
129
131{
132 return _converter.getPrecision();
133}
134
136{
137 return _converter;
138}
139
140} // namespace optris
Contains defines controlling the Windows DLL export and import of symbols.
#define OTC_SDK_API
Only needed when working with Windows DLLs.
Definition Api.h:65
Contains a class representing a data frame received from a device.
Contains a class that converts between temperatures in the internal SDK format and in °C.
OTC_SDK_API unsigned short getValue(int index) const noexcept(false)
Returns the frame data value at the given index.
OTC_SDK_API Frame() noexcept
Constructor.
Converts temperatures in °C to and from their internal SDK representation.
Definition TemperatureConverter.h:23
OTC_SDK_API void setData(const unsigned short *source, TemperaturePrecision precision)
Sets the thermal frame data values.
OTC_SDK_API ThermalFrame & operator=(const ThermalFrame &)=default
Copy assignment.
float getTemperature(int index) const
Returns the temperature in in °C at the given index.
Definition ThermalFrame.h:120
TemperaturePrecision getTemperaturePrecision() const noexcept
Returns the precision of the temperatures stored in the frame.
Definition ThermalFrame.h:130
OTC_SDK_API ThermalFrame(const ThermalFrame &)=default
Copy constructor.
OTC_SDK_API ThermalFrame(ThermalFrame &&)=default
Move constructor.
OTC_SDK_API ~ThermalFrame() override=default
Destructor.
OTC_SDK_API ThermalFrame & operator=(ThermalFrame &&)=default
Move assignment.
OTC_SDK_API void copyTemperaturesTo(float *destination, int size) const noexcept
Copies the thermal data as degree Celsius to a one-dimensional array or vector.
TemperatureConverter getConverter() const noexcept
Returns the temperature converter.
Definition ThermalFrame.h:135
OTC_SDK_API void setFromRawData(const void *source, TemperaturePrecision precision)
Sets the thermal frame values from raw data.
OTC_SDK_API ThermalFrame()=default
Constructor.
Main SDK namespace.
Definition AlarmChannel.h:21
TemperaturePrecision
Represents the available temperature precisions.
Definition TemperaturePrecision.h:32