OpenNI 1.5.4
Public Member Functions | List of all members
xn::CroppingCapability Class Reference

#include <XnCppWrapper.h>

Inheritance diagram for xn::CroppingCapability:
Inheritance graph
[legend]

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)
 
- Public Member Functions inherited from xn::Capability
 Capability (XnNodeHandle hNode)
 
 Capability (const NodeWrapper &node)
 
- Public Member Functions inherited from xn::NodeWrapper
 NodeWrapper (XnNodeHandle hNode)
 
 NodeWrapper (const NodeWrapper &other)
 
NodeWrapperoperator= (const NodeWrapper &other)
 
 ~NodeWrapper ()
 
 operator XnNodeHandle () const
 
XnNodeHandle GetHandle () const
 
XnBool operator== (const NodeWrapper &other)
 
XnBool operator!= (const NodeWrapper &other)
 
XnBool IsValid () const
 
const XnChar * GetName () const
 
XnStatus AddRef ()
 
void Release ()
 
void SetHandle (XnNodeHandle hNode)
 
void TakeOwnership (XnNodeHandle hNode)
 

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: