Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
ThermalFrame.h
Go to the documentation of this file.
1// Copyright (c) 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 setData(const unsigned short* source, TemperaturePrecision precision);
81
91 OTC_SDK_API void setFromRawData(const void* source, TemperaturePrecision precision);
92
100 TemperatureConverter getConverter() const noexcept;
101
107 ThermalFrame clone() const noexcept;
108
109
110private:
111 TemperatureConverter _converter;
112};
113
114
115// Inline implementations
116inline float ThermalFrame::getTemperature(int index) const noexcept(false)
117{
118 return _converter.toTemperature(getValue(index));
119}
120
121inline float ThermalFrame::getTemperature(int x, int y) const noexcept(false)
122{
123 return _converter.toTemperature(getValue(x, y));
124}
125
127{
128 return _converter.getPrecision();
129}
130
132{
133 return _converter;
134}
135
136inline ThermalFrame ThermalFrame::clone() const noexcept
137{
138 return ThermalFrame{*this};
139}
140
141} // 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:136
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:116
TemperaturePrecision getTemperaturePrecision() const noexcept
Returns the precision of the temperatures stored in the frame.
Definition ThermalFrame.h:126
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.
TemperatureConverter getConverter() const noexcept
Returns the temperature converter.
Definition ThermalFrame.h:131
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:29