
#ifndef _XNV_LABEL_PRUNER_H_
#define _XNV_LABEL_PRUNER_H_

//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include "XnVLabeledObject.h"
#include "XnVDepthMap.h"
#include "XnVLabelMatrix.h"

//---------------------------------------------------------------------------
// Types
//-----------------------------------------------------------------------

/**
 * This algorithm removes from the input XnVDepthMap the values where the matching XnVLabelMatrix has 
 * a value different from the input XnVObject::XnVLabel.
 */

class XN_EE_FW_API XnVLabelPruner
{
public:
	/**
	* Set NoSample value in all the places in the depth map that correspond with a label other than
	* the desired one.
	*
	* @param	[in,out]	dmMap	The depth map to be pruned
	* @param	[in]	lmLabels	Label per pixel
	* @param	[in]	nLabel		The label we want to keep
	*/
	XnStatus Run(XnVDepthMap& dmMap, const XnVLabelMatrix& lmLabels, const XnVObject::XnVLabel nLabel);
	XnStatus Run(XnVLabeledObject& lo);
};

#endif // _XNV_LABEL_PRUNER_H_
