23 #ifndef __PLUGINS_OPENNI_POINTCLOUD_THREAD_H_
24 #define __PLUGINS_OPENNI_POINTCLOUD_THREAD_H_
26 #include <core/threading/thread.h>
27 #include <core/utils/lockptr.h>
28 #include <aspect/logging.h>
29 #include <aspect/configurable.h>
30 #include <aspect/clock.h>
31 #include <aspect/blocked_timing.h>
33 # include <aspect/pointcloud.h>
34 # include <pcl/point_cloud.h>
35 # include <pcl/point_types.h>
36 # include <fvutils/adapters/pcl.h>
38 #include <plugins/openni/aspect/openni.h>
40 #include <XnCppWrapper.h>
49 class SharedMemoryImageBuffer;
74 protected:
virtual void run() { Thread::run(); }
77 void fill_xyz_no_pcl(
fawkes::Time &ts,
const XnDepthPixel *
const data);
78 void fill_xyzrgb_no_pcl(
fawkes::Time &ts,
const XnDepthPixel *
const data);
79 void fill_xyz_xyzrgb_no_pcl(
fawkes::Time &ts,
const XnDepthPixel *
const data);
80 void fill_rgb_no_pcl();
83 void fill_xyz(
fawkes::Time &ts,
const XnDepthPixel *
const depth_data);
84 void fill_xyzrgb(
fawkes::Time &ts,
const XnDepthPixel *
const depth_data);
85 void fill_xyz_xyzrgb(
fawkes::Time &ts,
const XnDepthPixel *
const depth_data);
92 xn::DepthGenerator *__depth_gen;
93 xn::ImageGenerator *__image_gen;
94 xn::DepthMetaData *__depth_md;
96 bool __cfg_register_depth_image;
103 float __focal_length;
107 unsigned int __width;
108 unsigned int __height;
110 XnUInt64 __no_sample_value;
111 XnUInt64 __shadow_value;
116 bool __cfg_generate_pcl;
Thread aspect that allows to obtain the current time from the clock.
Fawkes library namespace.
Thread aspect to provide and access point clouds.
Thread aspect to get access to the OpenNI context.
virtual void run()
Stub to see name in backtrace for easier debugging.
A class for handling time.
Thread class encapsulation of pthreads.
virtual void init()
Initialize the thread.
Thread aspect to use blocked timing.
virtual void finalize()
Finalize the thread.
virtual ~OpenNiPointCloudThread()
Destructor.
Shared memory image buffer.
Thread aspect to log output.
virtual void loop()
Code to execute in the thread.
Thread aspect to access configuration data.
RefPtr<> is a reference-counting shared smartpointer.
OpenNI Point Cloud Provider Thread.
OpenNI Image Provider Thread.
OpenNiPointCloudThread(OpenNiImageThread *img_thread)
Constructor.