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);
1159 setPointCloudRenderingProperties (
int property,
double value,
1160 const std::string &
id =
"cloud",
int viewport = 0);
1169 getPointCloudRenderingProperties (
int property,
double &value,
1170 const std::string &
id =
"cloud");
1177 setPointCloudSelected (
const bool selected,
const std::string &
id =
"cloud" );
1188 setShapeRenderingProperties (
int property,
double value,
1189 const std::string &
id,
int viewport = 0);
1201 setShapeRenderingProperties (
int property,
double val1,
double val2,
double val3,
1202 const std::string &
id,
int viewport = 0);
1206 wasStopped ()
const;
1210 resetStoppedFlag ();
1228 createViewPort (
double xmin,
double ymin,
double xmax,
double ymax,
int &viewport);
1234 createViewPortCamera (
const int viewport);
1245 template <
typename Po
intT>
bool 1247 double r,
double g,
double b,
1248 const std::string &
id =
"polygon",
int viewport = 0);
1256 template <
typename Po
intT>
bool 1258 const std::string &
id =
"polygon",
1269 template <
typename Po
intT>
bool 1271 double r,
double g,
double b,
1272 const std::string &
id =
"polygon",
1281 template <
typename P1,
typename P2>
bool 1282 addLine (
const P1 &pt1,
const P2 &pt2,
const std::string &
id =
"line",
1294 template <
typename P1,
typename P2>
bool 1295 addLine (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1296 const std::string &
id =
"line",
int viewport = 0);
1310 template <
typename P1,
typename P2>
bool 1311 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1312 const std::string &
id =
"arrow",
int viewport = 0);
1327 template <
typename P1,
typename P2>
bool 1328 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
bool display_length,
1329 const std::string &
id =
"arrow",
int viewport = 0);
1346 template <
typename P1,
typename P2>
bool 1347 addArrow (
const P1 &pt1,
const P2 &pt2,
1348 double r_line,
double g_line,
double b_line,
1349 double r_text,
double g_text,
double b_text,
1350 const std::string &
id =
"arrow",
int viewport = 0);
1359 template <
typename Po
intT>
bool 1360 addSphere (
const PointT ¢er,
double radius,
const std::string &
id =
"sphere",
1372 template <
typename Po
intT>
bool 1373 addSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1374 const std::string &
id =
"sphere",
int viewport = 0);
1384 template <
typename Po
intT>
bool 1385 updateSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1386 const std::string &
id =
"sphere");
1395 const std::string &
id =
"PolyData",
1407 const std::string &
id =
"PolyData",
1416 addModelFromPLYFile (
const std::string &filename,
1417 const std::string &
id =
"PLYModel",
1427 addModelFromPLYFile (
const std::string &filename,
1429 const std::string &
id =
"PLYModel",
1460 const std::string &
id =
"cylinder",
1487 const std::string &
id =
"sphere",
1515 const std::string &
id =
"line",
1540 const std::string &
id =
"plane",
1545 const std::string &
id =
"plane",
1568 const std::string &
id =
"circle",
1578 const std::string &
id =
"cone",
1588 const std::string &
id =
"cube",
1601 addCube (
const Eigen::Vector3f &translation,
const Eigen::Quaternionf &rotation,
1602 double width,
double height,
double depth,
1603 const std::string &
id =
"cube",
1620 addCube (
float x_min,
float x_max,
float y_min,
float y_max,
float z_min,
float z_max,
1621 double r = 1.0,
double g = 1.0,
double b = 1.0,
const std::string &
id =
"cube",
int viewport = 0);
1625 setRepresentationToSurfaceForAllActors ();
1629 setRepresentationToPointsForAllActors ();
1633 setRepresentationToWireframeForAllActors ();
1639 setShowFPS (
bool show_fps);
1669 renderViewTesselatedSphere (
1672 std::vector<Eigen::Matrix4f,Eigen::aligned_allocator< Eigen::Matrix4f > > & poses, std::vector<float> & enthropies,
int tesselation_level,
1673 float view_angle = 45,
float radius_sphere = 1,
bool use_vertices =
true);
1678 initCameraParameters ();
1685 getCameraParameters (
int argc,
char **argv);
1691 loadCameraParameters (
const std::string &file);
1698 cameraParamsSet ()
const;
1707 cameraFileLoaded ()
const;
1715 getCameraFile ()
const;
1729 resetCameraViewpoint (
const std::string &
id =
"cloud");
1744 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1745 double view_x,
double view_y,
double view_z,
1746 double up_x,
double up_y,
double up_z,
int viewport = 0);
1758 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1759 double up_x,
double up_y,
double up_z,
int viewport = 0);
1768 setCameraParameters (
const Eigen::Matrix3f &intrinsics,
const Eigen::Matrix4f &extrinsics,
int viewport = 0);
1775 setCameraParameters (
const Camera &camera,
int viewport = 0);
1783 setCameraClipDistances (
double near,
double far,
int viewport = 0);
1790 setCameraFieldOfView (
double fovy,
int viewport = 0);
1794 getCameras (std::vector<Camera>& cameras);
1799 getViewerPose (
int viewport = 0);
1805 saveScreenshot (
const std::string &file);
1811 saveCameraParameters (
const std::string &file);
1817 getCameraParameters (
Camera &camera);
1837 return (cloud_actor_map_);
1844 return (shape_actor_map_);
1852 setPosition (
int x,
int y);
1859 setSize (
int xw,
int yw);
1865 setUseVbos (
bool use_vbos);
1871 setLookUpTableID (
const std::string
id);
1875 createInteractor ();
1883 setupInteractor (vtkRenderWindowInteractor *iren,
1884 vtkRenderWindow *win);
1893 setupInteractor (vtkRenderWindowInteractor *iren,
1894 vtkRenderWindow *win,
1895 vtkInteractorStyle *style);
1905 #if ((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 4)) 1911 struct ExitMainLoopTimerCallback :
public vtkCommand
1913 static ExitMainLoopTimerCallback* New ()
1915 return (
new ExitMainLoopTimerCallback);
1918 Execute (vtkObject*,
unsigned long event_id,
void*);
1924 struct ExitCallback :
public vtkCommand
1926 static ExitCallback* New ()
1928 return (
new ExitCallback);
1931 Execute (vtkObject*,
unsigned long event_id,
void*);
1937 struct FPSCallback :
public vtkCommand
1939 static FPSCallback *New () {
return (
new FPSCallback); }
1941 FPSCallback () : actor (), pcl_visualizer (), decimated () {}
1942 FPSCallback (
const FPSCallback& src) : vtkCommand (), actor (src.actor), pcl_visualizer (src.pcl_visualizer), decimated (src.decimated) {}
1943 FPSCallback& operator = (
const FPSCallback& src) { actor = src.actor; pcl_visualizer = src.pcl_visualizer; decimated = src.decimated;
return (*
this); }
1946 Execute (vtkObject*,
unsigned long event_id,
void*);
1948 vtkTextActor *actor;
1956 #if !((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 4)) 1992 bool camera_file_loaded_;
2040 bool use_scalars =
true);
2050 bool use_scalars =
true);
2058 template <
typename Po
intT>
void 2069 template <
typename Po
intT>
void 2081 convertPointCloudToVTKPolyData (
const GeometryHandlerConstPtr &geometry_handler,
2096 vtkIdType nr_points);
2108 template <
typename Po
intT>
bool 2111 const std::string &
id,
2113 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2114 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2126 template <
typename Po
intT>
bool 2128 const ColorHandlerConstPtr &color_handler,
2129 const std::string &
id,
2131 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2132 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2145 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2146 const ColorHandlerConstPtr &color_handler,
2147 const std::string &
id,
2149 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2150 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2162 template <
typename Po
intT>
bool 2163 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2165 const std::string &
id,
2167 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2168 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2194 getTransformationMatrix (
const Eigen::Vector4f &origin,
2195 const Eigen::Quaternion<float> &orientation,
2196 Eigen::Matrix4f &transformation);
2207 vtkTexture* vtk_tex)
const;
2214 getUniqueCameraFile (
int argc,
char **argv);
2223 convertToVtkMatrix (
const Eigen::Matrix4f &m,
2232 convertToVtkMatrix (
const Eigen::Vector4f &origin,
2233 const Eigen::Quaternion<float> &orientation,
2242 Eigen::Matrix4f &m);
2248 #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
bool contains(const std::string &id) const
Check if the cloud, shape, or coordinate with the given id was already added to this vizualizer...
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
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.