Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef SAMPLING_H
00033 #define SAMPLING_H
00034
00035 #include "handle_detector/cylindrical_shell.h"
00036 #include <pcl/point_types.h>
00037 #include <pcl/visualization/pcl_visualizer.h>
00038 #include <vector>
00039
00040 typedef pcl::PointCloud<pcl::PointXYZ> PointCloud;
00041 typedef pcl::PointCloud<pcl::PointXYZRGB> PointCloudRGB;
00042
00047 class SamplingVisualizer
00048 {
00049 public:
00057 pcl::ModelCoefficients
00058 createCylinder(Eigen::Vector3d pt_on_axis, Eigen::Vector3d axis_direction, double radius, double extent);
00059
00066 void
00067 addCylinders(const std::vector<CylindricalShell> &shells, void* viewer_void, std::string handle_index = "", double r =
00068 0.0,
00069 double g = 1.0, double b = 1.0);
00070
00078 void
00079 createViewer(PointCloud::ConstPtr cloud, std::vector<CylindricalShell> shells, Eigen::MatrixXd samples,
00080 double target_radius);
00081
00089 void
00090 createViewerRGB(PointCloudRGB::ConstPtr cloud, std::vector<CylindricalShell> shells, Eigen::MatrixXd samples,
00091 double target_radius);
00092
00096 inline boost::shared_ptr<pcl::visualization::PCLVisualizer> getViewer()
00097 {
00098 return this->viewer;
00099 }
00100 ;
00101
00102 private:
00103 boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer;
00104 };
00105
00106 #endif