xn::CroppingCapability Class Reference
C++ Reference to Application Programmer Interface (API) » Production Nodes Functionality

`#include <XnCppWrapper.h>`

Inheritance diagram for xn::CroppingCapability:
[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)
NodeWrapper & | operator= (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

## CroppingCapability() [1/2]

xn::CroppingCapability::CroppingCapability | ( | XnNodeHandle | hNode | ) |

inline

Ctor

Parameters

  [in] | hNode | Node handle

## CroppingCapability() [2/2]

xn::CroppingCapability::CroppingCapability | ( | const NodeWrapper & | node | ) |

inline

## Member Function Documentation

## GetCropping()

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] | Cropping | Retreived cropping configuration.

Return values

  XN_STATUS_INVALID_OPERATION | The MapGenerator node does not support the Cropping capability.

## RegisterToCroppingChange()

XnStatus xn::CroppingCapability::RegisterToCroppingChange | ( | StateChangedHandler | handler,
|  | void * | pCookie,
|  | XnCallbackHandle & | hCallback )

inline

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

Parameters

  [in] | handler | Callback function to be invoked when the event is raised.
  [in] | pCookie | User's cookie, to be delivered to the callback.
  [out] | hCallback | Handle to the callback to be used for unregistering it.

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

## SetCropping()

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] | Cropping | Cropping configuration to be set.

Return values

  XN_STATUS_INVALID_OPERATION | The MapGenerator node does not support the Cropping capability.

## UnregisterFromCroppingChange()

void xn::CroppingCapability::UnregisterFromCroppingChange | ( | XnCallbackHandle | hCallback | ) |

inline

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

Parameters

  [in] | hCallback | Handle 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:

- XnCppWrapper.h