38 #ifndef PCL_PCL_VISUALIZER_H_ 39 #define PCL_PCL_VISUALIZER_H_ 42 #include <pcl/correspondence.h> 43 #include <pcl/ModelCoefficients.h> 44 #include <pcl/PolygonMesh.h> 45 #include <pcl/TextureMesh.h> 47 #include <pcl/console/print.h> 48 #include <pcl/visualization/common/actor_map.h> 49 #include <pcl/visualization/common/common.h> 50 #include <pcl/visualization/point_cloud_geometry_handlers.h> 51 #include <pcl/visualization/point_cloud_color_handlers.h> 52 #include <pcl/visualization/point_picking_event.h> 53 #include <pcl/visualization/area_picking_event.h> 54 #include <pcl/visualization/interactor_style.h> 59 class vtkRenderWindow;
60 class vtkOrientationMarkerWidget;
61 class vtkAppendPolyData;
62 class vtkRenderWindow;
63 class vtkRenderWindowInteractor;
65 class vtkInteractorStyle;
70 class vtkUnstructuredGrid;
75 template <
typename T>
class PlanarPolygon;
77 namespace visualization
89 typedef boost::shared_ptr<PCLVisualizer>
Ptr;
90 typedef boost::shared_ptr<const PCLVisualizer>
ConstPtr;
104 PCLVisualizer (
const std::string &name =
"",
const bool create_interactor =
true);
113 PCLVisualizer (
int &argc,
char **argv,
const std::string &name =
"",
125 setFullScreen (
bool mode);
131 setWindowName (
const std::string &name);
139 setWindowBorders (
bool mode);
145 boost::signals2::connection
153 inline boost::signals2::connection
156 return (registerKeyboardCallback (boost::bind (callback, _1, cookie)));
165 template<
typename T>
inline boost::signals2::connection
168 return (registerKeyboardCallback (boost::bind (callback, boost::ref (instance), _1, cookie)));
175 boost::signals2::connection
183 inline boost::signals2::connection
186 return (registerMouseCallback (boost::bind (callback, _1, cookie)));
195 template<
typename T>
inline boost::signals2::connection
198 return (registerMouseCallback (boost::bind (callback, boost::ref (instance), _1, cookie)));
205 boost::signals2::connection
213 boost::signals2::connection
222 template<
typename T>
inline boost::signals2::connection
225 return (registerPointPickingCallback (boost::bind (callback, boost::ref (instance), _1, cookie)));
232 boost::signals2::connection
240 boost::signals2::connection
249 template<
typename T>
inline boost::signals2::connection
252 return (registerAreaPickingCallback (boost::bind (callback, boost::ref (instance), _1, cookie)));
265 spinOnce (
int time = 1,
bool force_redraw =
false);
271 addOrientationMarkerWidgetAxes (vtkRenderWindowInteractor* interactor);
275 removeOrientationMarkerWidgetAxes ();
282 "addCoordinateSystem (scale, viewport) is deprecated, please use function " 283 "addCoordinateSystem (scale, id, viewport) with id a unique string identifier.")
285 addCoordinateSystem (
double scale,
int viewport);
293 addCoordinateSystem (
double scale = 1.0,
const std::string&
id =
"reference",
int viewport = 0);
303 "addCoordinateSystem (scale, x, y, z, viewport) is deprecated, please use function " 304 "addCoordinateSystem (scale, x, y, z, id, viewport) with id a unique string identifier.")
306 addCoordinateSystem (
double scale,
float x,
float y,
float z,
int viewport);
317 addCoordinateSystem (
double scale,
float x,
float y,
float z,
const std::string &
id =
"reference",
int viewport = 0);
326 "addCoordinateSystem (scale, t, viewport) is deprecated, please use function " 327 "addCoordinateSystem (scale, t, id, viewport) with id a unique string identifier.")
329 addCoordinateSystem (
double scale,
const Eigen::Affine3f& t,
int viewport);
367 addCoordinateSystem (
double scale,
const Eigen::Affine3f& t,
const std::string &
id =
"reference",
int viewport = 0);
373 "removeCoordinateSystem (viewport) is deprecated, please use function " 374 "addCoordinateSystem (id, viewport) with id a unique string identifier.")
376 removeCoordinateSystem (
int viewport);
383 removeCoordinateSystem (
const std::string &
id =
"reference",
int viewport = 0);
392 removePointCloud (
const std::string &
id =
"cloud",
int viewport = 0);
402 return (removePointCloud (
id, viewport));
411 removeShape (
const std::string &
id =
"cloud",
int viewport = 0);
418 removeText3D (
const std::string &
id =
"cloud",
int viewport = 0);
424 removeAllPointClouds (
int viewport = 0);
430 removeAllShapes (
int viewport = 0);
436 removeAllCoordinateSystems (
int viewport = 0);
445 setBackgroundColor (
const double &r,
const double &g,
const double &b,
int viewport = 0);
455 addText (
const std::string &text,
457 const std::string &
id =
"",
int viewport = 0);
470 addText (
const std::string &text,
int xpos,
int ypos,
double r,
double g,
double b,
471 const std::string &
id =
"",
int viewport = 0);
485 addText (
const std::string &text,
int xpos,
int ypos,
int fontsize,
double r,
double g,
double b,
486 const std::string &
id =
"",
int viewport = 0);
496 updateText (
const std::string &text,
498 const std::string &
id =
"");
510 updateText (
const std::string &text,
511 int xpos,
int ypos,
double r,
double g,
double b,
512 const std::string &
id =
"");
525 updateText (
const std::string &text,
526 int xpos,
int ypos,
int fontsize,
double r,
double g,
double b,
527 const std::string &
id =
"");
539 updateShapePose (
const std::string &
id,
const Eigen::Affine3f& pose);
551 updateCoordinateSystemPose (
const std::string &
id,
const Eigen::Affine3f& pose);
563 updatePointCloudPose (
const std::string &
id,
const Eigen::Affine3f& pose);
575 template <
typename Po
intT>
bool 576 addText3D (
const std::string &text,
578 double textScale = 1.0,
579 double r = 1.0,
double g = 1.0,
double b = 1.0,
580 const std::string &
id =
"",
int viewport = 0);
589 return (cloud_actor_map_->find (
id) != cloud_actor_map_->end () ||
590 shape_actor_map_->find (
id) != shape_actor_map_->end () ||
591 coordinate_actor_map_->find (
id) != coordinate_actor_map_-> end());
601 template <
typename Po
intNT>
bool 603 int level = 100,
float scale = 0.02f,
604 const std::string &
id =
"cloud",
int viewport = 0);
614 template <
typename Po
intT,
typename Po
intNT>
bool 617 int level = 100,
float scale = 0.02f,
618 const std::string &
id =
"cloud",
int viewport = 0);
628 template <
typename Po
intNT>
bool 629 addPointCloudPrincipalCurvatures (
632 int level = 100,
float scale = 1.0f,
633 const std::string &
id =
"cloud",
int viewport = 0);
644 template <
typename Po
intT,
typename Po
intNT>
bool 645 addPointCloudPrincipalCurvatures (
649 int level = 100,
float scale = 1.0f,
650 const std::string &
id =
"cloud",
int viewport = 0);
660 template <
typename Po
intT,
typename GradientT>
bool 663 int level = 100,
double scale = 1e-6,
664 const std::string &
id =
"cloud",
int viewport = 0);
671 template <
typename Po
intT>
bool 673 const std::string &
id =
"cloud",
int viewport = 0);
680 template <
typename Po
intT>
bool 682 const std::string &
id =
"cloud");
690 template <
typename Po
intT>
bool 693 const std::string &
id =
"cloud");
701 template <
typename Po
intT>
bool 704 const std::string &
id =
"cloud");
712 template <
typename Po
intT>
bool 715 const std::string &
id =
"cloud",
int viewport = 0);
729 template <
typename Po
intT>
bool 731 const GeometryHandlerConstPtr &geometry_handler,
732 const std::string &
id =
"cloud",
int viewport = 0);
740 template <
typename Po
intT>
bool 743 const std::string &
id =
"cloud",
int viewport = 0);
757 template <
typename Po
intT>
bool 759 const ColorHandlerConstPtr &color_handler,
760 const std::string &
id =
"cloud",
int viewport = 0);
775 template <
typename Po
intT>
bool 777 const GeometryHandlerConstPtr &geometry_handler,
778 const ColorHandlerConstPtr &color_handler,
779 const std::string &
id =
"cloud",
int viewport = 0);
798 const GeometryHandlerConstPtr &geometry_handler,
799 const ColorHandlerConstPtr &color_handler,
800 const Eigen::Vector4f& sensor_origin,
801 const Eigen::Quaternion<float>& sensor_orientation,
802 const std::string &
id =
"cloud",
int viewport = 0);
820 const GeometryHandlerConstPtr &geometry_handler,
821 const Eigen::Vector4f& sensor_origin,
822 const Eigen::Quaternion<float>& sensor_orientation,
823 const std::string &
id =
"cloud",
int viewport = 0);
841 const ColorHandlerConstPtr &color_handler,
842 const Eigen::Vector4f& sensor_origin,
843 const Eigen::Quaternion<float>& sensor_orientation,
844 const std::string &
id =
"cloud",
int viewport = 0);
853 template <
typename Po
intT>
bool 857 const std::string &
id =
"cloud",
int viewport = 0);
866 const std::string &
id =
"cloud",
int viewport = 0)
868 return (addPointCloud<pcl::PointXYZ> (cloud,
id, viewport));
879 const std::string &
id =
"cloud",
int viewport = 0)
882 return (addPointCloud<pcl::PointXYZRGB> (cloud, color_handler,
id, viewport));
892 const std::string &
id =
"cloud",
int viewport = 0)
895 return (addPointCloud<pcl::PointXYZRGBA> (cloud, color_handler,
id, viewport));
905 const std::string &
id =
"cloud",
int viewport = 0)
908 return (addPointCloud<pcl::PointXYZL> (cloud, color_handler,
id, viewport));
918 const std::string &
id =
"cloud")
920 return (updatePointCloud<pcl::PointXYZ> (cloud,
id));
930 const std::string &
id =
"cloud")
933 return (updatePointCloud<pcl::PointXYZRGB> (cloud, color_handler,
id));
943 const std::string &
id =
"cloud")
946 return (updatePointCloud<pcl::PointXYZRGBA> (cloud, color_handler,
id));
956 const std::string &
id =
"cloud")
959 return (updatePointCloud<pcl::PointXYZL> (cloud, color_handler,
id));
969 const std::string &
id =
"polygon",
978 template <
typename Po
intT>
bool 980 const std::vector<pcl::Vertices> &vertices,
981 const std::string &
id =
"polygon",
990 template <
typename Po
intT>
bool 992 const std::vector<pcl::Vertices> &vertices,
993 const std::string &
id =
"polygon");
1002 const std::string &
id =
"polygon");
1011 const std::string &
id =
"polyline",
1021 template <
typename Po
intT>
bool 1024 const std::vector<int> & correspondences,
1025 const std::string &
id =
"correspondences",
1035 const std::string &
id =
"texture",
1047 template <
typename Po
intT>
bool 1052 const std::string &
id =
"correspondences",
1054 bool overwrite =
false);
1063 template <
typename Po
intT>
bool 1067 const std::string &
id =
"correspondences",
1071 return (addCorrespondences<PointT> (source_points, target_points,
1072 correspondences, 1,
id, viewport));
1083 template <
typename Po
intT>
bool 1084 updateCorrespondences (
1089 const std::string &
id =
"correspondences",
1099 template <
typename Po
intT>
bool 1104 const std::string &
id =
"correspondences",
1108 return (updateCorrespondences<PointT> (source_points, target_points,
1109 correspondences, 1,
id, viewport));
1117 removeCorrespondences (
const std::string &
id =
"correspondences",
int viewport = 0);
1123 getColorHandlerIndex (
const std::string &
id);
1129 getGeometryHandlerIndex (
const std::string &
id);
1136 updateColorHandlerIndex (
const std::string &
id,
int index);
1148 setPointCloudRenderingProperties (
int property,
double val1,
double val2,
double val3,
1149 const std::string &
id =
"cloud",
int viewport = 0);
1160 setPointCloudRenderingProperties (
int property,
double val1,
double val2,
1161 const std::string &
id =
"cloud",
int viewport = 0);
1171 setPointCloudRenderingProperties (
int property,
double value,
1172 const std::string &
id =
"cloud",
int viewport = 0);
1181 getPointCloudRenderingProperties (
int property,
double &value,
1182 const std::string &
id =
"cloud");
1189 setPointCloudSelected (
const bool selected,
const std::string &
id =
"cloud" );
1200 setShapeRenderingProperties (
int property,
double value,
1201 const std::string &
id,
int viewport = 0);
1213 setShapeRenderingProperties (
int property,
double val1,
double val2,
double val3,
1214 const std::string &
id,
int viewport = 0);
1218 wasStopped ()
const;
1222 resetStoppedFlag ();
1240 createViewPort (
double xmin,
double ymin,
double xmax,
double ymax,
int &viewport);
1246 createViewPortCamera (
const int viewport);
1257 template <
typename Po
intT>
bool 1259 double r,
double g,
double b,
1260 const std::string &
id =
"polygon",
int viewport = 0);
1268 template <
typename Po
intT>
bool 1270 const std::string &
id =
"polygon",
1281 template <
typename Po
intT>
bool 1283 double r,
double g,
double b,
1284 const std::string &
id =
"polygon",
1293 template <
typename P1,
typename P2>
bool 1294 addLine (
const P1 &pt1,
const P2 &pt2,
const std::string &
id =
"line",
1306 template <
typename P1,
typename P2>
bool 1307 addLine (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1308 const std::string &
id =
"line",
int viewport = 0);
1322 template <
typename P1,
typename P2>
bool 1323 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1324 const std::string &
id =
"arrow",
int viewport = 0);
1339 template <
typename P1,
typename P2>
bool 1340 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
bool display_length,
1341 const std::string &
id =
"arrow",
int viewport = 0);
1358 template <
typename P1,
typename P2>
bool 1359 addArrow (
const P1 &pt1,
const P2 &pt2,
1360 double r_line,
double g_line,
double b_line,
1361 double r_text,
double g_text,
double b_text,
1362 const std::string &
id =
"arrow",
int viewport = 0);
1371 template <
typename Po
intT>
bool 1372 addSphere (
const PointT ¢er,
double radius,
const std::string &
id =
"sphere",
1384 template <
typename Po
intT>
bool 1385 addSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1386 const std::string &
id =
"sphere",
int viewport = 0);
1396 template <
typename Po
intT>
bool 1397 updateSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1398 const std::string &
id =
"sphere");
1407 const std::string &
id =
"PolyData",
1419 const std::string &
id =
"PolyData",
1428 addModelFromPLYFile (
const std::string &filename,
1429 const std::string &
id =
"PLYModel",
1439 addModelFromPLYFile (
const std::string &filename,
1441 const std::string &
id =
"PLYModel",
1472 const std::string &
id =
"cylinder",
1499 const std::string &
id =
"sphere",
1527 const std::string &
id =
"line",
1552 const std::string &
id =
"plane",
1557 const std::string &
id =
"plane",
1580 const std::string &
id =
"circle",
1590 const std::string &
id =
"cone",
1600 const std::string &
id =
"cube",
1613 addCube (
const Eigen::Vector3f &translation,
const Eigen::Quaternionf &rotation,
1614 double width,
double height,
double depth,
1615 const std::string &
id =
"cube",
1632 addCube (
float x_min,
float x_max,
float y_min,
float y_max,
float z_min,
float z_max,
1633 double r = 1.0,
double g = 1.0,
double b = 1.0,
const std::string &
id =
"cube",
int viewport = 0);
1637 setRepresentationToSurfaceForAllActors ();
1641 setRepresentationToPointsForAllActors ();
1645 setRepresentationToWireframeForAllActors ();
1651 setShowFPS (
bool show_fps);
1681 renderViewTesselatedSphere (
1684 std::vector<Eigen::Matrix4f,Eigen::aligned_allocator< Eigen::Matrix4f > > & poses, std::vector<float> & enthropies,
int tesselation_level,
1685 float view_angle = 45,
float radius_sphere = 1,
bool use_vertices =
true);
1690 initCameraParameters ();
1697 getCameraParameters (
int argc,
char **argv);
1703 loadCameraParameters (
const std::string &file);
1710 cameraParamsSet ()
const;
1719 cameraFileLoaded ()
const;
1727 getCameraFile ()
const;
1741 resetCameraViewpoint (
const std::string &
id =
"cloud");
1756 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1757 double view_x,
double view_y,
double view_z,
1758 double up_x,
double up_y,
double up_z,
int viewport = 0);
1770 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1771 double up_x,
double up_y,
double up_z,
int viewport = 0);
1780 setCameraParameters (
const Eigen::Matrix3f &intrinsics,
const Eigen::Matrix4f &extrinsics,
int viewport = 0);
1787 setCameraParameters (
const Camera &camera,
int viewport = 0);
1795 setCameraClipDistances (
double near,
double far,
int viewport = 0);
1802 setCameraFieldOfView (
double fovy,
int viewport = 0);
1806 getCameras (std::vector<Camera>& cameras);
1811 getViewerPose (
int viewport = 0);
1817 saveScreenshot (
const std::string &file);
1823 saveCameraParameters (
const std::string &file);
1829 getCameraParameters (
Camera &camera);
1849 return (cloud_actor_map_);
1856 return (shape_actor_map_);
1864 setPosition (
int x,
int y);
1871 setSize (
int xw,
int yw);
1879 setUseVbos (
bool use_vbos);
1885 setLookUpTableID (
const std::string
id);
1889 createInteractor ();
1897 setupInteractor (vtkRenderWindowInteractor *iren,
1898 vtkRenderWindow *win);
1907 setupInteractor (vtkRenderWindowInteractor *iren,
1908 vtkRenderWindow *win,
1909 vtkInteractorStyle *style);
1919 #if ((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 4)) 1925 struct ExitMainLoopTimerCallback :
public vtkCommand
1927 static ExitMainLoopTimerCallback* New ()
1929 return (
new ExitMainLoopTimerCallback);
1932 Execute (vtkObject*,
unsigned long event_id,
void*);
1938 struct ExitCallback :
public vtkCommand
1940 static ExitCallback* New ()
1942 return (
new ExitCallback);
1945 Execute (vtkObject*,
unsigned long event_id,
void*);
1951 struct FPSCallback :
public vtkCommand
1953 static FPSCallback *New () {
return (
new FPSCallback); }
1955 FPSCallback () : actor (), pcl_visualizer (), decimated () {}
1956 FPSCallback (
const FPSCallback& src) : vtkCommand (), actor (src.actor), pcl_visualizer (src.pcl_visualizer), decimated (src.decimated) {}
1957 FPSCallback& operator = (
const FPSCallback& src) { actor = src.actor; pcl_visualizer = src.pcl_visualizer; decimated = src.decimated;
return (*
this); }
1960 Execute (vtkObject*,
unsigned long event_id,
void*);
1962 vtkTextActor *actor;
1970 #if !((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 4)) 2006 bool camera_file_loaded_;
2054 bool use_scalars =
true);
2064 bool use_scalars =
true);
2072 template <
typename Po
intT>
void 2083 template <
typename Po
intT>
void 2095 convertPointCloudToVTKPolyData (
const GeometryHandlerConstPtr &geometry_handler,
2110 vtkIdType nr_points);
2122 template <
typename Po
intT>
bool 2125 const std::string &
id,
2127 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2128 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2140 template <
typename Po
intT>
bool 2142 const ColorHandlerConstPtr &color_handler,
2143 const std::string &
id,
2145 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2146 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2159 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2160 const ColorHandlerConstPtr &color_handler,
2161 const std::string &
id,
2163 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2164 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2176 template <
typename Po
intT>
bool 2177 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2179 const std::string &
id,
2181 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2182 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2208 getTransformationMatrix (
const Eigen::Vector4f &origin,
2209 const Eigen::Quaternion<float> &orientation,
2210 Eigen::Matrix4f &transformation);
2221 vtkTexture* vtk_tex)
const;
2228 getUniqueCameraFile (
int argc,
char **argv);
2237 convertToVtkMatrix (
const Eigen::Matrix4f &m,
2246 convertToVtkMatrix (
const Eigen::Vector4f &origin,
2247 const Eigen::Quaternion<float> &orientation,
2256 Eigen::Matrix4f &m);
2262 #include <pcl/visualization/impl/pcl_visualizer.hpp> static PCLVisualizerInteractorStyle * New()
vtkSmartPointer< PCLVisualizerInteractorStyle > getInteractorStyle()
Get a pointer to the current interactor style used.
PointCloudGeometryHandler< pcl::PCLPointCloud2 > GeometryHandler
Base Handler class for PointCloud colors.
PointCloudColorHandler< pcl::PCLPointCloud2 > ColorHandler
std::vector< PointCloud< PointT >, Eigen::aligned_allocator< PointCloud< PointT > > > CloudVectorType
bool updatePointCloud(const pcl::PointCloud< pcl::PointXYZL >::ConstPtr &cloud, const std::string &id="cloud")
Updates the XYZL data for an existing cloud object id on screen.
GeometryHandler::Ptr GeometryHandlerPtr
bool addPointCloud(const pcl::PointCloud< pcl::PointXYZRGB >::ConstPtr &cloud, const std::string &id="cloud", int viewport=0)
Add a PointXYZRGB Point Cloud to screen.
Label field handler class for colors.
bool updatePointCloud(const pcl::PointCloud< pcl::PointXYZRGB >::ConstPtr &cloud, const std::string &id="cloud")
Updates the XYZRGB data for an existing cloud object id on screen.
boost::shared_ptr< const PCLVisualizer > ConstPtr
bool addPointCloud(const pcl::PointCloud< pcl::PointXYZL >::ConstPtr &cloud, const std::string &id="cloud", int viewport=0)
Add a PointXYZL Point Cloud to screen.
boost::shared_ptr< CoordinateActorMap > CoordinateActorMapPtr
ColorHandler::ConstPtr ColorHandlerConstPtr
boost::shared_ptr< const PointCloudGeometryHandler< PointCloud > > ConstPtr
Camera class holds a set of camera parameters together with the window pos/size.
boost::shared_ptr< const PointCloudColorHandler< PointCloud > > ConstPtr
vtkSmartPointer< vtkRendererCollection > getRendererCollection()
Return a pointer to the underlying VTK Renderer Collection.
/brief Class representing 3D point picking events.
bool updatePointCloud(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloud, const std::string &id="cloud")
Updates the XYZ data for an existing cloud object id on screen.
boost::shared_ptr< CloudActorMap > CloudActorMapPtr
Base Handler class for PointCloud colors.
boost::shared_ptr< PointCloud< PointT > > Ptr
bool addPointCloud(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloud, const std::string &id="cloud", int viewport=0)
Add a PointXYZ Point Cloud to screen.
vtkSmartPointer< vtkRenderWindowInteractor > interactor_
The render window interactor.
Base handler class for PointCloud geometry.
boost::signals2::connection registerKeyboardCallback(void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=NULL)
Register a callback function for keyboard events.
boost::signals2::connection registerAreaPickingCallback(void(T::*callback)(const pcl::visualization::AreaPickingEvent &, void *), T &instance, void *cookie=NULL)
Register a callback function for area picking events.
boost::shared_ptr< PCLVisualizer > Ptr
bool updateCorrespondences(const typename pcl::PointCloud< PointT >::ConstPtr &source_points, const typename pcl::PointCloud< PointT >::ConstPtr &target_points, const pcl::Correspondences &correspondences, const std::string &id="correspondences", int viewport=0)
Update the specified correspondences to the display.
PCL Visualizer main class.
bool removePolygonMesh(const std::string &id="polygon", int viewport=0)
Removes a PolygonMesh from screen, based on a given ID.
PlanarPolygon represents a planar (2D) polygon, potentially in a 3D space.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
RGB handler class for colors.
ShapeActorMapPtr getShapeActorMap()
Return a pointer to the ShapeActorMap this visualizer uses.
boost::shared_ptr< PointCloudGeometryHandler< PointCloud > > Ptr
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
bool contains(const std::string &id) const
Check if the cloud, shape, or coordinate with the given id was already added to this visualizer...
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
PointCloud represents the base class in PCL for storing collections of 3D points. ...
PCL_EXPORTS void allocVtkUnstructuredGrid(vtkSmartPointer< vtkUnstructuredGrid > &polydata)
Allocate a new unstructured grid smartpointer.
PCLVisualizerInteractorStyle defines an unique, custom VTK based interactory style for PCL Visualizer...
bool addCorrespondences(const typename pcl::PointCloud< PointT >::ConstPtr &source_points, const typename pcl::PointCloud< PointT >::ConstPtr &target_points, const pcl::Correspondences &correspondences, const std::string &id="correspondences", int viewport=0)
Add the specified correspondences to the display.
boost::shared_ptr< PointCloudColorHandler< PointCloud > > Ptr
vtkSmartPointer< vtkRenderWindow > getRenderWindow()
Return a pointer to the underlying VTK Render Window used.
ColorHandler::Ptr ColorHandlerPtr
CloudActorMapPtr getCloudActorMap()
Return a pointer to the CloudActorMap this visualizer uses.
boost::signals2::connection registerKeyboardCallback(void(T::*callback)(const pcl::visualization::KeyboardEvent &, void *), T &instance, void *cookie=NULL)
Register a callback function for keyboard events.
Base handler class for PointCloud geometry.
/brief Class representing 3D area picking events.
GeometryHandler::ConstPtr GeometryHandlerConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.
/brief Class representing key hit/release events
boost::shared_ptr< ShapeActorMap > ShapeActorMapPtr
RGBA handler class for colors.
boost::signals2::connection registerMouseCallback(void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=NULL)
Register a callback function for mouse events.
boost::signals2::connection registerMouseCallback(void(T::*callback)(const pcl::visualization::MouseEvent &, void *), T &instance, void *cookie=NULL)
Register a callback function for mouse events.
bool addPointCloud(const pcl::PointCloud< pcl::PointXYZRGBA >::ConstPtr &cloud, const std::string &id="cloud", int viewport=0)
Add a PointXYZRGBA Point Cloud to screen.
bool updatePointCloud(const pcl::PointCloud< pcl::PointXYZRGBA >::ConstPtr &cloud, const std::string &id="cloud")
Updates the XYZRGBA data for an existing cloud object id on screen.
boost::signals2::connection registerPointPickingCallback(void(T::*callback)(const pcl::visualization::PointPickingEvent &, void *), T &instance, void *cookie=NULL)
Register a callback function for point picking events.