Thermal Camera SDK 10.1.0
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
ThermalFrame.h
Go to the documentation of this file.
1// Copyright (c) 2008-2025 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
80 OTC_SDK_API void copyTemperaturesTo(float* destination, int size) const noexcept;
81
90 OTC_SDK_API void setData(const unsigned short* source, TemperaturePrecision precision);
91
101 OTC_SDK_API void setFromRawData(const void* source, TemperaturePrecision precision);
102
110 TemperatureConverter getConverter() const noexcept;
111
117 ThermalFrame clone() const noexcept;
118
119
120private:
121 TemperatureConverter _converter;
122};
123
124
125// Inline implementations
126inline float ThermalFrame::getTemperature(int index) const noexcept(false)
127{
128 return _converter.toTemperature(getValue(index));
129}
130
131inline float ThermalFrame::getTemperature(int x, int y) const noexcept(false)
132{
133 return _converter.toTemperature(getValue(x, y));
134}
135
137{
138 return _converter.getPrecision();
139}
140
142{
143 return _converter;
144}
145
146inline ThermalFrame ThermalFrame::clone() const noexcept
147{
148 return ThermalFrame{*this};
149}
150
151} // 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.
ThermalFrame clone() const noexcept
Returns a complete copy of this frame.
Definition ThermalFrame.h:146
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:126
TemperaturePrecision getTemperaturePrecision() const noexcept
Returns the precision of the temperatures stored in the frame.
Definition ThermalFrame.h:136
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:141
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 DeviceInfo.h:23
TemperaturePrecision
Represents the available temperature precisions.
Definition TemperaturePrecision.h:32