grasp
All Data Structures Namespaces Functions Modules
visualizationThread.h
1 /* Copyright: (C) 2014 iCub Facility - Istituto Italiano di Tecnologia
2  * Authors: Ilaria Gori
3  * email: ilaria.gori@iit.it
4  * Permission is granted to copy, distribute, and/or modify this program
5  * under the terms of the GNU General Public License, version 2 or any
6  * later version published by the Free Software Foundation.
7  *
8  * A copy of the license can be found in the file LICENSE located in the
9  * root directory.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details
15 */
16 
17 #ifndef __VISUALIZATION_THREAD_H__
18 #define __VISUALIZATION_THREAD_H__
19 
20 #include <yarp/os/Thread.h>
21 #include <yarp/sig/Vector.h>
22 #include <yarp/sig/Matrix.h>
23 #include <boost/thread/thread.hpp>
24 #include <pcl/visualization/pcl_visualizer.h>
25 #include <pcl/features/normal_3d.h>
26 #include <iCub/data3D/minBoundBox.h>
27 #include <iCub/data3D/boundingBox.h>
28 
29 struct DataToShow
30 {
31  pcl::PointCloud<pcl::PointXYZRGB> cloud;
32  pcl::PointCloud<pcl::Normal> normals;
33  pcl::PointCloud<pcl::PointXYZ> sampled_cloud;
34  iCub::data3D::BoundingBox boundingBox;
35  std::string hand;
36 };
37 
38 class VisualizationThread : public yarp::os::Thread
39 {
40 private:
41  DataToShow &data;
42  bool running;
43  int x;
44  int y;
45  int sizex;
46  int sizey;
47 
48 public:
49 
50  VisualizationThread(DataToShow &_data);
51  ~VisualizationThread() {};
52 
53  void onStop();
54  void run();
55  void setPosition(int x,int y);
56  void setSize(int sizex, int sizey);
57 };
58 
59 #endif
The Definition of the BoundingBox class.
Definition: boundingBox.h:61