Point Cloud Library (PCL)
1.7.0
|
Concrete implementation of the interface OpenNIDevice for a virtual device playing back an ONI file. More...
#include <pcl/io/openni_camera/openni_device_oni.h>
Public Member Functions | |
DeviceONI (xn::Context &context, const std::string &file_name, bool repeat=false, bool streaming=true) | |
virtual | ~DeviceONI () throw () |
virtual void | startImageStream () |
starts the image stream. | |
virtual void | stopImageStream () |
stops the image stream. | |
virtual void | startDepthStream () |
starts the depth stream. | |
virtual void | stopDepthStream () |
stops the depth stream. | |
virtual void | startIRStream () |
starts the IR stream. | |
virtual void | stopIRStream () |
stops the IR stream. | |
virtual bool | isImageStreamRunning () const throw () |
virtual bool | isDepthStreamRunning () const throw () |
virtual bool | isIRStreamRunning () const throw () |
virtual bool | isImageResizeSupported (unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const throw () |
bool | trigger (int relative_offset=0) |
Trigger a new frame in the ONI stream. | |
bool | isStreaming () const throw () |
bool | hasDataLeft () |
Check if there is any data left in the ONI file to process. | |
Protected Member Functions | |
virtual boost::shared_ptr< Image > | getCurrentImage (boost::shared_ptr< xn::ImageMetaData > image_meta_data) const throw () |
void | PlayerThreadFunction () |
Static Protected Member Functions | |
static void __stdcall | NewONIDepthDataAvailable (xn::ProductionNode &node, void *cookie) throw () |
static void __stdcall | NewONIImageDataAvailable (xn::ProductionNode &node, void *cookie) throw () |
static void __stdcall | NewONIIRDataAvailable (xn::ProductionNode &node, void *cookie) throw () |
Protected Attributes | |
xn::Player | player_ |
boost::thread | player_thread_ |
boost::mutex | player_mutex_ |
boost::condition_variable | player_condition_ |
bool | streaming_ |
bool | depth_stream_running_ |
bool | image_stream_running_ |
bool | ir_stream_running_ |
Friends | |
class | OpenNIDriver |
Concrete implementation of the interface OpenNIDevice for a virtual device playing back an ONI file.
Definition at line 55 of file openni_device_oni.h.
openni_wrapper::DeviceONI::DeviceONI | ( | xn::Context & | context, |
const std::string & | file_name, | ||
bool | repeat = false , |
||
bool | streaming = true |
||
) |
virtual openni_wrapper::DeviceONI::~DeviceONI | ( | ) | throw () [virtual] |
virtual boost::shared_ptr<Image> openni_wrapper::DeviceONI::getCurrentImage | ( | boost::shared_ptr< xn::ImageMetaData > | image_meta_data | ) | const throw () [protected, virtual] |
Implements openni_wrapper::OpenNIDevice.
bool openni_wrapper::DeviceONI::hasDataLeft | ( | ) | [inline] |
Check if there is any data left in the ONI file to process.
Definition at line 87 of file openni_device_oni.h.
References player_.
virtual bool openni_wrapper::DeviceONI::isDepthStreamRunning | ( | ) | const throw () [virtual] |
Reimplemented from openni_wrapper::OpenNIDevice.
virtual bool openni_wrapper::DeviceONI::isImageResizeSupported | ( | unsigned | input_width, |
unsigned | input_height, | ||
unsigned | output_width, | ||
unsigned | output_height | ||
) | const throw () [virtual] |
Implements openni_wrapper::OpenNIDevice.
virtual bool openni_wrapper::DeviceONI::isImageStreamRunning | ( | ) | const throw () [virtual] |
Reimplemented from openni_wrapper::OpenNIDevice.
virtual bool openni_wrapper::DeviceONI::isIRStreamRunning | ( | ) | const throw () [virtual] |
Reimplemented from openni_wrapper::OpenNIDevice.
bool openni_wrapper::DeviceONI::isStreaming | ( | ) | const throw () |
static void __stdcall openni_wrapper::DeviceONI::NewONIDepthDataAvailable | ( | xn::ProductionNode & | node, |
void * | cookie | ||
) | throw () [static, protected] |
static void __stdcall openni_wrapper::DeviceONI::NewONIImageDataAvailable | ( | xn::ProductionNode & | node, |
void * | cookie | ||
) | throw () [static, protected] |
static void __stdcall openni_wrapper::DeviceONI::NewONIIRDataAvailable | ( | xn::ProductionNode & | node, |
void * | cookie | ||
) | throw () [static, protected] |
void openni_wrapper::DeviceONI::PlayerThreadFunction | ( | ) | [protected] |
virtual void openni_wrapper::DeviceONI::startDepthStream | ( | ) | [virtual] |
starts the depth stream.
Reimplemented from openni_wrapper::OpenNIDevice.
virtual void openni_wrapper::DeviceONI::startImageStream | ( | ) | [virtual] |
starts the image stream.
Reimplemented from openni_wrapper::OpenNIDevice.
virtual void openni_wrapper::DeviceONI::startIRStream | ( | ) | [virtual] |
starts the IR stream.
Reimplemented from openni_wrapper::OpenNIDevice.
virtual void openni_wrapper::DeviceONI::stopDepthStream | ( | ) | [virtual] |
stops the depth stream.
Reimplemented from openni_wrapper::OpenNIDevice.
virtual void openni_wrapper::DeviceONI::stopImageStream | ( | ) | [virtual] |
stops the image stream.
Reimplemented from openni_wrapper::OpenNIDevice.
virtual void openni_wrapper::DeviceONI::stopIRStream | ( | ) | [virtual] |
stops the IR stream.
Reimplemented from openni_wrapper::OpenNIDevice.
bool openni_wrapper::DeviceONI::trigger | ( | int | relative_offset = 0 | ) |
Trigger a new frame in the ONI stream.
[in] | relative_offset | the relative offset in case we want to seek in the file |
friend class OpenNIDriver [friend] |
Definition at line 57 of file openni_device_oni.h.
bool openni_wrapper::DeviceONI::depth_stream_running_ [protected] |
Definition at line 105 of file openni_device_oni.h.
bool openni_wrapper::DeviceONI::image_stream_running_ [protected] |
Definition at line 106 of file openni_device_oni.h.
bool openni_wrapper::DeviceONI::ir_stream_running_ [protected] |
Definition at line 107 of file openni_device_oni.h.
xn::Player openni_wrapper::DeviceONI::player_ [protected] |
Definition at line 100 of file openni_device_oni.h.
Referenced by hasDataLeft().
boost::condition_variable openni_wrapper::DeviceONI::player_condition_ [protected] |
Definition at line 103 of file openni_device_oni.h.
boost::mutex openni_wrapper::DeviceONI::player_mutex_ [mutable, protected] |
Definition at line 102 of file openni_device_oni.h.
boost::thread openni_wrapper::DeviceONI::player_thread_ [protected] |
Definition at line 101 of file openni_device_oni.h.
bool openni_wrapper::DeviceONI::streaming_ [protected] |
Definition at line 104 of file openni_device_oni.h.