Thermal Camera SDK 10.1.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 (const MeasurementFieldConfig &config, long long fieldId, int referenceFrameWidth, int referenceFrameHeight)
 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.
 
MeasurementFieldConfig getConfig () const noexcept
 Returns the configuration of the measurement field.
 
long long getId () const noexcept
 Returns the ID uniquely identifying the measurement field.
 
int getIndex () const noexcept
 Returns the index of the measurement field.
 
void setIndex (int index) noexcept
 Sets the index of the measurement field.
 
std::string getName () const noexcept
 Returns the name of the measurement field.
 
void setName (const std::string &name) noexcept
 Sets the name 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.
 
OTC_SDK_API void setPosition (int x, int y) noexcept
 Sets the position of the measurement field by providing the coordinates of the upper left corner.
 
FieldShape getShape () const noexcept
 Returns the shape of the measurement field.
 
FieldMode getMode () const noexcept
 Returns the mode for the measurement field.
 
void setMode (FieldMode mode) noexcept
 Sets the mode for the measurement field.
 
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.
 
OTC_SDK_API void scale (int frameWidth, int frameHeight)
 Scales the position and dimensions of the measurement field based on new frame dimensions.
 
RadiationParameterSource getEmissivitySource () const noexcept
 Returns the source of the emissivity value.
 
RadiationParameterSource getTransmissivitySource () const noexcept
 Returns the source of the transmissivity value.
 
RadiationParameterSource getAmbientTemperatureSource () const noexcept
 Returns the source of the ambient temperature value.
 
RadiationParameters getRadiationParameters () const noexcept
 Grants read access to the radiation parameters used to process the measurement field.
 
void setRadiationParameters (const RadiationParameters &radiation) noexcept
 Sets the radiation parameters stored in the measurement field.
 
void setRadiationParameterSources (RadiationParameterSource emissivitySource, RadiationParameterSource ambientTemperatureSource) noexcept
 Sets the sources of the radiation parameters.
 
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.
 
OTC_SDK_API float getDataPoint () const noexcept
 Returns the data point specified by the the mode of this field.
 
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 copyTemperaturesTo (float *destination, int size) const noexcept
 Copies the thermal data as degree Celsius to a one-dimensional array or vector.
 
OTC_SDK_API void copyDataTo (unsigned short *destination, int size) const noexcept
 Copies the internal values to a one-dimensional array or vector.
 
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 ( const MeasurementFieldConfig & config,
long long fieldId,
int referenceFrameWidth,
int referenceFrameHeight )

Constructor.

Parameters
[in]configto create a measurement field from.
[in]fieldIduniquely identifying the measurement field.
[in]referenceFrameWidthin pixels for scaling.
[in]referenceFrameHeightin pixels for scaling.
Exceptions
SDKExceptionif one the reference frame dimensions is zero.

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 a one-dimensional array or vector.

Warning
Make sure the destination has at least the size returned by getSize().
Parameters
[out]destinationto copy the internal data to.
[in]sizeas element count. The specified size is limited to [0, getSize()].

◆ copyTemperaturesTo()

OTC_SDK_API void optris::MeasurementField::copyTemperaturesTo ( float * destination,
int size ) const
noexcept

Copies the thermal data as degree Celsius to a one-dimensional array or vector.

Warning
Make sure the destination has at least the size returned by getSize().
Parameters
[out]destinationto copy the internal data to.
[in]sizeas element count. The specified size is limited to [0, getSize()].

◆ getAmbientTemperatureSource()

RadiationParameterSource optris::MeasurementField::getAmbientTemperatureSource ( ) const
inlinenoexcept

Returns the source of the ambient temperature value.

Returns
source of the ambient temperature value.

◆ getConfig()

MeasurementFieldConfig optris::MeasurementField::getConfig ( ) const
inlinenoexcept

Returns the configuration of the measurement field.

Returns
configuration of the measurement field.

◆ 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.

◆ getDataPoint()

OTC_SDK_API float optris::MeasurementField::getDataPoint ( ) const
noexcept

Returns the data point specified by the the mode of this field.

Returns
data point specified by the the mode of this field.

◆ getEmissivitySource()

RadiationParameterSource optris::MeasurementField::getEmissivitySource ( ) const
inlinenoexcept

Returns the source of the emissivity value.

Returns
source of the emissivity value.

◆ getHeight()

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

Returns the height in pixels of the field.

Returns
height in pixels of the field.

◆ getId()

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

Returns the ID uniquely identifying the measurement field.

Returns
ID of the measurement field.

◆ getIndex()

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

Returns the index of the measurement field.

Returns
index 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.

◆ getMode()

FieldMode optris::MeasurementField::getMode ( ) const
inlinenoexcept

Returns the mode for the measurement field.

Returns
mode for the measurement field.

◆ getName()

std::string optris::MeasurementField::getName ( ) const
inlinenoexcept

Returns the name of the measurement field.

Returns
name of the measurement field.

◆ getRadiationParameters()

RadiationParameters optris::MeasurementField::getRadiationParameters ( ) const
inlinenoexcept

Grants read access to the radiation parameters used to process the measurement field.

Returns
read access to the radiation parameters used to process the measurement field.

◆ getShape()

FieldShape optris::MeasurementField::getShape ( ) const
inlinenoexcept

Returns the shape of the measurement field.

Returns
shape of the measurement field.

◆ 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.

◆ getTransmissivitySource()

RadiationParameterSource optris::MeasurementField::getTransmissivitySource ( ) const
inlinenoexcept

Returns the source of the transmissivity value.

Returns
source of the transmissivity value.

◆ 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.
Exceptions
SDKExceptionif one of the provided dimensions is equal or less than zero.

◆ scale()

OTC_SDK_API void optris::MeasurementField::scale ( int frameWidth,
int frameHeight )

Scales the position and dimensions of the measurement field based on new frame dimensions.

Parameters
[in]frameWidthnew frame width in pixels.
[in]frameHeightnew frame height in pixels.

◆ 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.

◆ setIndex()

void optris::MeasurementField::setIndex ( int index)
inlinenoexcept

Sets the index of the measurement field.

Parameters
[in]indexto set.

◆ setMode()

void optris::MeasurementField::setMode ( FieldMode mode)
inlinenoexcept

Sets the mode for the measurement field.

Parameters
[in]modeto set.

◆ setName()

void optris::MeasurementField::setName ( const std::string & name)
inlinenoexcept

Sets the name of the measurement field.

Parameters
[in]nameof the measurement field.

◆ setPosition()

OTC_SDK_API void optris::MeasurementField::setPosition ( int x,
int y )
noexcept

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()

void optris::MeasurementField::setRadiationParameters ( const RadiationParameters & radiation)
inlinenoexcept

Sets the radiation parameters stored in the measurement field.

Parameters
[in]radiationparameters to set.

◆ setRadiationParameterSources()

void optris::MeasurementField::setRadiationParameterSources ( RadiationParameterSource emissivitySource,
RadiationParameterSource ambientTemperatureSource )
inlinenoexcept

Sets the sources of the radiation parameters.

Parameters
[in]emissivitySourceto set.
[in]ambientTemperatureSourceto set.

◆ 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: