Thermal Camera SDK 10.1.1
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
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
118 ThermalFrame clone() const noexcept;
119
120
121private:
122 TemperatureConverter _converter;
123};
124
125
126// Inline implementations
127inline float ThermalFrame::getTemperature(int index) const noexcept(false)
128{
129 return _converter.toTemperature(getValue(index));
130}
131
132inline float ThermalFrame::getTemperature(int x, int y) const noexcept(false)
133{
134 return _converter.toTemperature(getValue(x, y));
135}
136
138{
139 return _converter.getPrecision();
140}
141
143{
144 return _converter;
145}
146
147inline ThermalFrame ThermalFrame::clone() const noexcept
148{
149 return ThermalFrame{*this};
150}
151
152} // 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:147
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:127
TemperaturePrecision getTemperaturePrecision() const noexcept
Returns the precision of the temperatures stored in the frame.
Definition ThermalFrame.h:137
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:142
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:24
TemperaturePrecision
Represents the available temperature precisions.
Definition TemperaturePrecision.h:32