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);
114 PCLVisualizer (
int &argc,
char **argv,
const std::string &name =
"",
134 const bool create_interactor =
true);
146 setFullScreen (
bool mode);
152 setWindowName (
const std::string &name);
160 setWindowBorders (
bool mode);
166 boost::signals2::connection
174 inline boost::signals2::connection
177 return (registerKeyboardCallback (boost::bind (callback, _1, cookie)));
186 template<
typename T>
inline boost::signals2::connection
189 return (registerKeyboardCallback (boost::bind (callback, boost::ref (instance), _1, cookie)));
196 boost::signals2::connection
204 inline boost::signals2::connection
207 return (registerMouseCallback (boost::bind (callback, _1, cookie)));
216 template<
typename T>
inline boost::signals2::connection
219 return (registerMouseCallback (boost::bind (callback, boost::ref (instance), _1, cookie)));
226 boost::signals2::connection
234 boost::signals2::connection
243 template<
typename T>
inline boost::signals2::connection
246 return (registerPointPickingCallback (boost::bind (callback, boost::ref (instance), _1, cookie)));
253 boost::signals2::connection
261 boost::signals2::connection
270 template<
typename T>
inline boost::signals2::connection
273 return (registerAreaPickingCallback (boost::bind (callback, boost::ref (instance), _1, cookie)));
286 spinOnce (
int time = 1,
bool force_redraw =
false);
292 addOrientationMarkerWidgetAxes (vtkRenderWindowInteractor* interactor);
296 removeOrientationMarkerWidgetAxes ();
304 addCoordinateSystem (
double scale = 1.0,
const std::string&
id =
"reference",
int viewport = 0);
315 addCoordinateSystem (
double scale,
float x,
float y,
float z,
const std::string &
id =
"reference",
int viewport = 0);
353 addCoordinateSystem (
double scale,
const Eigen::Affine3f& t,
const std::string &
id =
"reference",
int viewport = 0);
360 removeCoordinateSystem (
const std::string &
id =
"reference",
int viewport = 0);
369 removePointCloud (
const std::string &
id =
"cloud",
int viewport = 0);
379 return (removePointCloud (
id, viewport));
388 removeShape (
const std::string &
id =
"cloud",
int viewport = 0);
395 removeText3D (
const std::string &
id =
"cloud",
int viewport = 0);
401 removeAllPointClouds (
int viewport = 0);
407 removeAllShapes (
int viewport = 0);
413 removeAllCoordinateSystems (
int viewport = 0);
422 setBackgroundColor (
const double &r,
const double &g,
const double &b,
int viewport = 0);
432 addText (
const std::string &text,
434 const std::string &
id =
"",
int viewport = 0);
447 addText (
const std::string &text,
int xpos,
int ypos,
double r,
double g,
double b,
448 const std::string &
id =
"",
int viewport = 0);
462 addText (
const std::string &text,
int xpos,
int ypos,
int fontsize,
double r,
double g,
double b,
463 const std::string &
id =
"",
int viewport = 0);
473 updateText (
const std::string &text,
475 const std::string &
id =
"");
487 updateText (
const std::string &text,
488 int xpos,
int ypos,
double r,
double g,
double b,
489 const std::string &
id =
"");
502 updateText (
const std::string &text,
503 int xpos,
int ypos,
int fontsize,
double r,
double g,
double b,
504 const std::string &
id =
"");
516 updateShapePose (
const std::string &
id,
const Eigen::Affine3f& pose);
528 updateCoordinateSystemPose (
const std::string &
id,
const Eigen::Affine3f& pose);
540 updatePointCloudPose (
const std::string &
id,
const Eigen::Affine3f& pose);
552 template <
typename Po
intT>
bool 553 addText3D (
const std::string &text,
555 double textScale = 1.0,
556 double r = 1.0,
double g = 1.0,
double b = 1.0,
557 const std::string &
id =
"",
int viewport = 0);
573 template <
typename Po
intT>
bool 574 addText3D (
const std::string &text,
576 double orientation[3],
577 double textScale = 1.0,
578 double r = 1.0,
double g = 1.0,
double b = 1.0,
579 const std::string &
id =
"",
int viewport = 0);
588 return (cloud_actor_map_->find (
id) != cloud_actor_map_->end () ||
589 shape_actor_map_->find (
id) != shape_actor_map_->end () ||
590 coordinate_actor_map_->find (
id) != coordinate_actor_map_-> end());
600 template <
typename Po
intNT>
bool 602 int level = 100,
float scale = 0.02f,
603 const std::string &
id =
"cloud",
int viewport = 0);
613 template <
typename Po
intT,
typename Po
intNT>
bool 616 int level = 100,
float scale = 0.02f,
617 const std::string &
id =
"cloud",
int viewport = 0);
627 template <
typename Po
intNT>
bool 628 addPointCloudPrincipalCurvatures (
631 int level = 100,
float scale = 1.0f,
632 const std::string &
id =
"cloud",
int viewport = 0);
643 template <
typename Po
intT,
typename Po
intNT>
bool 644 addPointCloudPrincipalCurvatures (
648 int level = 100,
float scale = 1.0f,
649 const std::string &
id =
"cloud",
int viewport = 0);
659 template <
typename Po
intT,
typename GradientT>
bool 662 int level = 100,
double scale = 1e-6,
663 const std::string &
id =
"cloud",
int viewport = 0);
670 template <
typename Po
intT>
bool 672 const std::string &
id =
"cloud",
int viewport = 0);
679 template <
typename Po
intT>
bool 681 const std::string &
id =
"cloud");
689 template <
typename Po
intT>
bool 692 const std::string &
id =
"cloud");
700 template <
typename Po
intT>
bool 703 const std::string &
id =
"cloud");
711 template <
typename Po
intT>
bool 714 const std::string &
id =
"cloud",
int viewport = 0);
728 template <
typename Po
intT>
bool 730 const GeometryHandlerConstPtr &geometry_handler,
731 const std::string &
id =
"cloud",
int viewport = 0);
739 template <
typename Po
intT>
bool 742 const std::string &
id =
"cloud",
int viewport = 0);
756 template <
typename Po
intT>
bool 758 const ColorHandlerConstPtr &color_handler,
759 const std::string &
id =
"cloud",
int viewport = 0);
774 template <
typename Po
intT>
bool 776 const GeometryHandlerConstPtr &geometry_handler,
777 const ColorHandlerConstPtr &color_handler,
778 const std::string &
id =
"cloud",
int viewport = 0);
797 const GeometryHandlerConstPtr &geometry_handler,
798 const ColorHandlerConstPtr &color_handler,
799 const Eigen::Vector4f& sensor_origin,
800 const Eigen::Quaternion<float>& sensor_orientation,
801 const std::string &
id =
"cloud",
int viewport = 0);
819 const GeometryHandlerConstPtr &geometry_handler,
820 const Eigen::Vector4f& sensor_origin,
821 const Eigen::Quaternion<float>& sensor_orientation,
822 const std::string &
id =
"cloud",
int viewport = 0);
840 const ColorHandlerConstPtr &color_handler,
841 const Eigen::Vector4f& sensor_origin,
842 const Eigen::Quaternion<float>& sensor_orientation,
843 const std::string &
id =
"cloud",
int viewport = 0);
852 template <
typename Po
intT>
bool 856 const std::string &
id =
"cloud",
int viewport = 0);
865 const std::string &
id =
"cloud",
int viewport = 0)
867 return (addPointCloud<pcl::PointXYZ> (cloud,
id, viewport));
878 const std::string &
id =
"cloud",
int viewport = 0)
881 return (addPointCloud<pcl::PointXYZRGB> (cloud, color_handler,
id, viewport));
891 const std::string &
id =
"cloud",
int viewport = 0)
894 return (addPointCloud<pcl::PointXYZRGBA> (cloud, color_handler,
id, viewport));
904 const std::string &
id =
"cloud",
int viewport = 0)
907 return (addPointCloud<pcl::PointXYZL> (cloud, color_handler,
id, viewport));
917 const std::string &
id =
"cloud")
919 return (updatePointCloud<pcl::PointXYZ> (cloud,
id));
929 const std::string &
id =
"cloud")
932 return (updatePointCloud<pcl::PointXYZRGB> (cloud, color_handler,
id));
942 const std::string &
id =
"cloud")
945 return (updatePointCloud<pcl::PointXYZRGBA> (cloud, color_handler,
id));
955 const std::string &
id =
"cloud")
958 return (updatePointCloud<pcl::PointXYZL> (cloud, color_handler,
id));
968 const std::string &
id =
"polygon",
977 template <
typename Po
intT>
bool 979 const std::vector<pcl::Vertices> &vertices,
980 const std::string &
id =
"polygon",
989 template <
typename Po
intT>
bool 991 const std::vector<pcl::Vertices> &vertices,
992 const std::string &
id =
"polygon");
1001 const std::string &
id =
"polygon");
1010 const std::string &
id =
"polyline",
1020 template <
typename Po
intT>
bool 1023 const std::vector<int> & correspondences,
1024 const std::string &
id =
"correspondences",
1034 const std::string &
id =
"texture",
1046 template <
typename Po
intT>
bool 1051 const std::string &
id =
"correspondences",
1053 bool overwrite =
false);
1062 template <
typename Po
intT>
bool 1066 const std::string &
id =
"correspondences",
1070 return (addCorrespondences<PointT> (source_points, target_points,
1071 correspondences, 1,
id, viewport));
1082 template <
typename Po
intT>
bool 1083 updateCorrespondences (
1088 const std::string &
id =
"correspondences",
1098 template <
typename Po
intT>
bool 1103 const std::string &
id =
"correspondences",
1107 return (updateCorrespondences<PointT> (source_points, target_points,
1108 correspondences, 1,
id, viewport));
1116 removeCorrespondences (
const std::string &
id =
"correspondences",
int viewport = 0);
1122 getColorHandlerIndex (
const std::string &
id);
1128 getGeometryHandlerIndex (
const std::string &
id);
1135 updateColorHandlerIndex (
const std::string &
id,
int index);
1147 setPointCloudRenderingProperties (
int property,
double val1,
double val2,
double val3,
1148 const std::string &
id =
"cloud",
int viewport = 0);
1159 setPointCloudRenderingProperties (
int property,
double val1,
double val2,
1160 const std::string &
id =
"cloud",
int viewport = 0);
1170 setPointCloudRenderingProperties (
int property,
double value,
1171 const std::string &
id =
"cloud",
int viewport = 0);
1180 getPointCloudRenderingProperties (
int property,
double &value,
1181 const std::string &
id =
"cloud");
1193 getPointCloudRenderingProperties (
RenderingProperties property,
double &val1,
double &val2,
double &val3,
1194 const std::string &
id =
"cloud");
1201 setPointCloudSelected (
const bool selected,
const std::string &
id =
"cloud" );
1212 setShapeRenderingProperties (
int property,
double value,
1213 const std::string &
id,
int viewport = 0);
1224 setShapeRenderingProperties (
int property,
double val1,
double val2,
1225 const std::string &
id,
int viewport = 0);
1237 setShapeRenderingProperties (
int property,
double val1,
double val2,
double val3,
1238 const std::string &
id,
int viewport = 0);
1242 wasStopped ()
const;
1246 resetStoppedFlag ();
1264 createViewPort (
double xmin,
double ymin,
double xmax,
double ymax,
int &viewport);
1270 createViewPortCamera (
const int viewport);
1281 template <
typename Po
intT>
bool 1283 double r,
double g,
double b,
1284 const std::string &
id =
"polygon",
int viewport = 0);
1292 template <
typename Po
intT>
bool 1294 const std::string &
id =
"polygon",
1305 template <
typename Po
intT>
bool 1307 double r,
double g,
double b,
1308 const std::string &
id =
"polygon",
1317 template <
typename P1,
typename P2>
bool 1318 addLine (
const P1 &pt1,
const P2 &pt2,
const std::string &
id =
"line",
1330 template <
typename P1,
typename P2>
bool 1331 addLine (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1332 const std::string &
id =
"line",
int viewport = 0);
1346 template <
typename P1,
typename P2>
bool 1347 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1348 const std::string &
id =
"arrow",
int viewport = 0);
1363 template <
typename P1,
typename P2>
bool 1364 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
bool display_length,
1365 const std::string &
id =
"arrow",
int viewport = 0);
1382 template <
typename P1,
typename P2>
bool 1383 addArrow (
const P1 &pt1,
const P2 &pt2,
1384 double r_line,
double g_line,
double b_line,
1385 double r_text,
double g_text,
double b_text,
1386 const std::string &
id =
"arrow",
int viewport = 0);
1395 template <
typename Po
intT>
bool 1396 addSphere (
const PointT ¢er,
double radius,
const std::string &
id =
"sphere",
1408 template <
typename Po
intT>
bool 1409 addSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1410 const std::string &
id =
"sphere",
int viewport = 0);
1420 template <
typename Po
intT>
bool 1421 updateSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1422 const std::string &
id =
"sphere");
1431 const std::string &
id =
"PolyData",
1443 const std::string &
id =
"PolyData",
1452 addModelFromPLYFile (
const std::string &filename,
1453 const std::string &
id =
"PLYModel",
1463 addModelFromPLYFile (
const std::string &filename,
1465 const std::string &
id =
"PLYModel",
1496 const std::string &
id =
"cylinder",
1523 const std::string &
id =
"sphere",
1551 const std::string &
id =
"line",
1579 const char *
id =
"line",
1582 return addLine (coefficients, std::string (
id), viewport);
1607 const std::string &
id =
"plane",
1612 const std::string &
id =
"plane",
1635 const std::string &
id =
"circle",
1645 const std::string &
id =
"cone",
1655 const std::string &
id =
"cube",
1668 addCube (
const Eigen::Vector3f &translation,
const Eigen::Quaternionf &rotation,
1669 double width,
double height,
double depth,
1670 const std::string &
id =
"cube",
1687 addCube (
float x_min,
float x_max,
float y_min,
float y_max,
float z_min,
float z_max,
1688 double r = 1.0,
double g = 1.0,
double b = 1.0,
const std::string &
id =
"cube",
int viewport = 0);
1692 setRepresentationToSurfaceForAllActors ();
1696 setRepresentationToPointsForAllActors ();
1700 setRepresentationToWireframeForAllActors ();
1706 setShowFPS (
bool show_fps);
1741 renderViewTesselatedSphere (
1744 std::vector<Eigen::Matrix4f,Eigen::aligned_allocator< Eigen::Matrix4f > > & poses, std::vector<float> & enthropies,
int tesselation_level,
1745 float view_angle = 45,
float radius_sphere = 1,
bool use_vertices =
true);
1750 initCameraParameters ();
1757 getCameraParameters (
int argc,
char **argv);
1763 loadCameraParameters (
const std::string &file);
1770 cameraParamsSet ()
const;
1779 cameraFileLoaded ()
const;
1787 getCameraFile ()
const;
1801 resetCameraViewpoint (
const std::string &
id =
"cloud");
1816 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1817 double view_x,
double view_y,
double view_z,
1818 double up_x,
double up_y,
double up_z,
int viewport = 0);
1830 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1831 double up_x,
double up_y,
double up_z,
int viewport = 0);
1840 setCameraParameters (
const Eigen::Matrix3f &intrinsics,
const Eigen::Matrix4f &extrinsics,
int viewport = 0);
1847 setCameraParameters (
const Camera &camera,
int viewport = 0);
1855 setCameraClipDistances (
double near,
double far,
int viewport = 0);
1862 setCameraFieldOfView (
double fovy,
int viewport = 0);
1866 getCameras (std::vector<Camera>& cameras);
1871 getViewerPose (
int viewport = 0);
1877 saveScreenshot (
const std::string &file);
1883 saveCameraParameters (
const std::string &file);
1889 getCameraParameters (
Camera &camera);
1909 return (cloud_actor_map_);
1916 return (shape_actor_map_);
1924 setPosition (
int x,
int y);
1931 setSize (
int xw,
int yw);
1939 setUseVbos (
bool use_vbos);
1945 setLookUpTableID (
const std::string
id);
1949 createInteractor ();
1957 setupInteractor (vtkRenderWindowInteractor *iren,
1958 vtkRenderWindow *win);
1967 setupInteractor (vtkRenderWindowInteractor *iren,
1968 vtkRenderWindow *win,
1969 vtkInteractorStyle *style);
1979 #if ((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 4)) 1998 void setupRenderWindow (
const std::string& name);
2006 void setDefaultWindowSizeAndPos ();
2012 void setupCamera (
int &argc,
char **argv);
2014 struct PCL_EXPORTS ExitMainLoopTimerCallback :
public vtkCommand
2016 static ExitMainLoopTimerCallback* New ()
2018 return (
new ExitMainLoopTimerCallback);
2021 Execute (vtkObject*,
unsigned long event_id,
void*);
2027 struct PCL_EXPORTS ExitCallback :
public vtkCommand
2029 static ExitCallback* New ()
2031 return (
new ExitCallback);
2034 Execute (vtkObject*,
unsigned long event_id,
void*);
2040 struct PCL_EXPORTS FPSCallback :
public vtkCommand
2042 static FPSCallback *New () {
return (
new FPSCallback); }
2044 FPSCallback () : actor (), pcl_visualizer (), decimated (), last_fps(0.0f) {}
2045 FPSCallback (
const FPSCallback& src) : vtkCommand (), actor (src.actor), pcl_visualizer (src.pcl_visualizer), decimated (src.decimated), last_fps (src.last_fps) {}
2046 FPSCallback& operator = (
const FPSCallback& src) { actor = src.actor; pcl_visualizer = src.pcl_visualizer; decimated = src.decimated; last_fps = src.last_fps;
return (*
this); }
2049 Execute (vtkObject*,
unsigned long event_id,
void*);
2051 vtkTextActor *actor;
2060 #if !((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 4)) 2096 bool camera_file_loaded_;
2144 bool use_scalars =
true);
2154 bool use_scalars =
true);
2162 template <
typename Po
intT>
void 2173 template <
typename Po
intT>
void 2185 convertPointCloudToVTKPolyData (
const GeometryHandlerConstPtr &geometry_handler,
2200 vtkIdType nr_points);
2212 template <
typename Po
intT>
bool 2215 const std::string &
id,
2217 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2218 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2230 template <
typename Po
intT>
bool 2232 const ColorHandlerConstPtr &color_handler,
2233 const std::string &
id,
2235 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2236 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2249 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2250 const ColorHandlerConstPtr &color_handler,
2251 const std::string &
id,
2253 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2254 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2266 template <
typename Po
intT>
bool 2267 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2269 const std::string &
id,
2271 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2272 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2298 getTransformationMatrix (
const Eigen::Vector4f &origin,
2299 const Eigen::Quaternion<float> &orientation,
2300 Eigen::Matrix4f &transformation);
2311 vtkTexture* vtk_tex)
const;
2318 getUniqueCameraFile (
int argc,
char **argv);
2327 convertToVtkMatrix (
const Eigen::Matrix4f &m,
2336 convertToVtkMatrix (
const Eigen::Vector4f &origin,
2337 const Eigen::Quaternion<float> &orientation,
2346 Eigen::Matrix4f &m);
2352 #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
This file defines compatibility wrappers for low level I/O functions.
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.
RenderingProperties
Set of rendering properties.
/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...
bool addLine(const pcl::ModelCoefficients &coefficients, const char *id="line", int viewport=0)
Add a line from a set of given model coefficients.
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.