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 <boost/thread/thread.hpp>
21 
22 #include <pcl/visualization/pcl_visualizer.h>
23 #include <pcl/features/normal_3d.h>
24 
25 #include <yarp/os/Thread.h>
26 #include <yarp/sig/Vector.h>
27 #include <yarp/sig/Matrix.h>
28 
29 #include <iCub/data3D/minBoundBox.h>
30 #include <iCub/data3D/boundingBox.h>
31 
32 struct DataToShow
33 {
34  pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud;
35  pcl::PointCloud<pcl::Normal>::Ptr normals;
36  iCub::data3D::BoundingBox *boundingBox;
37  std::vector<int> *goodPointsIndexes;
38  yarp::sig::Vector chosenPoint;
39  yarp::sig::Matrix chosenOrientation;
40  std::string hand;
41 };
42 
43 class VisualizationThread : public yarp::os::Thread
44 {
45 private:
46  DataToShow &data;
47  bool fromFile;
48  int x;
49  int y;
50  int sizex;
51  int sizey;
52 
53  void run();
54 
55 public:
56  VisualizationThread(DataToShow &_data);
57  ~VisualizationThread() {};
58 
59  void setPosition(int x,int y);
60  void setSize(int sizex, int sizey);
61 };
62 
63 #endif
The Definition of the BoundingBox class.
Definition: boundingBox.h:61