Fawkes API  Fawkes Development Version
data_plugin.cpp
00001 
00002 /***************************************************************************
00003  *  data_plugin.cpp - OpenNI raw data provider for Fawkes
00004  *
00005  *  Created: Thu Dec 22 11:31:32 2011
00006  *  Copyright  2006-2011  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU Library General Public License for more details.
00019  *
00020  *  Read the full text in the LICENSE.GPL file in the doc directory.
00021  */
00022 
00023 #include "image_thread.h"
00024 #include "depth_thread.h"
00025 #include "pointcloud_thread.h"
00026 #include <core/plugin.h>
00027 
00028 using namespace fawkes;
00029 
00030 /** Plugin provide raw OpenNI data to Fawkes plugins.
00031  * This plugin publishes the image, depth, and point cloud data from
00032  * OpenNI to other Fawkes plugins.
00033  * @author Tim Niemueller
00034  */
00035 class OpenNiDataPlugin : public fawkes::Plugin
00036 {
00037  public:
00038   /** Constructor.
00039    * @param config Fawkes configuration
00040    */
00041   OpenNiDataPlugin(Configuration *config) : Plugin(config)
00042   {
00043     OpenNiImageThread *img_thread = new OpenNiImageThread();
00044     thread_list.push_back(img_thread);
00045     thread_list.push_back(new OpenNiDepthThread());
00046     thread_list.push_back(new OpenNiPointCloudThread(img_thread));
00047   }
00048 };
00049 
00050 PLUGIN_DESCRIPTION("Image, depth, and point cloud provider")
00051 EXPORT_PLUGIN(OpenNiDataPlugin)