Point Cloud Library (PCL)
1.14.1-dev
|
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 for range image and 2D operations.
For implementing your own visualizers, take a look at the tests and examples accompanying the library.
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, pcl::Indices &indices) |
Obtain a list of corresponding indices, for a set of vtk points, from a pcl::PointCloud. More... | |
PCL_EXPORTS bool | pcl::visualization::savePointData (vtkPolyData *data, const std::string &out_file, const CloudActorMapPtr &actors) |
Saves the vtk-formatted Point Cloud data into a set of files, based on whether the data comes from previously loaded PCD files. More... | |
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. More... | |
template<typename PointT > | |
vtkSmartPointer< vtkDataSet > | pcl::visualization::createPolygon (const pcl::PlanarPolygon< PointT > &planar_polygon) |
Create a 3d poly line from a set of points on the boundary of a planar region. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createLine (const Eigen::Vector4f &pt1, const Eigen::Vector4f &pt2) |
Create a line shape from two points. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createSphere (const Eigen::Vector4f ¢er, double radius, int res=10) |
Create a sphere shape from a point and a radius. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createCylinder (const pcl::ModelCoefficients &coefficients, int numsides=30) |
Create a cylinder shape from a set of model coefficients. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createSphere (const pcl::ModelCoefficients &coefficients, int res=10) |
Create a sphere shape from a set of model coefficients. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createLine (const pcl::ModelCoefficients &coefficients) |
Create a line shape from a set of model coefficients. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createPlane (const pcl::ModelCoefficients &coefficients) |
Create a planar shape from a set of model coefficients. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createPlane (const pcl::ModelCoefficients &coefficients, double x, double y, double z) |
Create a planar shape from a set of model coefficients. More... | |
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. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createCone (const pcl::ModelCoefficients &coefficients) |
Create a cone shape from a set of model coefficients. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createCube (const pcl::ModelCoefficients &coefficients) |
Create a cube shape from a set of model coefficients. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createCube (const Eigen::Vector3f &translation, const Eigen::Quaternionf &rotation, double width, double height, double depth) |
Create a cube shape from a set of model coefficients. More... | |
PCL_EXPORTS vtkSmartPointer< vtkDataSet > | pcl::visualization::createEllipsoid (const Eigen::Isometry3d &transform, double radius_x, double radius_y, double radius_z) |
Create an ellipsoid shape from the given parameters. More... | |
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::create2DCircle | ( | const pcl::ModelCoefficients & | coefficients, |
double | z = 0.0 |
||
) |
#include <pcl/visualization/common/shapes.h>
Create a 2d circle shape from a set of model coefficients.
[in] | coefficients | the model coefficients (x, y, radius) |
[in] | z | (optional) specify a z value (default: 0) |
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createCone | ( | const pcl::ModelCoefficients & | coefficients | ) |
#include <pcl/visualization/common/shapes.h>
Create a cone shape from a set of model coefficients.
[in] | coefficients | the cone coefficients (cone_apex, axis_direction, angle) |
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createCube | ( | const Eigen::Vector3f & | translation, |
const Eigen::Quaternionf & | rotation, | ||
double | width, | ||
double | height, | ||
double | depth | ||
) |
#include <pcl/visualization/common/shapes.h>
Create a cube shape from a set of model coefficients.
[in] | translation | a translation to apply to the cube from 0,0,0 |
[in] | rotation | a quaternion-based rotation to apply to the cube |
[in] | width | the cube's width |
[in] | height | the cube's height |
[in] | depth | the cube's depth |
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createCube | ( | const pcl::ModelCoefficients & | coefficients | ) |
#include <pcl/visualization/common/shapes.h>
Create a cube shape from a set of model coefficients.
[in] | coefficients | the 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 |
||
) |
#include <pcl/visualization/common/shapes.h>
Create a cylinder shape from a set of model coefficients.
[in] | coefficients | the model coefficients (point_on_axis, axis_direction, radius) |
[in] | numsides | (optional) the number of sides used for rendering the cylinder |
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createEllipsoid | ( | const Eigen::Isometry3d & | transform, |
double | radius_x, | ||
double | radius_y, | ||
double | radius_z | ||
) |
#include <pcl/visualization/common/shapes.h>
Create an ellipsoid shape from the given parameters.
[in] | transform | a transformation to apply to the ellipsoid from 0,0,0 |
[in] | radius_x | the ellipsoid's radius along its local x-axis |
[in] | radius_y | the ellipsoid's radius along its local y-axis |
[in] | radius_z | the ellipsoid's radius along its local z-axis |
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createLine | ( | const Eigen::Vector4f & | pt1, |
const Eigen::Vector4f & | pt2 | ||
) |
#include <pcl/visualization/common/shapes.h>
Create a line shape from two points.
[in] | pt1 | the first point on the line |
[in] | pt2 | the end point on the line |
Referenced by pcl::visualization::PCLVisualizer::addLine().
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createLine | ( | const pcl::ModelCoefficients & | coefficients | ) |
#include <pcl/visualization/common/shapes.h>
Create a line shape from a set of model coefficients.
[in] | coefficients | the model coefficients (point_on_line, line_direction) |
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createPlane | ( | const pcl::ModelCoefficients & | coefficients | ) |
#include <pcl/visualization/common/shapes.h>
Create a planar shape from a set of model coefficients.
[in] | coefficients | the model coefficients (a, b, c, d with ax+by+cz+d=0) |
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createPlane | ( | const pcl::ModelCoefficients & | coefficients, |
double | x, | ||
double | y, | ||
double | z | ||
) |
#include <pcl/visualization/common/shapes.h>
Create a planar shape from a set of model coefficients.
[in] | coefficients | the model coefficients (a, b, c, d with ax+by+cz+d=0) |
[in] | x,y,z | projection of this point on the plane is used to get the center of the plane. |
|
inline |
#include <pcl/visualization/common/impl/shapes.hpp>
Create a 3d poly line from a set of points on the boundary of a planar region.
[in] | planar_polygon | the set of points used to create the 3d polyline |
Definition at line 82 of file shapes.hpp.
References pcl::visualization::allocVtkUnstructuredGrid(), and pcl::PlanarPolygon< PointT >::getContour().
|
inline |
#include <pcl/visualization/common/impl/shapes.hpp>
Create a 3d poly line from a set of points.
[in] | cloud | the set of points used to create the 3d polyline |
Definition at line 54 of file shapes.hpp.
References pcl::visualization::allocVtkUnstructuredGrid(), pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::size().
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createSphere | ( | const Eigen::Vector4f & | center, |
double | radius, | ||
int | res = 10 |
||
) |
#include <pcl/visualization/common/shapes.h>
Create a sphere shape from a point and a radius.
[in] | center | the center of the sphere (as an Eigen Vector4f, with only the first 3 coordinates used) |
[in] | radius | the radius of the sphere |
[in] | res | (optional) the resolution used for rendering the model |
PCL_EXPORTS vtkSmartPointer<vtkDataSet> pcl::visualization::createSphere | ( | const pcl::ModelCoefficients & | coefficients, |
int | res = 10 |
||
) |
#include <pcl/visualization/common/shapes.h>
Create a sphere shape from a set of model coefficients.
[in] | coefficients | the model coefficients (sphere center, radius) |
[in] | res | (optional) the resolution used for rendering the model |
PCL_EXPORTS void pcl::visualization::getCorrespondingPointCloud | ( | vtkPolyData * | src, |
const pcl::PointCloud< pcl::PointXYZ > & | tgt, | ||
pcl::Indices & | indices | ||
) |
#include <pcl/visualization/common/io.h>
Obtain a list of corresponding indices, for a set of vtk points, from a pcl::PointCloud.
src | the set of vtk points |
tgt | the target pcl::PointCloud that we need to obtain indices from |
indices | the resultant list of indices |
PCL_EXPORTS bool pcl::visualization::savePointData | ( | vtkPolyData * | data, |
const std::string & | out_file, | ||
const CloudActorMapPtr & | actors | ||
) |
#include <pcl/visualization/common/io.h>
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.
data | the vtk data |
out_file | the output file (extra indices will be appended to it) |
actors | the list of actors present on screen |