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>
56 #include <vtkOrientationMarkerWidget.h>
57 #include <vtkRenderWindowInteractor.h>
62 class vtkRenderWindow;
63 class vtkAppendPolyData;
64 class vtkRenderWindow;
66 class vtkInteractorStyle;
71 class vtkUnstructuredGrid;
77 template <
typename T>
class PlanarPolygon;
79 namespace visualization
96 using Ptr = shared_ptr<PCLVisualizer>;
97 using ConstPtr = shared_ptr<const PCLVisualizer>;
111 PCLVisualizer (
const std::string &name =
"",
const bool create_interactor =
true);
121 PCLVisualizer (
int &argc,
char **argv,
const std::string &name =
"",
141 const bool create_interactor =
true);
153 setFullScreen (
bool mode);
159 setWindowName (
const std::string &name);
167 setWindowBorders (
bool mode);
173 boost::signals2::connection
181 inline boost::signals2::connection
193 template<
typename T>
inline boost::signals2::connection
203 boost::signals2::connection
211 inline boost::signals2::connection
223 template<
typename T>
inline boost::signals2::connection
233 boost::signals2::connection
241 boost::signals2::connection
250 template<
typename T>
inline boost::signals2::connection
260 boost::signals2::connection
268 boost::signals2::connection
277 template<
typename T>
inline boost::signals2::connection
295 spinOnce (
int time = 1,
bool force_redraw =
false);
301 addOrientationMarkerWidgetAxes (vtkRenderWindowInteractor* interactor);
305 removeOrientationMarkerWidgetAxes ();
313 addCoordinateSystem (
double scale = 1.0,
const std::string&
id =
"reference",
int viewport = 0);
324 addCoordinateSystem (
double scale,
float x,
float y,
float z,
const std::string &
id =
"reference",
int viewport = 0);
362 addCoordinateSystem (
double scale,
const Eigen::Affine3f& t,
const std::string &
id =
"reference",
int viewport = 0);
369 removeCoordinateSystem (
const std::string &
id =
"reference",
int viewport = 0);
378 removePointCloud (
const std::string &
id =
"cloud",
int viewport = 0);
388 return (removePointCloud (
id, viewport));
397 removeShape (
const std::string &
id =
"cloud",
int viewport = 0);
404 removeText3D (
const std::string &
id =
"cloud",
int viewport = 0);
410 removeAllPointClouds (
int viewport = 0);
416 removeAllShapes (
int viewport = 0);
422 removeAllCoordinateSystems (
int viewport = 0);
431 setBackgroundColor (
const double &r,
const double &g,
const double &b,
int viewport = 0);
441 addText (
const std::string &text,
443 const std::string &
id =
"",
int viewport = 0);
456 addText (
const std::string &text,
int xpos,
int ypos,
double r,
double g,
double b,
457 const std::string &
id =
"",
int viewport = 0);
471 addText (
const std::string &text,
int xpos,
int ypos,
int fontsize,
double r,
double g,
double b,
472 const std::string &
id =
"",
int viewport = 0);
482 updateText (
const std::string &text,
484 const std::string &
id =
"");
496 updateText (
const std::string &text,
497 int xpos,
int ypos,
double r,
double g,
double b,
498 const std::string &
id =
"");
511 updateText (
const std::string &text,
512 int xpos,
int ypos,
int fontsize,
double r,
double g,
double b,
513 const std::string &
id =
"");
525 updateShapePose (
const std::string &
id,
const Eigen::Affine3f& pose);
537 updateCoordinateSystemPose (
const std::string &
id,
const Eigen::Affine3f& pose);
549 updatePointCloudPose (
const std::string &
id,
const Eigen::Affine3f& pose);
561 template <
typename Po
intT>
bool
562 addText3D (
const std::string &text,
564 double textScale = 1.0,
565 double r = 1.0,
double g = 1.0,
double b = 1.0,
566 const std::string &
id =
"",
int viewport = 0);
582 template <
typename Po
intT>
bool
583 addText3D (
const std::string &text,
585 double orientation[3],
586 double textScale = 1.0,
587 double r = 1.0,
double g = 1.0,
double b = 1.0,
588 const std::string &
id =
"",
int viewport = 0);
597 return (cloud_actor_map_->find (
id) != cloud_actor_map_->end () ||
598 shape_actor_map_->find (
id) != shape_actor_map_->end () ||
599 coordinate_actor_map_->find (
id) != coordinate_actor_map_-> end());
609 template <
typename Po
intNT>
bool
611 int level = 100,
float scale = 0.02f,
612 const std::string &
id =
"cloud",
int viewport = 0);
622 template <
typename Po
intT,
typename Po
intNT>
bool
625 int level = 100,
float scale = 0.02f,
626 const std::string &
id =
"cloud",
int viewport = 0);
636 template <
typename Po
intNT>
bool
637 addPointCloudPrincipalCurvatures (
640 int level = 100,
float scale = 1.0f,
641 const std::string &
id =
"cloud",
int viewport = 0);
652 template <
typename Po
intT,
typename Po
intNT>
bool
653 addPointCloudPrincipalCurvatures (
657 int level = 100,
float scale = 1.0f,
658 const std::string &
id =
"cloud",
int viewport = 0);
668 template <
typename Po
intT,
typename GradientT>
bool
671 int level = 100,
double scale = 1e-6,
672 const std::string &
id =
"cloud",
int viewport = 0);
679 template <
typename Po
intT>
bool
681 const std::string &
id =
"cloud",
int viewport = 0);
688 template <
typename Po
intT>
bool
690 const std::string &
id =
"cloud");
698 template <
typename Po
intT>
bool
701 const std::string &
id =
"cloud");
709 template <
typename Po
intT>
bool
712 const std::string &
id =
"cloud");
720 template <
typename Po
intT>
bool
723 const std::string &
id =
"cloud",
int viewport = 0);
737 template <
typename Po
intT>
bool
739 const GeometryHandlerConstPtr &geometry_handler,
740 const std::string &
id =
"cloud",
int viewport = 0);
748 template <
typename Po
intT>
bool
751 const std::string &
id =
"cloud",
int viewport = 0);
765 template <
typename Po
intT>
bool
767 const ColorHandlerConstPtr &color_handler,
768 const std::string &
id =
"cloud",
int viewport = 0);
783 template <
typename Po
intT>
bool
785 const GeometryHandlerConstPtr &geometry_handler,
786 const ColorHandlerConstPtr &color_handler,
787 const std::string &
id =
"cloud",
int viewport = 0);
806 const GeometryHandlerConstPtr &geometry_handler,
807 const ColorHandlerConstPtr &color_handler,
808 const Eigen::Vector4f& sensor_origin,
809 const Eigen::Quaternion<float>& sensor_orientation,
810 const std::string &
id =
"cloud",
int viewport = 0);
828 const GeometryHandlerConstPtr &geometry_handler,
829 const Eigen::Vector4f& sensor_origin,
830 const Eigen::Quaternion<float>& sensor_orientation,
831 const std::string &
id =
"cloud",
int viewport = 0);
849 const ColorHandlerConstPtr &color_handler,
850 const Eigen::Vector4f& sensor_origin,
851 const Eigen::Quaternion<float>& sensor_orientation,
852 const std::string &
id =
"cloud",
int viewport = 0);
861 template <
typename Po
intT>
bool
865 const std::string &
id =
"cloud",
int viewport = 0);
874 const std::string &
id =
"cloud",
int viewport = 0)
876 return (addPointCloud<pcl::PointXYZ> (cloud,
id, viewport));
887 const std::string &
id =
"cloud",
int viewport = 0)
890 return (addPointCloud<pcl::PointXYZRGB> (cloud, color_handler,
id, viewport));
900 const std::string &
id =
"cloud",
int viewport = 0)
903 return (addPointCloud<pcl::PointXYZRGBA> (cloud, color_handler,
id, viewport));
913 const std::string &
id =
"cloud",
int viewport = 0)
916 return (addPointCloud<pcl::PointXYZL> (cloud, color_handler,
id, viewport));
926 const std::string &
id =
"cloud")
928 return (updatePointCloud<pcl::PointXYZ> (cloud,
id));
938 const std::string &
id =
"cloud")
941 return (updatePointCloud<pcl::PointXYZRGB> (cloud, color_handler,
id));
951 const std::string &
id =
"cloud")
954 return (updatePointCloud<pcl::PointXYZRGBA> (cloud, color_handler,
id));
964 const std::string &
id =
"cloud")
967 return (updatePointCloud<pcl::PointXYZL> (cloud, color_handler,
id));
977 const std::string &
id =
"polygon",
986 template <
typename Po
intT>
bool
988 const std::vector<pcl::Vertices> &vertices,
989 const std::string &
id =
"polygon",
998 template <
typename Po
intT>
bool
1000 const std::vector<pcl::Vertices> &vertices,
1001 const std::string &
id =
"polygon");
1010 const std::string &
id =
"polygon");
1019 const std::string &
id =
"polyline",
1029 template <
typename Po
intT>
bool
1032 const std::vector<int> & correspondences,
1033 const std::string &
id =
"correspondences",
1043 const std::string &
id =
"texture",
1055 template <
typename Po
intT>
bool
1060 const std::string &
id =
"correspondences",
1062 bool overwrite =
false);
1071 template <
typename Po
intT>
bool
1075 const std::string &
id =
"correspondences",
1079 return (addCorrespondences<PointT> (source_points, target_points,
1080 correspondences, 1,
id, viewport));
1091 template <
typename Po
intT>
bool
1092 updateCorrespondences (
1097 const std::string &
id =
"correspondences",
1107 template <
typename Po
intT>
bool
1112 const std::string &
id =
"correspondences",
1116 return (updateCorrespondences<PointT> (source_points, target_points,
1117 correspondences, 1,
id, viewport));
1125 removeCorrespondences (
const std::string &
id =
"correspondences",
int viewport = 0);
1131 getColorHandlerIndex (
const std::string &
id);
1137 getGeometryHandlerIndex (
const std::string &
id);
1144 updateColorHandlerIndex (
const std::string &
id,
int index);
1156 setPointCloudRenderingProperties (
int property,
double val1,
double val2,
double val3,
1157 const std::string &
id =
"cloud",
int viewport = 0);
1168 setPointCloudRenderingProperties (
int property,
double val1,
double val2,
1169 const std::string &
id =
"cloud",
int viewport = 0);
1179 setPointCloudRenderingProperties (
int property,
double value,
1180 const std::string &
id =
"cloud",
int viewport = 0);
1189 getPointCloudRenderingProperties (
int property,
double &value,
1190 const std::string &
id =
"cloud");
1202 getPointCloudRenderingProperties (
RenderingProperties property,
double &val1,
double &val2,
double &val3,
1203 const std::string &
id =
"cloud");
1210 setPointCloudSelected (
const bool selected,
const std::string &
id =
"cloud" );
1221 setShapeRenderingProperties (
int property,
double value,
1222 const std::string &
id,
int viewport = 0);
1233 setShapeRenderingProperties (
int property,
double val1,
double val2,
1234 const std::string &
id,
int viewport = 0);
1246 setShapeRenderingProperties (
int property,
double val1,
double val2,
double val3,
1247 const std::string &
id,
int viewport = 0);
1251 wasStopped ()
const;
1255 resetStoppedFlag ();
1273 createViewPort (
double xmin,
double ymin,
double xmax,
double ymax,
int &viewport);
1279 createViewPortCamera (
const int viewport);
1290 template <
typename Po
intT>
bool
1292 double r,
double g,
double b,
1293 const std::string &
id =
"polygon",
int viewport = 0);
1301 template <
typename Po
intT>
bool
1303 const std::string &
id =
"polygon",
1314 template <
typename Po
intT>
bool
1316 double r,
double g,
double b,
1317 const std::string &
id =
"polygon",
1326 template <
typename P1,
typename P2>
bool
1327 addLine (
const P1 &pt1,
const P2 &pt2,
const std::string &
id =
"line",
1339 template <
typename P1,
typename P2>
bool
1340 addLine (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1341 const std::string &
id =
"line",
int viewport = 0);
1355 template <
typename P1,
typename P2>
bool
1356 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1357 const std::string &
id =
"arrow",
int viewport = 0);
1372 template <
typename P1,
typename P2>
bool
1373 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
bool display_length,
1374 const std::string &
id =
"arrow",
int viewport = 0);
1391 template <
typename P1,
typename P2>
bool
1392 addArrow (
const P1 &pt1,
const P2 &pt2,
1393 double r_line,
double g_line,
double b_line,
1394 double r_text,
double g_text,
double b_text,
1395 const std::string &
id =
"arrow",
int viewport = 0);
1404 template <
typename Po
intT>
bool
1405 addSphere (
const PointT ¢er,
double radius,
const std::string &
id =
"sphere",
1417 template <
typename Po
intT>
bool
1418 addSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1419 const std::string &
id =
"sphere",
int viewport = 0);
1429 template <
typename Po
intT>
bool
1430 updateSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1431 const std::string &
id =
"sphere");
1440 const std::string &
id =
"PolyData",
1452 const std::string &
id =
"PolyData",
1461 addModelFromPLYFile (
const std::string &filename,
1462 const std::string &
id =
"PLYModel",
1472 addModelFromPLYFile (
const std::string &filename,
1474 const std::string &
id =
"PLYModel",
1505 const std::string &
id =
"cylinder",
1532 const std::string &
id =
"sphere",
1560 const std::string &
id =
"line",
1588 const char *
id =
"line",
1591 return addLine (coefficients, std::string (
id), viewport);
1616 const std::string &
id =
"plane",
1621 const std::string &
id =
"plane",
1644 const std::string &
id =
"circle",
1654 const std::string &
id =
"cone",
1664 const std::string &
id =
"cube",
1677 addCube (
const Eigen::Vector3f &translation,
const Eigen::Quaternionf &rotation,
1678 double width,
double height,
double depth,
1679 const std::string &
id =
"cube",
1696 addCube (
float x_min,
float x_max,
float y_min,
float y_max,
float z_min,
float z_max,
1697 double r = 1.0,
double g = 1.0,
double b = 1.0,
const std::string &
id =
"cube",
int viewport = 0);
1708 addEllipsoid (
const Eigen::Isometry3d &transform,
1709 double radius_x,
double radius_y,
double radius_z,
1710 const std::string &
id =
"ellipsoid",
1720 enableEDLRendering(
int viewport = 0);
1724 setRepresentationToSurfaceForAllActors ();
1728 setRepresentationToPointsForAllActors ();
1732 setRepresentationToWireframeForAllActors ();
1738 setShowFPS (
bool show_fps);
1773 renderViewTesselatedSphere (
1776 std::vector<Eigen::Matrix4f,Eigen::aligned_allocator< Eigen::Matrix4f > > & poses, std::vector<float> & enthropies,
int tesselation_level,
1777 float view_angle = 45,
float radius_sphere = 1,
bool use_vertices =
true);
1782 initCameraParameters ();
1789 getCameraParameters (
int argc,
char **argv);
1795 loadCameraParameters (
const std::string &file);
1802 cameraParamsSet ()
const;
1811 cameraFileLoaded ()
const;
1819 getCameraFile ()
const;
1822 PCL_DEPRECATED(1,15,
"updateCamera will be removed, as it does nothing.")
1834 resetCameraViewpoint (
const std::string &
id =
"cloud");
1849 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1850 double view_x,
double view_y,
double view_z,
1851 double up_x,
double up_y,
double up_z,
int viewport = 0);
1863 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1864 double up_x,
double up_y,
double up_z,
int viewport = 0);
1873 setCameraParameters (
const Eigen::Matrix3f &intrinsics,
const Eigen::Matrix4f &extrinsics,
int viewport = 0);
1880 setCameraParameters (
const Camera &camera,
int viewport = 0);
1888 setCameraClipDistances (
double near,
double far,
int viewport = 0);
1895 setCameraFieldOfView (
double fovy,
int viewport = 0);
1899 getCameras (std::vector<Camera>& cameras);
1904 getViewerPose (
int viewport = 0);
1910 saveScreenshot (
const std::string &file);
1916 saveCameraParameters (
const std::string &file);
1920 getCameraParameters (
Camera &camera,
int viewport = 0)
const;
1940 return (cloud_actor_map_);
1947 return (shape_actor_map_);
1955 setPosition (
int x,
int y);
1962 setSize (
int xw,
int yw);
1970 setUseVbos (
bool use_vbos);
1976 setLookUpTableID (
const std::string
id);
1980 createInteractor ();
1988 setupInteractor (vtkRenderWindowInteractor *iren,
1989 vtkRenderWindow *win);
1998 setupInteractor (vtkRenderWindowInteractor *iren,
1999 vtkRenderWindow *win,
2000 vtkInteractorStyle *style);
2025 void setupRenderWindow (
const std::string& name);
2033 void setDefaultWindowSizeAndPos ();
2041 void setupCamera (
int argc,
char **argv);
2043 struct PCL_EXPORTS ExitMainLoopTimerCallback :
public vtkCommand
2045 static ExitMainLoopTimerCallback* New ()
2047 return (
new ExitMainLoopTimerCallback);
2050 Execute (vtkObject*,
unsigned long event_id,
void*)
override;
2056 struct PCL_EXPORTS ExitCallback :
public vtkCommand
2058 static ExitCallback* New ()
2060 return (
new ExitCallback);
2063 Execute (vtkObject*,
unsigned long event_id,
void*)
override;
2065 PCLVisualizer* pcl_visualizer;
2069 struct PCL_EXPORTS FPSCallback :
public vtkCommand
2071 static FPSCallback *New () {
return (
new FPSCallback); }
2073 FPSCallback () =
default;
2074 FPSCallback (
const FPSCallback& src) =
default;
2075 FPSCallback& operator = (
const FPSCallback& src) { actor = src.actor; pcl_visualizer = src.pcl_visualizer; decimated = src.decimated; last_fps = src.last_fps;
return (*
this); }
2078 Execute (vtkObject*,
unsigned long event_id,
void*)
override;
2080 vtkTextActor *actor{
nullptr};
2081 PCLVisualizer* pcl_visualizer{
nullptr};
2082 bool decimated{
false};
2083 float last_fps{0.0f};
2090 bool stopped_{
false};
2124 bool camera_file_loaded_;
2172 bool use_scalars =
true)
const;
2182 bool use_scalars =
true)
const;
2190 template <
typename Po
intT>
void
2201 template <
typename Po
intT>
void
2202 convertPointCloudToVTKPolyData (
const PointCloudGeometryHandler<PointT> &geometry_handler,
2213 convertPointCloudToVTKPolyData (
const GeometryHandlerConstPtr &geometry_handler,
2228 vtkIdType nr_points);
2240 template <
typename Po
intT>
bool
2241 fromHandlersToScreen (
const PointCloudGeometryHandler<PointT> &geometry_handler,
2242 const PointCloudColorHandler<PointT> &color_handler,
2243 const std::string &
id,
2245 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2246 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2258 template <
typename Po
intT>
bool
2259 fromHandlersToScreen (
const PointCloudGeometryHandler<PointT> &geometry_handler,
2260 const ColorHandlerConstPtr &color_handler,
2261 const std::string &
id,
2263 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2264 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2277 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2278 const ColorHandlerConstPtr &color_handler,
2279 const std::string &
id,
2281 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2282 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2294 template <
typename Po
intT>
bool
2295 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2296 const PointCloudColorHandler<PointT> &color_handler,
2297 const std::string &
id,
2299 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2300 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2326 getTransformationMatrix (
const Eigen::Vector4f &origin,
2327 const Eigen::Quaternion<float> &orientation,
2328 Eigen::Matrix4f &transformation);
2339 vtkTexture* vtk_tex)
const;
2346 getUniqueCameraFile (
int argc,
char **argv);
2355 convertToVtkMatrix (
const Eigen::Matrix4f &m,
2364 convertToVtkMatrix (
const Eigen::Vector4f &origin,
2365 const Eigen::Quaternion<float> &orientation,
2374 Eigen::Matrix4f &m);
2380 #include <pcl/visualization/impl/pcl_visualizer.hpp>
shared_ptr< CoordinateActorMap > CoordinateActorMapPtr
static PCLVisualizerInteractorStyle * New()
vtkSmartPointer< PCLVisualizerInteractorStyle > getInteractorStyle()
Get a pointer to the current interactor style used.
Base Handler class for PointCloud colors.
shared_ptr< PointCloud< PointT > > Ptr
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.
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.
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::signals2::connection registerMouseCallback(void(T::*callback)(const pcl::visualization::MouseEvent &, void *), T &instance, void *cookie=nullptr)
Register a callback function for mouse events.
boost::signals2::connection registerMouseCallback(void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=nullptr)
Register a callback function for mouse events.
shared_ptr< const PointCloudColorHandler< PointCloud > > ConstPtr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
Camera class holds a set of camera parameters together with the window pos/size.
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::signals2::connection registerKeyboardCallback(void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=nullptr)
Register a callback function for keyboard events.
vtkSmartPointer< vtkRendererCollection > getRendererCollection()
Return a pointer to the underlying VTK Renderer Collection.
RenderingProperties
Set of rendering properties.
shared_ptr< CloudActorMap > CloudActorMapPtr
/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.
Base Handler class for PointCloud colors.
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.
ColorHandler::ConstPtr ColorHandlerConstPtr
Base handler class for PointCloud geometry.
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< PointCloud< PointT >, Eigen::aligned_allocator< PointCloud< PointT > > > CloudVectorType
RGB handler class for colors.
ShapeActorMapPtr getShapeActorMap()
Return a pointer to the ShapeActorMap this visualizer uses.
boost::signals2::connection registerKeyboardCallback(void(T::*callback)(const pcl::visualization::KeyboardEvent &, void *), T &instance, void *cookie=nullptr)
Register a callback function for keyboard events.
bool addLine(const pcl::ModelCoefficients &coefficients, const char *id="line", int viewport=0)
Add a line from a set of given model coefficients.
shared_ptr< const PCLVisualizer > 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.
vtkSmartPointer< vtkRenderWindow > getRenderWindow()
Return a pointer to the underlying VTK Render Window used.
shared_ptr< PointCloudGeometryHandler< PointCloud > > Ptr
CloudActorMapPtr getCloudActorMap()
Return a pointer to the CloudActorMap this visualizer uses.
PCL_EXPORTS vtkIdType fillCells(std::vector< int > &lookup, const std::vector< pcl::Vertices > &vertices, vtkSmartPointer< vtkCellArray > cell_array, int max_size_of_polygon)
shared_ptr< const PointCloud< PointT > > ConstPtr
Base handler class for PointCloud geometry.
/brief Class representing 3D area picking events.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
GeometryHandler::ConstPtr GeometryHandlerConstPtr
shared_ptr< PointCloudColorHandler< PointCloud > > Ptr
boost::signals2::connection registerPointPickingCallback(void(T::*callback)(const pcl::visualization::PointPickingEvent &, void *), T &instance, void *cookie=nullptr)
Register a callback function for point picking events.
A point structure representing Euclidean xyz coordinates, and the RGB color.
/brief Class representing key hit/release events
shared_ptr< const PointCloudGeometryHandler< PointCloud > > ConstPtr
RGBA handler class for colors.
boost::signals2::connection registerAreaPickingCallback(void(T::*callback)(const pcl::visualization::AreaPickingEvent &, void *), T &instance, void *cookie=nullptr)
Register a callback function for area picking events.
shared_ptr< ShapeActorMap > ShapeActorMapPtr
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.
ColorHandler::Ptr ColorHandlerPtr
GeometryHandler::Ptr GeometryHandlerPtr