Point Cloud Library (PCL)
1.11.1-dev
|
39 #include <pcl/pcl_config.h>
43 #include "openni_device.h"
44 #include "openni_driver.h"
46 #include <pcl/io/openni_camera/openni_image.h>
48 #include <condition_variable>
65 using Ptr = pcl::shared_ptr<DeviceONI>;
66 using ConstPtr = pcl::shared_ptr<const DeviceONI>;
68 DeviceONI (xn::Context& context,
const std::string& file_name,
bool repeat =
false,
bool streaming =
true);
84 bool isImageResizeSupported (
unsigned input_width,
unsigned input_height,
unsigned output_width,
unsigned output_height) const throw () override;
90 trigger (
int relative_offset = 0);
void stopIRStream() override
stops the IR stream.
bool depth_stream_running_
Driver class implemented as Singleton.
DeviceONI(xn::Context &context, const std::string &file_name, bool repeat=false, bool streaming=true)
void PlayerThreadFunction()
pcl::shared_ptr< OpenNIDevice > Ptr
void startIRStream() override
starts the IR stream.
bool isImageResizeSupported(unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const override
void startImageStream() override
starts the image stream.
pcl::shared_ptr< Image > Ptr
bool image_stream_running_
static void __stdcall NewONIIRDataAvailable(xn::ProductionNode &node, void *cookie) noexcept
void stopDepthStream() override
stops the depth stream.
bool isDepthStreamRunning() const override
std::thread player_thread_
bool hasDataLeft()
Check if there is any data left in the ONI file to process.
Image::Ptr getCurrentImage(pcl::shared_ptr< xn::ImageMetaData > image_meta_data) const override
bool trigger(int relative_offset=0)
Trigger a new frame in the ONI stream.
pcl::shared_ptr< const OpenNIDevice > ConstPtr
Concrete implementation of the interface OpenNIDevice for a virtual device playing back an ONI file.
void stopImageStream() override
stops the image stream.
std::condition_variable player_condition_
bool isIRStreamRunning() const override
static void __stdcall NewONIDepthDataAvailable(xn::ProductionNode &node, void *cookie) noexcept
void startDepthStream() override
starts the depth stream.
Class representing an astract device for OpenNI devices: Primesense PSDK, Microsoft Kinect,...
bool isImageStreamRunning() const override
Defines functions, macros and traits for allocating and using memory.
static void __stdcall NewONIImageDataAvailable(xn::ProductionNode &node, void *cookie) noexcept