OpenNI 1.5.7
Public Member Functions | List of all members

#include <XnCppWrapper.h>

Public Member Functions

 Map (_pixelType *&pData, XnUInt32 &nXRes, XnUInt32 &nYRes)
 
XnUInt32 XRes () const
 
XnUInt32 YRes () const
 
const _pixelType & operator[] (XnUInt32 nIndex) const
 
_pixelType & operator[] (XnUInt32 nIndex)
 
const _pixelType & operator() (XnUInt32 x, XnUInt32 y) const
 
_pixelType & operator() (XnUInt32 x, XnUInt32 y)
 

Detailed Description

template<class _pixelType>
class xn::Map< _pixelType >

The Map Wrapper classes are light wrappers for Frame Objects maps (from metadata classes). These wrapper classes provide small data-focused objects for simplified data access to frame objects generated by the generator nodes.

Template Parameters
_pixelTypeThe data type of a single pixel in this map

Constructor & Destructor Documentation

◆ Map()

template<class _pixelType >
xn::Map< _pixelType >::Map ( _pixelType *&  pData,
XnUInt32 &  nXRes,
XnUInt32 &  nYRes 
)
inline

Member Function Documentation

◆ operator()() [1/2]

template<class _pixelType >
_pixelType & xn::Map< _pixelType >::operator() ( XnUInt32  x,
XnUInt32  y 
)
inline

Gets a single pixel of the frame map by its X and Y coordinates.

Parameters
[in]xThe horizontal position of the pixel (from left to right)
[in]yThe vertical position of the pixel in the buffer (from top to bottom)
Returns
A pixel of type _pixelType.

◆ operator()() [2/2]

template<class _pixelType >
const _pixelType & xn::Map< _pixelType >::operator() ( XnUInt32  x,
XnUInt32  y 
) const
inline

Gets a single pixel of the frame map by its X and Y coordinates.

Parameters
[in]xThe horizontal position of the pixel (from left to right)
[in]yThe vertical position of the pixel in the buffer (from top to bottom)
Returns
A pixel of type _pixelType.

◆ operator[]() [1/2]

template<class _pixelType >
_pixelType & xn::Map< _pixelType >::operator[] ( XnUInt32  nIndex)
inline

Gets a single pixel of the frame map by indexing a map as a one-dimensional array.

Parameters
[in]nIndexThe position of the pixel in the buffer
Returns
A pixel of type _pixelType.

Remarks

Indexing a map in this way can give improved speed in some situations.

◆ operator[]() [2/2]

template<class _pixelType >
const _pixelType & xn::Map< _pixelType >::operator[] ( XnUInt32  nIndex) const
inline

Gets a single pixel of the frame map by indexing a map as a one-dimensional array.

Parameters
[in]nIndexThe position of the pixel in the buffer
Returns
A pixel of type _pixelType.

Remarks

Indexing a map in this way can give improved speed in some situations.

◆ XRes()

template<class _pixelType >
XnUInt32 xn::Map< _pixelType >::XRes ( ) const
inline

Gets the frame X resolution. The X resolution is the actual number of columns in the frame after any required cropping has been applied.

Remarks

This is the same as MapMetaData::XRes().

◆ YRes()

template<class _pixelType >
XnUInt32 xn::Map< _pixelType >::YRes ( ) const
inline

Gets the frame Y resolution. The Y resolution is the actual number of rows in the frame after any required cropping has been applied.

Remarks

This is the same as MapMetaData::YRes().


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