OpenNI 1.5.4: xn::CroppingCapability Class Reference

OpenNI

xn::CroppingCapability Class Reference

#include <XnCppWrapper.h>

Inheritance diagram for xn::CroppingCapability:

List of all members.

Public Member Functions

 CroppingCapability (XnNodeHandle hNode)
 CroppingCapability (const NodeWrapper &node)
XnStatus SetCropping (const XnCropping &Cropping)
XnStatus GetCropping (XnCropping &Cropping) const
XnStatus RegisterToCroppingChange (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
void UnregisterFromCroppingChange (XnCallbackHandle hCallback)

Detailed Description

Purpose: Provides Cropping capability for map generator nodes. Cropping capability restricts the size of the data frames to be generated by the MapGenerator node to a selected (cropped) area of the full field-of-view.

Usage: Do not instantiate directly. Instead, use MapGenerator::GetCroppingCap() to obtain an instance.

Remarks:

When cropping is enabled, the size of the generated map is reduced to fit a lower resolution (smaller FOV dimensions). For example, if the map generator is working in VGA resolution (640x480) and the application chooses to crop at 300x200, the next pixel row will begin after 300 pixels. Pixels outside the cropping area are not returned in the buffer - they are not blacked out; they are not returned at all. Thus, cropping is very useful for providing a performance boost.

Event: 'Cropping Change'

Signals that the holder node's cropping area has been changed.

Use RegisterToCroppingChange() and UnregisterFromCroppingChange() for using this event.

Calling the SetCropping() method raises this event.


Constructor & Destructor Documentation

xn::CroppingCapability::CroppingCapability ( XnNodeHandle  hNode) [inline]

Ctor

Parameters:
[in]hNodeNode handle
xn::CroppingCapability::CroppingCapability ( const NodeWrapper node) [inline]

Member Function Documentation

XnStatus xn::CroppingCapability::GetCropping ( XnCropping Cropping) const [inline]

Gets the current cropping configuration of the holder node. This configuration is that set by SetCropping(). This configuration is used for generating the next frame.

Parameters:
[out]CroppingRetreived cropping configuration.
Return values:
XN_STATUS_INVALID_OPERATIONThe MapGenerator node does not support the Cropping capability.
XnStatus xn::CroppingCapability::RegisterToCroppingChange ( StateChangedHandler  handler,
void *  pCookie,
XnCallbackHandle hCallback 
) [inline]

Registers an event handler for the 'Cropping Change' event.

Parameters:
[in]handlerCallback function to be invoked when the event is raised.
[in]pCookieUser's cookie, to be delivered to the callback.
[out]hCallbackHandle to the callback to be used for unregistering it.

For full details and usage of the parameters, see Registering to Events.

XnStatus xn::CroppingCapability::SetCropping ( const XnCropping Cropping) [inline]

Sets the holder node's current cropping configuration. This configuration is used for generating the next frame.

Parameters:
[in]CroppingCropping configuration to be set.
Return values:
XN_STATUS_INVALID_OPERATIONThe MapGenerator node does not support the Cropping capability.
void xn::CroppingCapability::UnregisterFromCroppingChange ( XnCallbackHandle  hCallback) [inline]

Unregisters the event handler for the 'Cropping Change' event.

Parameters:
[in]hCallbackHandle received from registration.

For full details and usage of the parameter, see Unregistering from Events .


The documentation for this class was generated from the following file:
Generated on Wed May 16 2012 10:16:07 for OpenNI 1.5.4 by   doxygen 1.7.5.1