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);
399 removePolygonMesh (const
std::
string &
id = "polygon",
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);
439 setBackgroundColor (
const double &r,
const double &g,
const double &b,
int viewport = 0);
449 addText (
const std::string &text,
451 const std::string &
id =
"",
int viewport = 0);
464 addText (
const std::string &text,
int xpos,
int ypos,
double r,
double g,
double b,
465 const std::string &
id =
"",
int viewport = 0);
479 addText (
const std::string &text,
int xpos,
int ypos,
int fontsize,
double r,
double g,
double b,
480 const std::string &
id =
"",
int viewport = 0);
490 updateText (
const std::string &text,
492 const std::string &
id =
"");
504 updateText (
const std::string &text,
505 int xpos,
int ypos,
double r,
double g,
double b,
506 const std::string &
id =
"");
519 updateText (
const std::string &text,
520 int xpos,
int ypos,
int fontsize,
double r,
double g,
double b,
521 const std::string &
id =
"");
533 updateShapePose (
const std::string &
id,
const Eigen::Affine3f& pose);
545 updateCoordinateSystemPose (
const std::string &
id,
const Eigen::Affine3f& pose);
557 updatePointCloudPose (
const std::string &
id,
const Eigen::Affine3f& pose);
569 template <
typename Po
intT>
bool
570 addText3D (
const std::string &text,
572 double textScale = 1.0,
573 double r = 1.0,
double g = 1.0,
double b = 1.0,
574 const std::string &
id =
"",
int viewport = 0);
583 template <
typename Po
intNT>
bool
585 int level = 100,
float scale = 0.02f,
586 const std::string &
id =
"cloud",
int viewport = 0);
596 template <
typename Po
intT,
typename Po
intNT>
bool
599 int level = 100,
float scale = 0.02f,
600 const std::string &
id =
"cloud",
int viewport = 0);
612 addPointCloudPrincipalCurvatures (
616 int level = 100,
float scale = 1.0f,
617 const std::string &
id =
"cloud",
int viewport = 0);
627 template <
typename Po
intT,
typename GradientT>
bool
630 int level = 100,
double scale = 1e-6,
631 const std::string &
id =
"cloud",
int viewport = 0);
638 template <
typename Po
intT>
bool
640 const std::string &
id =
"cloud",
int viewport = 0);
647 template <
typename Po
intT>
bool
649 const std::string &
id =
"cloud");
657 template <
typename Po
intT>
bool
660 const std::string &
id =
"cloud");
668 template <
typename Po
intT>
bool
671 const std::string &
id =
"cloud");
679 template <
typename Po
intT>
bool
682 const std::string &
id =
"cloud",
int viewport = 0);
696 template <
typename Po
intT>
bool
698 const GeometryHandlerConstPtr &geometry_handler,
699 const std::string &
id =
"cloud",
int viewport = 0);
707 template <
typename Po
intT>
bool
710 const std::string &
id =
"cloud",
int viewport = 0);
724 template <
typename Po
intT>
bool
726 const ColorHandlerConstPtr &color_handler,
727 const std::string &
id =
"cloud",
int viewport = 0);
742 template <
typename Po
intT>
bool
744 const GeometryHandlerConstPtr &geometry_handler,
745 const ColorHandlerConstPtr &color_handler,
746 const std::string &
id =
"cloud",
int viewport = 0);
765 const GeometryHandlerConstPtr &geometry_handler,
766 const ColorHandlerConstPtr &color_handler,
767 const Eigen::Vector4f& sensor_origin,
768 const Eigen::Quaternion<float>& sensor_orientation,
769 const std::string &
id =
"cloud",
int viewport = 0);
787 const GeometryHandlerConstPtr &geometry_handler,
788 const Eigen::Vector4f& sensor_origin,
789 const Eigen::Quaternion<float>& sensor_orientation,
790 const std::string &
id =
"cloud",
int viewport = 0);
808 const ColorHandlerConstPtr &color_handler,
809 const Eigen::Vector4f& sensor_origin,
810 const Eigen::Quaternion<float>& sensor_orientation,
811 const std::string &
id =
"cloud",
int viewport = 0);
820 template <
typename Po
intT>
bool
824 const std::string &
id =
"cloud",
int viewport = 0);
833 const std::string &
id =
"cloud",
int viewport = 0)
835 return (addPointCloud<pcl::PointXYZ> (cloud,
id, viewport));
846 const std::string &
id =
"cloud",
int viewport = 0)
849 return (addPointCloud<pcl::PointXYZRGB> (cloud, color_handler,
id, viewport));
859 const std::string &
id =
"cloud",
int viewport = 0)
862 return (addPointCloud<pcl::PointXYZRGBA> (cloud, color_handler,
id, viewport));
872 const std::string &
id =
"cloud")
874 return (updatePointCloud<pcl::PointXYZ> (cloud,
id));
884 const std::string &
id =
"cloud")
887 return (updatePointCloud<pcl::PointXYZRGB> (cloud, color_handler,
id));
897 const std::string &
id =
"cloud")
900 return (updatePointCloud<pcl::PointXYZRGBA> (cloud, color_handler,
id));
910 const std::string &
id =
"polygon",
919 template <
typename Po
intT>
bool
921 const std::vector<pcl::Vertices> &vertices,
922 const std::string &
id =
"polygon",
931 template <
typename Po
intT>
bool
933 const std::vector<pcl::Vertices> &vertices,
934 const std::string &
id =
"polygon");
943 const std::string &
id =
"polygon");
952 const std::string &
id =
"polyline",
962 template <
typename Po
intT>
bool
965 const std::vector<int> & correspondences,
966 const std::string &
id =
"correspondences",
976 const std::string &
id =
"texture",
987 template <
typename Po
intT>
bool
992 const std::string &
id =
"correspondences",
1002 template <
typename Po
intT>
bool
1006 const std::string &
id =
"correspondences",
1010 return (addCorrespondences<PointT> (source_points, target_points,
1011 correspondences, 1,
id, viewport));
1021 template <
typename Po
intT>
bool
1022 updateCorrespondences (
1027 const std::string &
id =
"correspondences");
1034 removeCorrespondences (
const std::string &
id =
"correspondences",
int viewport = 0);
1040 getColorHandlerIndex (
const std::string &
id);
1046 getGeometryHandlerIndex (
const std::string &
id);
1053 updateColorHandlerIndex (
const std::string &
id,
int index);
1064 setPointCloudRenderingProperties (
int property,
double val1,
double val2,
double val3,
1065 const std::string &
id =
"cloud",
int viewport = 0);
1074 setPointCloudRenderingProperties (
int property,
double value,
1075 const std::string &
id =
"cloud",
int viewport = 0);
1083 getPointCloudRenderingProperties (
int property,
double &value,
1084 const std::string &
id =
"cloud");
1091 setPointCloudSelected (
const bool selected,
const std::string &
id =
"cloud" );
1100 setShapeRenderingProperties (
int property,
double value,
1101 const std::string &
id,
int viewport = 0);
1112 setShapeRenderingProperties (
int property,
double val1,
double val2,
double val3,
1113 const std::string &
id,
int viewport = 0);
1117 wasStopped ()
const;
1121 resetStoppedFlag ();
1139 createViewPort (
double xmin,
double ymin,
double xmax,
double ymax,
int &viewport);
1145 createViewPortCamera (
const int viewport);
1156 template <
typename Po
intT>
bool
1158 double r,
double g,
double b,
1159 const std::string &
id =
"polygon",
int viewport = 0);
1167 template <
typename Po
intT>
bool
1169 const std::string &
id =
"polygon",
1180 template <
typename Po
intT>
bool
1182 double r,
double g,
double b,
1183 const std::string &
id =
"polygon",
1192 template <
typename P1,
typename P2>
bool
1193 addLine (
const P1 &pt1,
const P2 &pt2,
const std::string &
id =
"line",
1205 template <
typename P1,
typename P2>
bool
1206 addLine (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1207 const std::string &
id =
"line",
int viewport = 0);
1221 template <
typename P1,
typename P2>
bool
1222 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
1223 const std::string &
id =
"arrow",
int viewport = 0);
1238 template <
typename P1,
typename P2>
bool
1239 addArrow (
const P1 &pt1,
const P2 &pt2,
double r,
double g,
double b,
bool display_length,
1240 const std::string &
id =
"arrow",
int viewport = 0);
1257 template <
typename P1,
typename P2>
bool
1258 addArrow (
const P1 &pt1,
const P2 &pt2,
1259 double r_line,
double g_line,
double b_line,
1260 double r_text,
double g_text,
double b_text,
1261 const std::string &
id =
"arrow",
int viewport = 0);
1270 template <
typename Po
intT>
bool
1271 addSphere (
const PointT ¢er,
double radius,
const std::string &
id =
"sphere",
1283 template <
typename Po
intT>
bool
1284 addSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1285 const std::string &
id =
"sphere",
int viewport = 0);
1295 template <
typename Po
intT>
bool
1296 updateSphere (
const PointT ¢er,
double radius,
double r,
double g,
double b,
1297 const std::string &
id =
"sphere");
1306 const std::string &
id =
"PolyData",
1318 const std::string &
id =
"PolyData",
1327 addModelFromPLYFile (
const std::string &filename,
1328 const std::string &
id =
"PLYModel",
1338 addModelFromPLYFile (
const std::string &filename,
1340 const std::string &
id =
"PLYModel",
1371 const std::string &
id =
"cylinder",
1398 const std::string &
id =
"sphere",
1426 const std::string &
id =
"line",
1451 const std::string &
id =
"plane",
1456 const std::string &
id =
"plane",
1479 const std::string &
id =
"circle",
1489 const std::string &
id =
"cone",
1499 const std::string &
id =
"cube",
1512 addCube (
const Eigen::Vector3f &translation,
const Eigen::Quaternionf &rotation,
1513 double width,
double height,
double depth,
1514 const std::string &
id =
"cube",
1531 addCube (
float x_min,
float x_max,
float y_min,
float y_max,
float z_min,
float z_max,
1532 double r = 1.0,
double g = 1.0,
double b = 1.0,
const std::string &
id =
"cube",
int viewport = 0);
1536 setRepresentationToSurfaceForAllActors ();
1540 setRepresentationToPointsForAllActors ();
1544 setRepresentationToWireframeForAllActors ();
1550 setShowFPS (
bool show_fps);
1580 renderViewTesselatedSphere (
1583 std::vector<Eigen::Matrix4f,Eigen::aligned_allocator< Eigen::Matrix4f > > & poses, std::vector<float> & enthropies,
int tesselation_level,
1584 float view_angle = 45,
float radius_sphere = 1,
bool use_vertices =
true);
1589 initCameraParameters ();
1596 getCameraParameters (
int argc,
char **argv);
1602 loadCameraParameters (
const std::string &file);
1609 cameraParamsSet ()
const;
1618 cameraFileLoaded ()
const;
1626 getCameraFile ()
const;
1640 resetCameraViewpoint (
const std::string &
id =
"cloud");
1655 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1656 double view_x,
double view_y,
double view_z,
1657 double up_x,
double up_y,
double up_z,
int viewport = 0);
1669 setCameraPosition (
double pos_x,
double pos_y,
double pos_z,
1670 double up_x,
double up_y,
double up_z,
int viewport = 0);
1679 setCameraParameters (
const Eigen::Matrix3f &intrinsics,
const Eigen::Matrix4f &extrinsics,
int viewport = 0);
1686 setCameraParameters (
const Camera &camera,
int viewport = 0);
1694 setCameraClipDistances (
double near,
double far,
int viewport = 0);
1701 setCameraFieldOfView (
double fovy,
int viewport = 0);
1705 getCameras (std::vector<Camera>& cameras);
1710 getViewerPose (
int viewport = 0);
1716 saveScreenshot (
const std::string &file);
1722 saveCameraParameters (
const std::string &file);
1728 getCameraParameters (
Camera &camera);
1748 return (cloud_actor_map_);
1755 return (shape_actor_map_);
1763 setPosition (
int x,
int y);
1770 setSize (
int xw,
int yw);
1776 setUseVbos (
bool use_vbos);
1780 createInteractor ();
1788 setupInteractor (vtkRenderWindowInteractor *iren,
1789 vtkRenderWindow *win);
1798 setupInteractor (vtkRenderWindowInteractor *iren,
1799 vtkRenderWindow *win,
1800 vtkInteractorStyle *style);
1810 #if ((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 4))
1816 struct ExitMainLoopTimerCallback :
public vtkCommand
1818 static ExitMainLoopTimerCallback* New ()
1820 return (
new ExitMainLoopTimerCallback);
1823 Execute (vtkObject*,
unsigned long event_id,
void*);
1829 struct ExitCallback :
public vtkCommand
1831 static ExitCallback* New ()
1833 return (
new ExitCallback);
1836 Execute (vtkObject*,
unsigned long event_id,
void*);
1838 PCLVisualizer* pcl_visualizer;
1842 struct FPSCallback :
public vtkCommand
1844 static FPSCallback *New () {
return (
new FPSCallback); }
1846 FPSCallback () : actor (), pcl_visualizer (), decimated () {}
1847 FPSCallback (
const FPSCallback& src) : vtkCommand (), actor (src.actor), pcl_visualizer (src.pcl_visualizer), decimated (src.decimated) {}
1848 FPSCallback& operator = (
const FPSCallback& src) { actor = src.actor; pcl_visualizer = src.pcl_visualizer; decimated = src.decimated;
return (*
this); }
1851 Execute (vtkObject*,
unsigned long event_id,
void*);
1853 vtkTextActor *actor;
1854 PCLVisualizer* pcl_visualizer;
1861 #if !((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 4))
1897 bool camera_file_loaded_;
1945 bool use_scalars =
true);
1955 bool use_scalars =
true);
1963 template <
typename Po
intT>
void
1974 template <
typename Po
intT>
void
1975 convertPointCloudToVTKPolyData (
const PointCloudGeometryHandler<PointT> &geometry_handler,
1986 convertPointCloudToVTKPolyData (
const GeometryHandlerConstPtr &geometry_handler,
2001 vtkIdType nr_points);
2013 template <
typename Po
intT>
bool
2014 fromHandlersToScreen (
const PointCloudGeometryHandler<PointT> &geometry_handler,
2015 const PointCloudColorHandler<PointT> &color_handler,
2016 const std::string &
id,
2018 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2019 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2031 template <
typename Po
intT>
bool
2032 fromHandlersToScreen (
const PointCloudGeometryHandler<PointT> &geometry_handler,
2033 const ColorHandlerConstPtr &color_handler,
2034 const std::string &
id,
2036 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2037 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2050 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2051 const ColorHandlerConstPtr &color_handler,
2052 const std::string &
id,
2054 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2055 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2067 template <
typename Po
intT>
bool
2068 fromHandlersToScreen (
const GeometryHandlerConstPtr &geometry_handler,
2069 const PointCloudColorHandler<PointT> &color_handler,
2070 const std::string &
id,
2072 const Eigen::Vector4f& sensor_origin = Eigen::Vector4f (0, 0, 0, 0),
2073 const Eigen::Quaternion<float>& sensor_orientation = Eigen::Quaternion<float> (1, 0, 0 ,0));
2099 getTransformationMatrix (
const Eigen::Vector4f &origin,
2100 const Eigen::Quaternion<float> &orientation,
2101 Eigen::Matrix4f &transformation);
2112 vtkTexture* vtk_tex)
const;
2119 getUniqueCameraFile (
int argc,
char **argv);
2128 convertToVtkMatrix (
const Eigen::Matrix4f &m,
2137 convertToVtkMatrix (
const Eigen::Vector4f &origin,
2138 const Eigen::Quaternion<float> &orientation,
2147 Eigen::Matrix4f &m);
2153 #include <pcl/visualization/impl/pcl_visualizer.hpp>
static PCLVisualizerInteractorStyle * New()
vtkSmartPointer< PCLVisualizerInteractorStyle > getInteractorStyle()
Get a pointer to the current interactor style used.
boost::shared_ptr< PointCloud< PointT > > Ptr
PointCloudGeometryHandler< pcl::PCLPointCloud2 > GeometryHandler
Base Handler class for PointCloud colors.
PointCloudColorHandler< pcl::PCLPointCloud2 > ColorHandler
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.
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
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.
std::vector< PointCloud< PointT >, Eigen::aligned_allocator< PointCloud< PointT > > > CloudVectorType
/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.
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.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
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
PCL Visualizer main class.
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< ::pcl::PCLPointCloud2 const > ConstPtr
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...
PointCloud represents the base class in PCL for storing collections of 3D points. ...
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
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.