Point Cloud Library (PCL)  1.7.0
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
openni_wrapper::DeviceONI Class Reference

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>

+ Inheritance diagram for openni_wrapper::DeviceONI:

List of all members.

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< ImagegetCurrentImage (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

Detailed Description

Concrete implementation of the interface OpenNIDevice for a virtual device playing back an ONI file.

Author:
Suat Gedikli
Date:
19. june 2011

Definition at line 55 of file openni_device_oni.h.


Constructor & Destructor Documentation

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]

Member Function Documentation

virtual boost::shared_ptr<Image> openni_wrapper::DeviceONI::getCurrentImage ( boost::shared_ptr< xn::ImageMetaData >  image_meta_data) const throw () [protected, virtual]

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]
Returns:
true if the depth stream is running / started, false otherwise.

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]
virtual bool openni_wrapper::DeviceONI::isImageStreamRunning ( ) const throw () [virtual]
Returns:
true if the image stream is running / started, false otherwise.

Reimplemented from openni_wrapper::OpenNIDevice.

virtual bool openni_wrapper::DeviceONI::isIRStreamRunning ( ) const throw () [virtual]
Returns:
true if the IR stream is running / started, false otherwise.

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]
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.

Parameters:
[in]relative_offsetthe relative offset in case we want to seek in the file

Friends And Related Function Documentation

friend class OpenNIDriver [friend]

Definition at line 57 of file openni_device_oni.h.


Member Data Documentation

Definition at line 105 of file openni_device_oni.h.

Definition at line 106 of file openni_device_oni.h.

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.

Definition at line 104 of file openni_device_oni.h.


The documentation for this class was generated from the following file: