Public Member Functions | Protected Member Functions | Friends | List of all members
openni_wrapper::DevicePrimesense Class Reference

Concrete implementation of the interface OpenNIDevice for a Primesense device. More...

#include <openni_device_primesense.h>

Inheritance diagram for openni_wrapper::DevicePrimesense:
Inheritance graph
[legend]

Public Member Functions

 DevicePrimesense (xn::Context &context, const xn::NodeInfo &device_node, const xn::NodeInfo &image_node, const xn::NodeInfo &depth_node, const xn::NodeInfo &ir_node) throw (OpenNIException)
 
virtual ~DevicePrimesense () throw ()
 
- Public Member Functions inherited from openni_wrapper::OpenNIDevice
virtual bool findCompatibleDepthMode (const XnMapOutputMode &output_mode, XnMapOutputMode &mode) const throw (OpenNIException)
 
virtual bool findCompatibleImageMode (const XnMapOutputMode &output_mode, XnMapOutputMode &mode) const throw (OpenNIException)
 
unsigned char getAddress () const throw ()
 
float getBaseline () const throw ()
 
unsigned char getBus () const throw ()
 
const char * getConnectionString () const throw ()
 returns the connectionstring for current device, which has following format vendorID/productID@BusID/DeviceID More...
 
virtual const XnMapOutputMode & getDefaultDepthMode () const throw ()
 
virtual const XnMapOutputMode & getDefaultImageMode () const throw ()
 
virtual const XnMapOutputMode & getDefaultIRMode () const throw ()
 
float getDepthFocalLength (int output_x_resolution=0) const throw ()
 returns the focal length for the IR camera in pixels. The pixels are assumed to be square. Result depends on the output resolution of the depth image. More...
 
XnMapOutputMode getDepthOutputMode () const throw (OpenNIException)
 
float getImageFocalLength (int output_x_resolution=0) const throw ()
 returns the focal length for the color camera in pixels. The pixels are assumed to be square. Result depends on the output resolution of the image. More...
 
XnMapOutputMode getImageOutputMode () const throw (OpenNIException)
 
XnMapOutputMode getIROutputMode () const throw (OpenNIException)
 
unsigned short getProductID () const throw ()
 
const char * getProductName () const throw ()
 
const char * getSerialNumber () throw ()
 returns the serial number for device. More...
 
unsigned short getVendorID () const throw ()
 
const char * getVendorName () const throw ()
 
bool hasDepthStream () const throw ()
 
bool hasImageStream () const throw ()
 
bool hasIRStream () const throw ()
 
virtual bool isDepthCropped () const throw (OpenNIException)
 
virtual bool isDepthCroppingSupported () const throw ()
 
virtual bool isDepthModeSupported (const XnMapOutputMode &output_mode) const throw (OpenNIException)
 
bool isDepthRegistered () const throw (OpenNIException)
 
virtual bool isDepthRegistrationSupported () const throw (OpenNIException)
 
virtual bool isDepthStreamRunning () const throw (OpenNIException)
 
virtual bool isImageModeSupported (const XnMapOutputMode &output_mode) const throw (OpenNIException)
 
virtual bool isImageStreamRunning () const throw (OpenNIException)
 
virtual bool isIRStreamRunning () const throw (OpenNIException)
 
virtual bool isSynchronizationSupported () const throw ()
 
virtual bool isSynchronized () const throw (OpenNIException)
 
CallbackHandle registerDepthCallback (const DepthImageCallbackFunction &callback, void *cookie=NULL) throw ()
 
template<typename T >
CallbackHandle registerDepthCallback (void(T::*callback)(boost::shared_ptr< DepthImage >, void *cookie), T &instance, void *cookie=NULL) throw ()
 
CallbackHandle registerImageCallback (const ImageCallbackFunction &callback, void *cookie=NULL) throw ()
 
template<typename T >
CallbackHandle registerImageCallback (void(T::*callback)(boost::shared_ptr< Image >, void *cookie), T &instance, void *cookie=NULL) throw ()
 
CallbackHandle registerIRCallback (const IRImageCallbackFunction &callback, void *cookie=NULL) throw ()
 
template<typename T >
CallbackHandle registerIRCallback (void(T::*callback)(boost::shared_ptr< IRImage >, void *cookie), T &instance, void *cookie=NULL) throw ()
 
virtual void setDepthCropping (unsigned x, unsigned y, unsigned width, unsigned height) throw (OpenNIException)
 
virtual void setDepthOutputMode (const XnMapOutputMode &output_mode) throw (OpenNIException)
 
virtual void setDepthRegistration (bool on_off) throw (OpenNIException)
 
virtual void setImageOutputMode (const XnMapOutputMode &output_mode) throw (OpenNIException)
 
virtual void setIROutputMode (const XnMapOutputMode &output_mode) throw (OpenNIException)
 
virtual void setSynchronization (bool on_off) throw (OpenNIException)
 
void shutdown ()
 
virtual void startIRStream () throw (OpenNIException)
 
virtual void stopDepthStream () throw (OpenNIException)
 
virtual void stopImageStream () throw (OpenNIException)
 
virtual void stopIRStream () throw (OpenNIException)
 
bool unregisterDepthCallback (const CallbackHandle &callbackHandle) throw ()
 
bool unregisterImageCallback (const CallbackHandle &callbackHandle) throw ()
 
bool unregisterIRCallback (const CallbackHandle &callbackHandle) throw ()
 
virtual ~OpenNIDevice () throw ()
 

Protected Member Functions

virtual void enumAvailableModes () throw (OpenNIException)
 
virtual boost::shared_ptr< ImagegetCurrentImage (boost::shared_ptr< xn::ImageMetaData > image_meta_data) const throw ()
 
virtual bool isImageResizeSupported (unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const throw ()
 
virtual void startDepthStream () throw (OpenNIException)
 
virtual void startImageStream () throw (OpenNIException)
 
- Protected Member Functions inherited from openni_wrapper::OpenNIDevice
void DepthDataThreadFunction () throw (OpenNIException)
 
void ImageDataThreadFunction () throw (OpenNIException)
 
void Init () throw (OpenNIException)
 
void IRDataThreadFunction () throw (OpenNIException)
 
 OpenNIDevice (xn::Context &context, const xn::NodeInfo &device_node, const xn::NodeInfo &image_node, const xn::NodeInfo &depth_node, const xn::NodeInfo &ir_node) throw (OpenNIException)
 
 OpenNIDevice (xn::Context &context, const xn::NodeInfo &device_node, const xn::NodeInfo &depth_node, const xn::NodeInfo &ir_node) throw (OpenNIException)
 
 OpenNIDevice (xn::Context &context) throw (OpenNIException)
 
void setRegistration (bool on_off) throw (OpenNIException)
 

Friends

class OpenNIDriver
 

Additional Inherited Members

- Public Types inherited from openni_wrapper::OpenNIDevice
typedef unsigned CallbackHandle
 
typedef boost::function< void(boost::shared_ptr< DepthImage >, void *cookie) > DepthImageCallbackFunction
 
typedef boost::function< void(boost::shared_ptr< Image >, void *cookie) > ImageCallbackFunction
 
typedef boost::function< void(boost::shared_ptr< IRImage >, void *cookie) > IRImageCallbackFunction
 
- Protected Types inherited from openni_wrapper::OpenNIDevice
typedef boost::function< void(boost::shared_ptr< DepthImage >) > ActualDepthImageCallbackFunction
 
typedef boost::function< void(boost::shared_ptr< Image >) > ActualImageCallbackFunction
 
typedef boost::function< void(boost::shared_ptr< IRImage >) > ActualIRImageCallbackFunction
 
- Static Protected Member Functions inherited from openni_wrapper::OpenNIDevice
static void __stdcall NewDepthDataAvailable (xn::ProductionNode &node, void *cookie) throw ()
 
static void __stdcall NewImageDataAvailable (xn::ProductionNode &node, void *cookie) throw ()
 
static void __stdcall NewIRDataAvailable (xn::ProductionNode &node, void *cookie) throw ()
 
- Protected Attributes inherited from openni_wrapper::OpenNIDevice
std::vector< XnMapOutputMode > available_depth_modes_
 
std::vector< XnMapOutputMode > available_image_modes_
 
float baseline_
 distance between the projector and the IR camera More...
 
xn::Context & context_
 context to OpenNI driver More...
 
boost::thread_group data_threads_
 
std::map< CallbackHandle, ActualDepthImageCallbackFunctiondepth_callback_
 
XnCallbackHandle depth_callback_handle_
 
OpenNIDevice::CallbackHandle depth_callback_handle_counter_
 
boost::condition_variable depth_condition_
 
float depth_focal_length_SXGA_
 focal length for IR camera producing depth information in native SXGA mode More...
 
xn::DepthGenerator depth_generator_
 Depth generator object. More...
 
boost::mutex depth_mutex_
 
xn::NodeInfo device_node_info_
 node object for current device More...
 
std::map< CallbackHandle, ActualImageCallbackFunctionimage_callback_
 
XnCallbackHandle image_callback_handle_
 
OpenNIDevice::CallbackHandle image_callback_handle_counter_
 
boost::condition_variable image_condition_
 
xn::ImageGenerator image_generator_
 Image generator object. More...
 
boost::mutex image_mutex_
 
std::map< CallbackHandle, ActualIRImageCallbackFunctionir_callback_
 
XnCallbackHandle ir_callback_handle_
 
OpenNIDevice::CallbackHandle ir_callback_handle_counter_
 
boost::condition_variable ir_condition_
 
xn::IRGenerator ir_generator_
 IR generator object. More...
 
boost::mutex ir_mutex_
 
XnUInt64 no_sample_value_
 
bool quit_
 
XnUInt64 shadow_value_
 
- Static Protected Attributes inherited from openni_wrapper::OpenNIDevice
static const float rgb_focal_length_SXGA_ = 1050
 focal length for regular camera producing color images in native SXGA mode More...
 

Detailed Description

Concrete implementation of the interface OpenNIDevice for a Primesense device.

Author
Suat Gedikli
Date
02.january 2011

Definition at line 51 of file openni_device_primesense.h.

Constructor & Destructor Documentation

openni_wrapper::DevicePrimesense::DevicePrimesense ( xn::Context &  context,
const xn::NodeInfo &  device_node,
const xn::NodeInfo &  image_node,
const xn::NodeInfo &  depth_node,
const xn::NodeInfo &  ir_node 
)
throw (OpenNIException
)

Definition at line 48 of file openni_device_primesense.cpp.

openni_wrapper::DevicePrimesense::~DevicePrimesense ( )
throw (
)
virtual

Definition at line 74 of file openni_device_primesense.cpp.

Member Function Documentation

void openni_wrapper::DevicePrimesense::enumAvailableModes ( )
throw (OpenNIException
)
protectedvirtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 134 of file openni_device_primesense.cpp.

boost::shared_ptr< Image > openni_wrapper::DevicePrimesense::getCurrentImage ( boost::shared_ptr< xn::ImageMetaData >  image_meta_data) const
throw (
)
protectedvirtual

Implements openni_wrapper::OpenNIDevice.

Definition at line 198 of file openni_device_primesense.cpp.

bool openni_wrapper::DevicePrimesense::isImageResizeSupported ( unsigned  input_width,
unsigned  input_height,
unsigned  output_width,
unsigned  output_height 
) const
throw (
)
protectedvirtual

Implements openni_wrapper::OpenNIDevice.

Definition at line 88 of file openni_device_primesense.cpp.

void openni_wrapper::DevicePrimesense::startDepthStream ( )
throw (OpenNIException
)
protectedvirtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 243 of file openni_device_primesense.cpp.

void openni_wrapper::DevicePrimesense::startImageStream ( )
throw (OpenNIException
)
protectedvirtual

Reimplemented from openni_wrapper::OpenNIDevice.

Definition at line 203 of file openni_device_primesense.cpp.

Friends And Related Function Documentation

friend class OpenNIDriver
friend

Definition at line 53 of file openni_device_primesense.h.


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


openni_camera
Author(s): Patrick Mihelich, Suat Gedikli, Radu Bogdan Rusu
autogenerated on Mon Jun 10 2019 14:15:54