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

Rectangular measurement field with individual radiation parameters. More...

#include <MeasurementField.h>

Collaboration diagram for optris::MeasurementField:
Collaboration graph

Public Member Functions

OTC_SDK_API MeasurementField () noexcept
 Constructor.
 
OTC_SDK_API MeasurementField (int id, int x, int y, int width, int height, float emissivity=1.F, float transmissivity=1.F, float ambientTemperature=INVALID_TEMPERATURE) noexcept
 Constructor.
 
OTC_SDK_API MeasurementField (const MeasurementField &rhs)=default
 Copy constructor.
 
OTC_SDK_API MeasurementFieldoperator= (const MeasurementField &rhs)=default
 Copy assignment.
 
OTC_SDK_API MeasurementField (MeasurementField &&rhs) noexcept=default
 Move constructor.
 
OTC_SDK_API MeasurementFieldoperator= (MeasurementField &&rhs) noexcept=default
 Move assignment.
 
OTC_SDK_API ~MeasurementField ()=default
 Destructor.
 
int getId () const noexcept
 Returns the id of the measurement field.
 
void setId (int id) noexcept
 Sets the id of the measurement field.
 
OTC_SDK_API unsigned short getValue (int index) const
 Returns the field data value at the given index.
 
float getTemperature (int index) const
 Returns the temperature in in °C at the given index.
 
OTC_SDK_API unsigned short getValue (int x, int y) const
 Returns the field data value at the given coordinates.
 
float getTemperature (int x, int y) const noexcept(false)
 Returns the temperature in in °C at the given coordinates.
 
ConstMeasurementFieldIterator getConstIterator () const noexcept
 Returns an iterator with read access.
 
TemperaturePrecision getTemperaturePrecision () const noexcept
 Returns the precision of the temperatures stored in the measurement field.
 
int getX () const noexcept
 Returns the x-coordinate of the upper left corner.
 
int getY () const noexcept
 Returns the y-coordinate of the upper left corner.
 
void setPosition (int x, int y) noexcept
 Sets the position of the measurement field by providing the coordinates of the upper left corner.
 
int getWidth () const noexcept
 Returns the width in pixels of the field.
 
int getHeight () const noexcept
 Returns the height in pixels of the field.
 
int getSize () const noexcept
 Returns the overall size of the field (width * height).
 
OTC_SDK_API void resize (int width, int height)
 Resizes the measurement field.
 
float getEmissivity () const noexcept
 Returns the emissivity of the field.
 
float getTransmissivity () const noexcept
 Returns the transmissivity of the field.
 
float getAmbientTemperature () const noexcept
 Returns the set ambient temperature in °C.
 
OTC_SDK_API void setRadiationParameters (float emissivity, float transmissivity, float ambientTemperature)
 Sets the radiation parameters stored in the measurement field.
 
float getMeanTemperature () const noexcept
 Returns the overall mean temperature of the field in °C.
 
float getMinTemperature () const noexcept
 Returns the minimum temperature in the field in °C.
 
float getMaxTemperature () const noexcept
 Returns the maximum temperature in the field in °C.
 
void setTemperatures (float mean, float min, float max) noexcept
 Sets the mean, minimum and maximum temperatures in °C.
 
TemperatureConverter getConverter () const noexcept
 Returns the temperature converter.
 
MeasurementField clone () const noexcept
 Returns a complete copy of this frame.
 
OTC_SDK_API void setData (const unsigned short *source, int frameWidth, TemperaturePrecision precision)
 Sets the thermal field data values.
 
OTC_SDK_API void setFromRawData (const void *source, TemperaturePrecision precision)
 Sets the field 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.
 
const unsigned short * getData () const noexcept
 Returns a pointer to the first element of the internal value array.
 

Friends

class ConstMeasurementFieldIterator
 

Detailed Description

Rectangular measurement field with individual radiation parameters.

Once added via the IRImager the setters will no loner affect the processing of the field because the IRImager creates an internal copy of the field.

Constructor & Destructor Documentation

◆ MeasurementField()

OTC_SDK_API optris::MeasurementField::MeasurementField ( int id,
int x,
int y,
int width,
int height,
float emissivity = 1.F,
float transmissivity = 1.F,
float ambientTemperature = INVALID_TEMPERATURE )
noexcept

Constructor.

Parameters
[in]idunique number to make the measurement fields identifiable.
[in]xx-coordinate of the upper left corner of the rectangular field.
[in]yy-coordinate of the upper left corner of the rectangular field.
[in]widthwidth of the field in pixels.
[in]heightheight of the field in pixels.
[in]emissivityemissivity parameter of material to be monitored.
[in]transmissivitytransmissivity of material in between camera and object, i.e. the transmissivity of the protective glass, if used.
[in]ambientTemperaturein °. Set it to INVALID_TEMPERATURE or less to force the SDK to estimate the ambient temperature based on thermal probe readings of the camera.

Member Function Documentation

◆ clone()

MeasurementField optris::MeasurementField::clone ( ) const
inlinenoexcept

Returns a complete copy of this frame.

Returns
a complete copy of this frame.

◆ copyDataTo()

OTC_SDK_API void optris::MeasurementField::copyDataTo ( unsigned short * destination,
int size ) const
noexcept

Copies the internal values to the destination array.

Warning
Make sure the destination arrays has at least the size returned by getSize().
Parameters
[out]destinationarray to copy the internal data to.
[in]sizein bytes. The specified size is limited to [0, field size in bytes].

◆ getAmbientTemperature()

float optris::MeasurementField::getAmbientTemperature ( ) const
inlinenoexcept

Returns the set ambient temperature in °C.

Returns
ambient temperature in °C. It will be equal or less to INVALID_TEMPERATURE if the SDK is forced to estimate it.

◆ getConstIterator()

ConstMeasurementFieldIterator optris::MeasurementField::getConstIterator ( ) const
inlinenoexcept

Returns an iterator with read access.

The iterator traverses the measurement field in a row major fashion.

Returns
iterator with read access.

◆ getConverter()

TemperatureConverter optris::MeasurementField::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.

◆ getData()

const unsigned short * optris::MeasurementField::getData ( ) const
inlinenoexcept

Returns a pointer to the first element of the internal value array.

Returns
pointer to the first element of the internal value array.

◆ getEmissivity()

float optris::MeasurementField::getEmissivity ( ) const
inlinenoexcept

Returns the emissivity of the field.

Returns
emissivity of the field.

◆ getHeight()

int optris::MeasurementField::getHeight ( ) const
inlinenoexcept

Returns the height in pixels of the field.

Returns
height in pixels of the field.

◆ getId()

int optris::MeasurementField::getId ( ) const
inlinenoexcept

Returns the id of the measurement field.

Returns
id of the measurement field.

◆ getMaxTemperature()

float optris::MeasurementField::getMaxTemperature ( ) const
inlinenoexcept

Returns the maximum temperature in the field in °C.

Returns
maximum temperature in the field in °C.

◆ getMeanTemperature()

float optris::MeasurementField::getMeanTemperature ( ) const
inlinenoexcept

Returns the overall mean temperature of the field in °C.

Returns
overall mean temperature of the field in °C.

◆ getMinTemperature()

float optris::MeasurementField::getMinTemperature ( ) const
inlinenoexcept

Returns the minimum temperature in the field in °C.

Returns
minimum temperature in the field in °C.

◆ getSize()

int optris::MeasurementField::getSize ( ) const
inlinenoexcept

Returns the overall size of the field (width * height).

Returns
size of the field.

◆ getTemperature() [1/2]

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

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

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

◆ getTemperature() [2/2]

float optris::MeasurementField::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::MeasurementField::getTemperaturePrecision ( ) const
inlinenoexcept

Returns the precision of the temperatures stored in the measurement field.

Returns
precision of the temperatures stored in the measurement field.

◆ getTransmissivity()

float optris::MeasurementField::getTransmissivity ( ) const
inlinenoexcept

Returns the transmissivity of the field.

Returns
transmissivity of the field.

◆ getValue() [1/2]

OTC_SDK_API unsigned short optris::MeasurementField::getValue ( int index) const

Returns the field data value at the given index.

Parameters
[in]indexof the desired field data.
Returns
field data value at the given index.
Exceptions
SDKExceptionif the index is out of range.

◆ getValue() [2/2]

OTC_SDK_API unsigned short optris::MeasurementField::getValue ( int x,
int y ) const

Returns the field data value at the given coordinates.

Parameters
[in]xcoordinate.
[in]ycoordinate.
Returns
field data value at the given coordinates.
Exceptions
SDKExceptionif the coordinates are out of range.

◆ getWidth()

int optris::MeasurementField::getWidth ( ) const
inlinenoexcept

Returns the width in pixels of the field.

Returns
width in pixels of the field.

◆ getX()

int optris::MeasurementField::getX ( ) const
inlinenoexcept

Returns the x-coordinate of the upper left corner.

Returns
x-coordinate of the upper left corner.

◆ getY()

int optris::MeasurementField::getY ( ) const
inlinenoexcept

Returns the y-coordinate of the upper left corner.

Returns
y-coordinate of the upper left corner.

◆ resize()

OTC_SDK_API void optris::MeasurementField::resize ( int width,
int height )

Resizes the measurement field.

Parameters
[in]widthin pixels of the resized measurement field.
[in]heightin pixels of the resized measurement field.

◆ setData()

OTC_SDK_API void optris::MeasurementField::setData ( const unsigned short * source,
int frameWidth,
TemperaturePrecision precision )

Sets the thermal field data values.

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

Parameters
[in]sourceto set the field data values from.
[in]frameWidthwidth in pixels of the frame containing the measurement field.
[in]precisionof the temperature values.

◆ setFromRawData()

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

Sets the field data values from raw data.

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

◆ setId()

void optris::MeasurementField::setId ( int id)
inlinenoexcept

Sets the id of the measurement field.

Parameters
[in]idnew id of the measurement field.

◆ setPosition()

void optris::MeasurementField::setPosition ( int x,
int y )
inlinenoexcept

Sets the position of the measurement field by providing the coordinates of the upper left corner.

Parameters
[in]xcoordinate of the upper left corner of the rectangular field.
[in]ycoordinate of the upper left corner of the rectangular field.

◆ setRadiationParameters()

OTC_SDK_API void optris::MeasurementField::setRadiationParameters ( float emissivity,
float transmissivity,
float ambientTemperature )

Sets the radiation parameters stored in the measurement field.

Parameters
[in]emissivityfor the measurement field. Should be in [0, 1].
[in]transmissivityfor the measurement field. Should be in [0, 1].
[in]ambientTemperaturein °C. Set to INVALID_TEMPERATURE or less to force the SDK to estimate the ambient temperature based on internal probe readings.
Exceptions
SDKExceptionif emissivity or transmissivity is not in [0, 1].

◆ setTemperatures()

void optris::MeasurementField::setTemperatures ( float mean,
float min,
float max )
inlinenoexcept

Sets the mean, minimum and maximum temperatures in °C.

Parameters
[in]meantemperature in °C.
[in]mintemperature in °C.
[in]maxtemperature in °C.

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