Mech-Eye API 2.5.1
API reference documentation for Mech-Eye Industrial 3D Camera
Loading...
Searching...
No Matches
Public Member Functions
Frame< ElementType > Class Template Reference

Definition of data structure in device capturing image. More...

#include <MechEyeFrame.hpp>

Public Member Functions

 Frame ()
 
 ~Frame ()
 
uint32_t width () const
 
uint32_t height () const
 
bool empty () const
 
const ElementType * data () const
 
ElementType * data ()
 
const ElementType & operator[] (std::size_t n) const
 
ElementType & operator[] (std::size_t n)
 
const ElementType & at (uint32_t row, uint32_t col) const
 
ElementType & at (uint32_t row, uint32_t col)
 
void resize (uint32_t width, uint32_t height)
 
void release ()
 

Detailed Description

template<typename ElementType>
class mmind::api::Frame< ElementType >

Definition of data structure in device capturing image.

Constructor & Destructor Documentation

◆ Frame()

template<typename ElementType >
Frame ( )
inline

Constructor

◆ ~Frame()

template<typename ElementType >
~Frame ( )
inline

Destructor

Member Function Documentation

◆ at() [1/2]

template<typename ElementType >
ElementType & at ( uint32_t  row,
uint32_t  col 
)
inline

Returns an element reference to the specified row and col index in the Frame.

Parameters
rowIndex along the dimension height. It will throw an exception if the input row is greater than width.
colIndex along the dimension width. It will throw an exception if the input col is greater than height.

◆ at() [2/2]

template<typename ElementType >
const ElementType & at ( uint32_t  row,
uint32_t  col 
) const
inline

Returns a const element reference to the specified row and col index in the Frame.

Parameters
rowIndex along the dimension height. It will throw an exception if the input row is greater than width.
colIndex along the dimension width. It will throw an exception if the input col is greater than height.

◆ data() [1/2]

template<typename ElementType >
ElementType * data ( )
inline

Returns the pointer to the element data.

◆ data() [2/2]

template<typename ElementType >
const ElementType * data ( ) const
inline

Returns the pointer to the element data.

◆ empty()

template<typename ElementType >
bool empty ( ) const
inline

Returns true if the Frame has no elements.

◆ height()

template<typename ElementType >
uint32_t height ( ) const
inline

Returns the height of the Frame

◆ operator[]() [1/2]

template<typename ElementType >
ElementType & operator[] ( std::size_t  n)
inline

Returns a element reference to the specified index in the Frame using the operator [].

Parameters
nIndex along the one dimension. It will throw an exception if the input n is greater than width * height.

◆ operator[]() [2/2]

template<typename ElementType >
const ElementType & operator[] ( std::size_t  n) const
inline

Returns a const element reference to the specified index in the Frame using the operator [].

Parameters
nIndex along the one dimension. It will throw an exception if the input n is greater than width * height.

◆ release()

template<typename ElementType >
void release ( )
inline

Deallocated the Frame data.

◆ resize()

template<typename ElementType >
void resize ( uint32_t  width,
uint32_t  height 
)
inline

Change the Frame size to a new one. It will destroy the existing data and reallocate memory according to the new size.

Parameters
widthNew number of the Frame width.
heightNew number of the Frame height.

◆ width()

template<typename ElementType >
uint32_t width ( ) const
inline

Returns the width of the Frame


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