Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
optris::ThermalFrame Class Reference

Encapsulates thermal frame data received from a device. More...

#include <ThermalFrame.h>

Inheritance diagram for optris::ThermalFrame:
Inheritance graph
Collaboration diagram for optris::ThermalFrame:
Collaboration graph

Public Member Functions

OTC_SDK_API ThermalFrame ()=default
 Constructor.
 
OTC_SDK_API ThermalFrame (const ThermalFrame &)=default
 Copy constructor.
 
OTC_SDK_API ThermalFrameoperator= (const ThermalFrame &)=default
 Copy assignment.
 
OTC_SDK_API ThermalFrame (ThermalFrame &&)=default
 Move constructor.
 
OTC_SDK_API ThermalFrameoperator= (ThermalFrame &&)=default
 Move assignment.
 
OTC_SDK_API ~ThermalFrame () override=default
 Destructor.
 
float getTemperature (int index) const
 Returns the temperature in in °C at the given index.
 
float getTemperature (int x, int y) const
 Returns the temperature in in °C at the given coordinates.
 
TemperaturePrecision getTemperaturePrecision () const noexcept
 Returns the precision of the temperatures stored in the frame.
 
OTC_SDK_API void setData (const unsigned short *source, TemperaturePrecision precision)
 Sets the thermal frame data values.
 
OTC_SDK_API void setFromRawData (const void *source, TemperaturePrecision precision)
 Sets the thermal frame values from raw data.
 
TemperatureConverter getConverter () const noexcept
 Returns the temperature converter.
 
ThermalFrame clone () const noexcept
 Returns a complete copy of this frame.
 
- Public Member Functions inherited from optris::Frame
OTC_SDK_API Frame () noexcept
 Constructor.
 
OTC_SDK_API Frame (const Frame &)=default
 Copy constructor.
 
OTC_SDK_API Frameoperator= (const Frame &)=default
 Copy assignment.
 
OTC_SDK_API Frame (Frame &&)=default
 Move constructor.
 
OTC_SDK_API Frameoperator= (Frame &&)=default
 Move assignment.
 
virtual OTC_SDK_API ~Frame () noexcept=default
 Destructor.
 
OTC_SDK_API unsigned short getValue (int index) const noexcept(false)
 Returns the frame data value at the given index.
 
OTC_SDK_API unsigned short getValue (int x, int y) const noexcept(false)
 Returns the frame data value at the given coordinates.
 
OTC_SDK_API ConstFrameIterator getConstIterator () const noexcept
 Returns an iterator with read access.
 
OTC_SDK_API int getWidth () const noexcept
 Returns the width in pixels of the frame.
 
OTC_SDK_API int getHeight () const noexcept
 Returns the height in pixel of the frame.
 
OTC_SDK_API int getSize () const noexcept
 Returns the overall size in pixels of the frame (width * height).
 
OTC_SDK_API bool isEmpty () const noexcept
 Returns whether the frame is empty.
 
OTC_SDK_API void clear ()
 Clears the frame data.
 
OTC_SDK_API void resize (int width, int height)
 Resizes the frame.
 
OTC_SDK_API Frame clone () const noexcept
 Returns a complete copy of this frame.
 
OTC_SDK_API void setData (const unsigned short *source)
 Sets the frame data values.
 
OTC_SDK_API void setFromRawData (const void *source)
 Sets the frame data values from raw data.
 
OTC_SDK_API void copyDataTo (unsigned short *destination, int size) const noexcept
 Copies the internal values to the destination array.
 
OTC_SDK_API const unsigned short * getData () const noexcept
 Returns a pointer to the first element of the internal value array.
 

Additional Inherited Members

- Protected Attributes inherited from optris::Frame
std::vector< unsigned short > _values
 Frame data.
 

Detailed Description

Encapsulates thermal frame data received from a device.

Member Function Documentation

◆ clone()

ThermalFrame optris::ThermalFrame::clone ( ) const
inlinenoexcept

Returns a complete copy of this frame.

Returns
a complete copy of this frame.

◆ getConverter()

TemperatureConverter optris::ThermalFrame::getConverter ( ) const
inlinenoexcept

Returns the temperature converter.

It can be used to convert and validate the thermal frame values to and from temperatures in °C.

Returns
temperature converter.

◆ getTemperature() [1/2]

float optris::ThermalFrame::getTemperature ( int index) const
inline

Returns the temperature in in °C at the given index.

Parameters
[in]indexof the desired frame temperature.
Returns
temperature in in °C at the given index.
Exceptions
SDKExceptionif index is out of range.

◆ getTemperature() [2/2]

float optris::ThermalFrame::getTemperature ( int x,
int y ) const
inline

Returns the temperature in in °C at the given coordinates.

Parameters
[in]xcoordinate.
[in]ycoordinate.
Returns
temperature in in °C at the given coordinate.
Exceptions
SDKExceptionif the coordinates are out of range.

◆ getTemperaturePrecision()

TemperaturePrecision optris::ThermalFrame::getTemperaturePrecision ( ) const
inlinenoexcept

Returns the precision of the temperatures stored in the frame.

Returns
precision of the temperatures stored in the frame.

◆ setData()

OTC_SDK_API void optris::ThermalFrame::setData ( const unsigned short * source,
TemperaturePrecision precision )

Sets the thermal frame data values.

The provided data may be modified based on the given temperature precision.

Parameters
[in]sourceto set the thermal frame data values from.
[in]precisionof the temperature values.

◆ setFromRawData()

OTC_SDK_API void optris::ThermalFrame::setFromRawData ( const void * source,
TemperaturePrecision precision )

Sets the thermal frame values from raw data.

The data from the source is directly copied to the internal memory and is not modified based on the provided temperature precision.

Parameters
[in]sourceto set the thermal frame data from.
[in]precisionof the thermal values.

The documentation for this class was generated from the following file: