![]() |
Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
|
Represents a data frame received from a device. More...
#include <Frame.h>
Public Member Functions | |
OTC_SDK_API | Frame () noexcept |
Constructor. | |
OTC_SDK_API | Frame (const Frame &)=default |
Copy constructor. | |
OTC_SDK_API Frame & | operator= (const Frame &)=default |
Copy assignment. | |
OTC_SDK_API | Frame (Frame &&)=default |
Move constructor. | |
OTC_SDK_API Frame & | operator= (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. | |
Protected Attributes | |
std::vector< unsigned short > | _values |
Frame data. | |
Friends | |
class | ConstFrameIterator |
Represents a data frame received from a device.
The encapsulated data may represent thermal or energy measurements in an internal format. See the specialized child classes like ThermalFrame for more details.
The origin of coordinates is located in the upper left corner with the x-axis pointing right and the y-axis pointing down.
|
inlinenoexcept |
Returns a complete copy of this frame.
|
noexcept |
Copies the internal values to the destination array.
[out] | destination | array to copy the internal data to. |
[in] | size | in bytes. The specified size is limited to [0, frame size in bytes]. |
|
inlinenoexcept |
Returns an iterator with read access.
The iterator traverses the frame in a row major fashion.
|
inlinenoexcept |
Returns a pointer to the first element of the internal value array.
|
inlinenoexcept |
Returns the height in pixel of the frame.
|
inlinenoexcept |
Returns the overall size in pixels of the frame (width * height).
OTC_SDK_API unsigned short optris::Frame::getValue | ( | int | index | ) | const |
Returns the frame data value at the given index.
[in] | index | of the desired frame data. |
SDKException | if the index is out of range. |
OTC_SDK_API unsigned short optris::Frame::getValue | ( | int | x, |
int | y ) const |
Returns the frame data value at the given coordinates.
[in] | x | coordinate. |
[in] | y | coordinate. |
SDKException | if the coordinates are out of range. |
|
inlinenoexcept |
Returns the width in pixels of the frame.
|
inlinenoexcept |
Returns whether the frame is empty.
OTC_SDK_API void optris::Frame::resize | ( | int | width, |
int | height ) |
Resizes the frame.
[in] | width | of the resized frame in pixels. |
[in] | height | of the resized frame in pixels. |
OTC_SDK_API void optris::Frame::setData | ( | const unsigned short * | source | ) |
Sets the frame data values.
[in] | source | to set the frame data values from. |
OTC_SDK_API void optris::Frame::setFromRawData | ( | const void * | source | ) |
Sets the frame data values from raw data.
[in] | source | to set the frame data values from. |