37 #include <pcl/pcl_config.h>
40 #ifndef __OPENNI_DEVICE_ONI__
41 #define __OPENNI_DEVICE_ONI__
43 #include "openni_device.h"
44 #include "openni_driver.h"
59 DeviceONI (xn::Context& context,
const std::string& file_name,
bool repeat =
false,
bool streaming =
true);
75 virtual
bool isImageResizeSupported (
unsigned input_width,
unsigned input_height,
unsigned output_width,
unsigned output_height) const throw ();
81 trigger (
int relative_offset = 0);
93 virtual boost::shared_ptr<Image>
getCurrentImage (boost::shared_ptr<xn::ImageMetaData> image_meta_data)
const throw ();
110 #endif //__OPENNI_DEVICE_ONI__
boost::condition_variable player_condition_
bool trigger(int relative_offset=0)
Trigger a new frame in the ONI stream.
virtual void stopImageStream()
stops the image stream.
virtual void stopIRStream()
stops the IR stream.
bool hasDataLeft()
Check if there is any data left in the ONI file to process.
boost::mutex player_mutex_
bool depth_stream_running_
virtual bool isImageStreamRunning() const
virtual bool isDepthStreamRunning() const
static void __stdcall NewONIImageDataAvailable(xn::ProductionNode &node, void *cookie)
virtual void startDepthStream()
starts the depth stream.
virtual void stopDepthStream()
stops the depth stream.
virtual void startImageStream()
starts the image stream.
virtual void startIRStream()
starts the IR stream.
virtual bool isIRStreamRunning() const
virtual boost::shared_ptr< Image > getCurrentImage(boost::shared_ptr< xn::ImageMetaData > image_meta_data) const
Concrete implementation of the interface OpenNIDevice for a virtual device playing back an ONI file...
DeviceONI(xn::Context &context, const std::string &file_name, bool repeat=false, bool streaming=true)
bool image_stream_running_
Driver class implemented as Singleton.
static void __stdcall NewONIDepthDataAvailable(xn::ProductionNode &node, void *cookie)
boost::thread player_thread_
void PlayerThreadFunction()
static void __stdcall NewONIIRDataAvailable(xn::ProductionNode &node, void *cookie)
virtual bool isImageResizeSupported(unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const
Class representing an astract device for OpenNI devices: Primesense PSDK, Microsoft Kinect...