Point Cloud Library (PCL)  1.3.1
Classes | Files | Functions
Module visualization

Detailed Description

Overview

The pcl_visualization library was built for the purpose of being able to quickly prototype and visualize the results of algorithms operating on 3D point cloud data. Similar to OpenCV's highgui routines for displaying 2D images and for drawing basic 2D shapes on screen, the library offers:

The package makes use of the VTK library for 3D rendering and wxwidgets for range image and 2D operations.

For implementing your own visualizers, take a look at the tests and examples accompanying the library.

History

Requirements

Classes

class  pcl::visualization::CloudViewer
 Simple point cloud visualization class. More...
class  pcl::visualization::FloatImageUtils
 Provide some gerneral functionalities regarding 2d float arrays, e.g., for visualization purposes More...
class  pcl::visualization::PCLHistogramVisualizer
 PCL histogram visualizer main class. More...
class  pcl::visualization::PCLVisualizerInteractorStyle
 PCL Visualizer interactory style class. More...
class  pcl::visualization::PCLVisualizer
 PCL Visualizer main class. More...
class  pcl::visualization::PointCloudGeometryHandler
 Base handler class for PointCloud geometry. More...
class  pcl::visualization::PointCloudGeometryHandlerXYZ
 XYZ handler class for PointCloud geometry. More...
class  pcl::visualization::PointCloudGeometryHandlerSurfaceNormal
 Surface normal handler class for PointCloud geometry. More...
class  pcl::visualization::PointCloudGeometryHandlerCustom
 Custom handler class for PointCloud geometry. More...
class  pcl::visualization::PointCloudGeometryHandler< sensor_msgs::PointCloud2 >
 Base handler class for PointCloud geometry. More...
class  pcl::visualization::PointCloudGeometryHandlerXYZ< sensor_msgs::PointCloud2 >
 XYZ handler class for PointCloud geometry. More...
class  pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< sensor_msgs::PointCloud2 >
 Surface normal handler class for PointCloud geometry. More...
class  pcl::visualization::PointCloudGeometryHandlerCustom< sensor_msgs::PointCloud2 >
 Custom handler class for PointCloud geometry. More...
class  pcl::visualization::PointCloudColorHandler
 Base Handler class for PointCloud colors. More...
class  pcl::visualization::PointCloudColorHandlerRandom
 Handler for random PointCloud colors (i.e., R, G, B will be randomly chosen) More...
class  pcl::visualization::PointCloudColorHandlerCustom
 Handler for predefined user colors. More...
class  pcl::visualization::PointCloudColorHandlerRGBField
 RGB handler class for colors. More...
class  pcl::visualization::PointCloudColorHandlerGenericField
 Generic field handler class for colors. More...
class  pcl::visualization::PointCloudColorHandler< sensor_msgs::PointCloud2 >
 Base Handler class for PointCloud colors. More...
class  pcl::visualization::PointCloudColorHandlerRandom< sensor_msgs::PointCloud2 >
 Handler for random PointCloud colors (i.e., R, G, B will be randomly chosen) More...
class  pcl::visualization::PointCloudColorHandlerCustom< sensor_msgs::PointCloud2 >
 Handler for predefined user colors. More...
class  pcl::visualization::PointCloudColorHandlerRGBField< sensor_msgs::PointCloud2 >
 RGB handler class for colors. More...
class  pcl::visualization::PointCloudColorHandlerGenericField< sensor_msgs::PointCloud2 >
 Generic field handler class for colors. More...
class  pcl::visualization::RangeImageVisualizer
 Range image visualizer class. More...
class  pcl::RegistrationVisualizer
 RegistrationVisualizer represents the base class for rendering the intermediate positions ocupied by the source point cloud during it's registration to the target point cloud. More...

Files

file  shapes.h
 

Define methods or creating 3D shapes from parametric models.


Functions

PCL_EXPORTS void pcl::visualization::getCorrespondingPointCloud (vtkPolyData *src, const pcl::PointCloud< pcl::PointXYZ > &tgt, std::vector< int > &indices)
 Obtain a list of corresponding indices, for a set of vtk points, from a pcl::PointCloud.
PCL_EXPORTS bool pcl::visualization::savePointData (vtkPolyData *data, const std::string &out_file, const boost::shared_ptr< CloudActorMap > &actors)
 Saves the vtk-formatted Point Cloud data into a set of files, based on whether the data comes from previously loaded PCD files.
template<typename PointT >
vtkSmartPointer< vtkDataSet > pcl::visualization::createPolygon (const typename pcl::PointCloud< PointT >::ConstPtr &cloud)
 Create a 3d poly line from a set of points.
PCL_EXPORTS vtkSmartPointer
< vtkDataSet > 
pcl::visualization::createLine (const Eigen::Vector4f &pt1, const Eigen::Vector4f &pt2)
 Create a line shape from two points.
PCL_EXPORTS vtkSmartPointer
< vtkDataSet > 
pcl::visualization::createSphere (const Eigen::Vector4f &center, double radius, int res=10)
 Create a sphere shape from a point and a radius.
PCL_EXPORTS vtkSmartPointer
< vtkDataSet > 
pcl::visualization::createCylinder (const pcl::ModelCoefficients &coefficients, int numsides=30)
 Create a cylinder shape from a set of model coefficients.
PCL_EXPORTS vtkSmartPointer
< vtkDataSet > 
pcl::visualization::createSphere (const pcl::ModelCoefficients &coefficients, int res=10)
 Create a sphere shape from a set of model coefficients.
PCL_EXPORTS vtkSmartPointer
< vtkDataSet > 
pcl::visualization::createLine (const pcl::ModelCoefficients &coefficients)
 Create a line shape from a set of model coefficients.
PCL_EXPORTS vtkSmartPointer
< vtkDataSet > 
pcl::visualization::createPlane (const pcl::ModelCoefficients &coefficients)
 Create a planar shape from a set of model coefficients.
PCL_EXPORTS vtkSmartPointer
< vtkDataSet > 
pcl::visualization::create2DCircle (const pcl::ModelCoefficients &coefficients, double z=0.0)
 Create a 2d circle shape from a set of model coefficients.
PCL_EXPORTS vtkSmartPointer
< vtkDataSet > 
pcl::visualization::createCone (const pcl::ModelCoefficients &coefficients)
 Create a cone shape from a set of model coefficients.
PCL_EXPORTS vtkSmartPointer
< vtkDataSet > 
pcl::visualization::createCube (const pcl::ModelCoefficients &coefficients)
 Creaet a cube shape from a set of model coefficients.

Function Documentation

PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::create2DCircle ( const pcl::ModelCoefficients coefficients,
double  z = 0.0 
)

Create a 2d circle shape from a set of model coefficients.

Parameters:
coefficientsthe model coefficients (x, y, radius)
z(optional) specify a z value (default: 0)
 // The following are given (or computed using sample consensus techniques -- see SampleConsensusModelCircle2D)
 // float x, y, radius;

 pcl::ModelCoefficients circle_coeff;
 circle_coeff.values.resize (3);    // We need 3 values
 circle_coeff.values[0] = x;
 circle_coeff.values[1] = y;
 circle_coeff.values[2] = radius;

 vtkSmartPointer<vtkDataSet> data = pcl::visualization::create2DCircle (circle_coeff, z);
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createCone ( const pcl::ModelCoefficients coefficients)

Create a cone shape from a set of model coefficients.

Parameters:
coefficientsthe cone coefficients (point_on_axis, axis_direction, radius)
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createCube ( const pcl::ModelCoefficients coefficients)

Creaet a cube shape from a set of model coefficients.

Parameters:
coefficientsthe cube coefficients (Tx, Ty, Tz, Qx, Qy, Qz, Qw, width, height, depth)
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createCylinder ( const pcl::ModelCoefficients coefficients,
int  numsides = 30 
)

Create a cylinder shape from a set of model coefficients.

Parameters:
coefficientsthe model coefficients (point_on_axis, axis_direction, radius)
numsides(optional) the number of sides used for rendering the cylinder
 // The following are given (or computed using sample consensus techniques -- see SampleConsensusModelCylinder)
 // Eigen::Vector3f pt_on_axis, axis_direction;
 // float radius;

 pcl::ModelCoefficients cylinder_coeff;
 cylinder_coeff.values.resize (7);    // We need 7 values
 cylinder_coeff.values[0] = pt_on_axis.x ();
 cylinder_coeff.values[1] = pt_on_axis.y ();
 cylinder_coeff.values[2] = pt_on_axis.z ();

 cylinder_coeff.values[3] = axis_direction.x ();
 cylinder_coeff.values[4] = axis_direction.y ();
 cylinder_coeff.values[5] = axis_direction.z ();

 cylinder_coeff.values[6] = radius;

 vtkSmartPointer<vtkDataSet> data = pcl::visualization::createCylinder (cylinder_coeff, numsides);
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createLine ( const Eigen::Vector4f &  pt1,
const Eigen::Vector4f &  pt2 
)

Create a line shape from two points.

Parameters:
pt1the first point on the line
pt2the end point on the line
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createLine ( const pcl::ModelCoefficients coefficients)

Create a line shape from a set of model coefficients.

Parameters:
coefficientsthe model coefficients (point_on_line, line_direction)
 // The following are given (or computed using sample consensus techniques -- see SampleConsensusModelLine)
 // Eigen::Vector3f point_on_line, line_direction;

 pcl::ModelCoefficients line_coeff;
 line_coeff.values.resize (6);    // We need 6 values
 line_coeff.values[0] = point_on_line.x ();
 line_coeff.values[1] = point_on_line.y ();
 line_coeff.values[2] = point_on_line.z ();

 line_coeff.values[3] = line_direction.x ();
 line_coeff.values[4] = line_direction.y ();
 line_coeff.values[5] = line_direction.z ();

 vtkSmartPointer<vtkDataSet> data = pcl::visualization::createLine (line_coeff);
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createPlane ( const pcl::ModelCoefficients coefficients)

Create a planar shape from a set of model coefficients.

Parameters:
coefficientsthe model coefficients (a, b, c, d with ax+by+cz+d=0)
 // The following are given (or computed using sample consensus techniques -- see SampleConsensusModelPlane)
 // Eigen::Vector4f plane_parameters;

 pcl::ModelCoefficients plane_coeff;
 plane_coeff.values.resize (4);    // We need 4 values
 plane_coeff.values[0] = plane_parameters.x ();
 plane_coeff.values[1] = plane_parameters.y ();
 plane_coeff.values[2] = plane_parameters.z ();
 plane_coeff.values[3] = plane_parameters.w ();

 vtkSmartPointer<vtkDataSet> data = pcl::visualization::createPlane (plane_coeff);
template<typename PointT >
vtkSmartPointer< vtkDataSet > pcl::visualization::createPolygon ( const typename pcl::PointCloud< PointT >::ConstPtr &  cloud) [inline]

Create a 3d poly line from a set of points.

Parameters:
cloudthe set of points used to create the 3d polyline

Definition at line 40 of file shapes.hpp.

PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createSphere ( const Eigen::Vector4f &  center,
double  radius,
int  res = 10 
)

Create a sphere shape from a point and a radius.

Parameters:
centerthe center of the sphere (as an Eigen Vector4f, with only the first 3 coordinates used)
radiusthe radius of the sphere
res(optional) the resolution used for rendering the model
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createSphere ( const pcl::ModelCoefficients coefficients,
int  res = 10 
)

Create a sphere shape from a set of model coefficients.

Parameters:
coefficientsthe model coefficients (sphere center, radius)
res(optional) the resolution used for rendering the model
 // The following are given (or computed using sample consensus techniques -- see SampleConsensusModelSphere)
 // Eigen::Vector3f sphere_center;
 // float radius;

 pcl::ModelCoefficients sphere_coeff;
 sphere_coeff.values.resize (4);    // We need 4 values
 sphere_coeff.values[0] = sphere_center.x ();
 sphere_coeff.values[1] = sphere_center.y ();
 sphere_coeff.values[2] = sphere_center.z ();

 sphere_coeff.values[3] = radius;

 vtkSmartPointer<vtkDataSet> data = pcl::visualization::createSphere (sphere_coeff, resolution);
PCL_EXPORTS void pcl::visualization::getCorrespondingPointCloud ( vtkPolyData *  src,
const pcl::PointCloud< pcl::PointXYZ > &  tgt,
std::vector< int > &  indices 
)

Obtain a list of corresponding indices, for a set of vtk points, from a pcl::PointCloud.

Parameters:
srcthe set of vtk points
tgtthe target pcl::PointCloud that we need to obtain indices from
indicesthe resultant list of indices
PCL_EXPORTS bool pcl::visualization::savePointData ( vtkPolyData *  data,
const std::string &  out_file,
const boost::shared_ptr< CloudActorMap > &  actors 
)

Saves the vtk-formatted Point Cloud data into a set of files, based on whether the data comes from previously loaded PCD files.

The PCD files are matched using the a list of names for the actors on screen.

Parameters:
datathe vtk data
out_filethe output file (extra indices will be appended to it)
actorsthe list of actors present on screen
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines