xn::SceneMetaData Class Reference
C++ Reference to Application Programmer Interface (API) » Meta-Data Objects (Frame Objects)

`#include <XnCppWrapper.h>`

Inheritance diagram for xn::SceneMetaData:
[legend]

## Public Member Functions

| SceneMetaData ()
void | InitFrom (const SceneMetaData &other)
XnStatus | InitFrom (const SceneMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel *pExternalBuffer)
XnStatus | CopyFrom (const SceneMetaData &other)
XnStatus | ReAdjust (XnUInt32 nXRes, XnUInt32 nYRes, const XnLabel *pExternalBuffer=NULL)
const XnLabel * | Data () const
const XnLabel *& | Data ()
XnLabel * | WritableData ()
const xn::LabelMap & | LabelMap () const
xn::LabelMap & | WritableLabelMap ()
const XnLabel & | operator[] (XnUInt32 nIndex) const
const XnLabel & | operator() (XnUInt32 x, XnUInt32 y) const
const XnSceneMetaData * | GetUnderlying () const
XnSceneMetaData * | GetUnderlying ()
Public Member Functions inherited from xn::MapMetaData
| MapMetaData (XnPixelFormat format, const XnUInt8 **ppData)
XnUInt32 | XRes () const
XnUInt32 & | XRes ()
XnUInt32 | YRes () const
XnUInt32 & | YRes ()
XnUInt32 | XOffset () const
XnUInt32 & | XOffset ()
XnUInt32 | YOffset () const
XnUInt32 & | YOffset ()
XnUInt32 | FullXRes () const
XnUInt32 & | FullXRes ()
XnUInt32 | FullYRes () const
XnUInt32 & | FullYRes ()
XnUInt32 | FPS () const
XnUInt32 & | FPS ()
XnPixelFormat | PixelFormat () const
const XnMapMetaData * | GetUnderlying () const
XnMapMetaData * | GetUnderlying ()
XnUInt32 | BytesPerPixel () const
XnStatus | AllocateData (XnUInt32 nXRes, XnUInt32 nYRes)
XnStatus | ReAdjust (XnUInt32 nXRes, XnUInt32 nYRes, const XnUInt8 *pExternalBuffer)
Public Member Functions inherited from xn::OutputMetaData
| OutputMetaData (const XnUInt8 **ppData)
virtual | ~OutputMetaData ()
XnUInt64 | Timestamp () const
XnUInt64 & | Timestamp ()
XnUInt32 | FrameID () const
XnUInt32 & | FrameID ()
XnUInt32 | DataSize () const
XnUInt32 & | DataSize ()
XnBool | IsDataNew () const
XnBool & | IsDataNew ()
const XnOutputMetaData * | GetUnderlying () const
XnOutputMetaData * | GetUnderlying ()
const XnUInt8 * | Data () const
const XnUInt8 *& | Data ()
XnUInt8 * | WritableData ()
XnStatus | AllocateData (XnUInt32 nBytes)
void | Free ()
XnStatus | MakeDataWritable ()

## Additional Inherited Members

Protected Member Functions inherited from xn::MapMetaData
XnPixelFormat & | PixelFormatImpl ()
Protected Attributes inherited from xn::OutputMetaData
XnUInt8 * | m_pAllocatedData

## Detailed Description

Saves the frame object (data and configuration) from the xn::SceneAnalyzer node. This frame object is a snapshot of the generated scene data and its associated configuration information at a certain point in time. This metadata provides fast and easy access to the SceneAnalyzer node's saved frame object.

## Constructor & Destructor Documentation

## SceneMetaData()

xn::SceneMetaData::SceneMetaData | ( |  | ) |

inline

## Member Function Documentation

## CopyFrom()

XnStatus xn::SceneMetaData::CopyFrom | ( | const SceneMetaData & | other | ) |

inline

Performs a deep-copy of another metadata object (including duplication of the data buffer)

Parameters

  [in] | other | source object

## Data() [1/2]

const XnLabel *& xn::SceneMetaData::Data | ( |  | ) |

inline

Returns the scene map.

Remarks

This method returns a pointer to the first scene pixel in the map. The scene map is implemented as a row-major order compact layout of pixels in the map.

The pixel format of the map is XnLabel, i.e. 16-bit integer values, where every user has a distinct label.

This method is reimplemented from the xn::OutputMetaData class.

## Data() [2/2]

const XnLabel * xn::SceneMetaData::Data | ( |  | ) | const

inline

Returns the scene map.

Remarks

This method returns a pointer to the first scene pixel in the map. The scene map is implemented as a row-major order compact layout of pixels in the map.

The pixel format of the map is XnLabel, i.e. 16-bit integer values, where every user has a distinct label.

This method is reimplemented from the xn::OutputMetaData class.

## GetUnderlying() [1/2]

XnSceneMetaData * xn::SceneMetaData::GetUnderlying | ( |  | ) |

inline

Gets the C object that is wrapped by this object.

## GetUnderlying() [2/2]

const XnSceneMetaData * xn::SceneMetaData::GetUnderlying | ( |  | ) | const

inline

Gets the C object that is wrapped by this object.

## InitFrom() [1/2]

void xn::SceneMetaData::InitFrom | ( | const SceneMetaData & | other | ) |

inline

Shallow-Copies an SceneMetaData object.

Parameters

  [in] | other | source object.

Remarks
  Note that the data buffer is not copied, and that both object will point to the same buffer.

## InitFrom() [2/2]

XnStatus xn::SceneMetaData::InitFrom | ( | const SceneMetaData & | other,
|  | XnUInt32 | nXRes,
|  | XnUInt32 | nYRes,
|  | const XnLabel * | pExternalBuffer )

inline

Shallow copies another SceneMetaData object, and then ReAdjust it.

Parameters

  [in] | other | source object
  [in] | nXRes | requested number of columns in the map
  [in] | nYRes | requested number of rows in the map
  [in] | pExternalBuffer | Optional. An external buffer matching requested resolution. If NULL, A buffer will be allocated.

## LabelMap()

const xn::LabelMap & xn::SceneMetaData::LabelMap | ( |  | ) | const

inline

Gets a light object wrapping the label map

## operator()()

const XnLabel & xn::SceneMetaData::operator() | ( | XnUInt32 | x,
|  | XnUInt32 | y ) const

inline

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

Parameters

  [in] | x | X-coordinate of the pixel in the map
  [in] | y | Y-coordinate of the pixel in the map

Remarks

The values are of type XnLabel. Each pixel's value labels it according to user.

## operator[]()

const XnLabel & xn::SceneMetaData::operator[] | ( | XnUInt32 | nIndex | ) | const

inline

Gets the label of a single pixel of the frame map by its index in the array.

Parameters

  [in] | nIndex | The index of the pixel in the buffer.

Remarks

The values are of type XnLabel. Each pixel's value labels it according to user.

## ReAdjust()

XnStatus xn::SceneMetaData::ReAdjust | ( | XnUInt32 | nXRes,
|  | XnUInt32 | nYRes,
|  | const XnLabel * | pExternalBuffer = NULL )

inline

Changes dimensions of the pixel-map.

Parameters

  [in] | nXRes | Number of columns in the map
  [in] | nYRes | Number of rows in the map
  [in] | pExternalBuffer | Optional. An external buffer to be used. If NULL is passed, a buffer will be allocated.

## WritableData()

XnLabel * xn::SceneMetaData::WritableData | ( |  | ) |

inline

Gets a pointer to the writable buffer (see Frame Objects and Metadata Objects).

## WritableLabelMap()

xn::LabelMap & xn::SceneMetaData::WritableLabelMap | ( |  | ) |

inline

Gets a light object wrapping the writable label map

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

- XnCppWrapper.h