|
Point Cloud Library (PCL)
1.6.0
|
The pcl_io library contains classes and functions for reading and writing point cloud data (PCD) files, as well as capturing point clouds from a variety of sensing devices. An introduction to some of these capabilities can be found in the following tutorials:
PCL is agnostic with respect to the data sources that are used to generate 3D point clouds. While OpenNI-compatible cameras have recently been at the center of attention in the 3D/robotics sensing community, many of the devices enumerated below have been used with PCL tools in the past:
Classes | |
| class | pcl::FileReader |
| Point Cloud Data (FILE) file format reader interface. More... | |
| class | pcl::FileWriter |
| Point Cloud Data (FILE) file format writer. More... | |
| class | pcl::Grabber |
| Grabber interface for PCL 1.x device drivers. More... | |
| class | pcl::PCDGrabberBase |
| Base class for PCD file grabber. More... | |
| class | pcl::PCDReader |
| Point Cloud Data (PCD) file format reader. More... | |
| class | pcl::PCDWriter |
| Point Cloud Data (PCD) file format writer. More... | |
| class | pcl::PCLIOException |
| Base exception class for I/O operations. More... | |
| class | pcl::PLYReader |
| Point Cloud Data (PLY) file format reader. More... | |
| class | pcl::PLYWriter |
| Point Cloud Data (PLY) file format writer. More... | |
Files | |
| file | byte_order.h |
defines byte shift operations and endianess. | |
| file | io_operators.h |
defines output operators for int8 and uint8 | |
| file | ply.h |
contains standard typedefs and generic type traits | |
Functions | |
| PCL_EXPORTS int | pcl::io::saveOBJFile (const std::string &file_name, const pcl::TextureMesh &tex_mesh, unsigned precision=5) |
| Saves a TextureMesh in ascii OBJ format. | |
| PCL_EXPORTS int | pcl::io::saveOBJFile (const std::string &file_name, const pcl::PolygonMesh &mesh, unsigned precision=5) |
| Saves a PolygonMesh in ascii PLY format. | |
| int | pcl::io::loadPCDFile (const std::string &file_name, sensor_msgs::PointCloud2 &cloud) |
| Load a PCD v.6 file into a templated PointCloud type. | |
| int | pcl::io::loadPCDFile (const std::string &file_name, sensor_msgs::PointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation) |
| Load any PCD file into a templated PointCloud type. | |
| template<typename PointT > | |
| int | pcl::io::loadPCDFile (const std::string &file_name, pcl::PointCloud< PointT > &cloud) |
| Load any PCD file into a templated PointCloud type. | |
| int | pcl::io::savePCDFile (const std::string &file_name, const sensor_msgs::PointCloud2 &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity(), const bool binary_mode=false) |
| Save point cloud data to a PCD file containing n-D points. | |
| template<typename PointT > | |
| int | pcl::io::savePCDFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, bool binary_mode=false) |
| Templated version for saving point cloud data to a PCD file containing a specific given cloud format. | |
| template<typename PointT > | |
| int | pcl::io::savePCDFileASCII (const std::string &file_name, const pcl::PointCloud< PointT > &cloud) |
| Templated version for saving point cloud data to a PCD file containing a specific given cloud format. | |
| template<typename PointT > | |
| int | pcl::io::savePCDFileBinary (const std::string &file_name, const pcl::PointCloud< PointT > &cloud) |
| Templated version for saving point cloud data to a PCD file containing a specific given cloud format. | |
| template<typename PointT > | |
| int | pcl::io::savePCDFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, const std::vector< int > &indices, const bool binary_mode=false) |
| Templated version for saving point cloud data to a PCD file containing a specific given cloud format. | |
| void | pcl::throwPCLIOException (const char *function_name, const char *file_name, unsigned line_number, const char *format,...) |
| int | pcl::io::loadPLYFile (const std::string &file_name, sensor_msgs::PointCloud2 &cloud) |
| Load a PLY v.6 file into a templated PointCloud type. | |
| int | pcl::io::loadPLYFile (const std::string &file_name, sensor_msgs::PointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation) |
| Load any PLY file into a templated PointCloud type. | |
| template<typename PointT > | |
| int | pcl::io::loadPLYFile (const std::string &file_name, pcl::PointCloud< PointT > &cloud) |
| Load any PLY file into a templated PointCloud type. | |
| int | pcl::io::savePLYFile (const std::string &file_name, const sensor_msgs::PointCloud2 &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity(), bool binary_mode=false, bool use_camera=true) |
| Save point cloud data to a PLY file containing n-D points. | |
| template<typename PointT > | |
| int | pcl::io::savePLYFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, bool binary_mode=false) |
| Templated version for saving point cloud data to a PLY file containing a specific given cloud format. | |
| template<typename PointT > | |
| int | pcl::io::savePLYFileASCII (const std::string &file_name, const pcl::PointCloud< PointT > &cloud) |
| Templated version for saving point cloud data to a PLY file containing a specific given cloud format. | |
| template<typename PointT > | |
| int | pcl::io::savePLYFileBinary (const std::string &file_name, const pcl::PointCloud< PointT > &cloud) |
| Templated version for saving point cloud data to a PLY file containing a specific given cloud format. | |
| template<typename PointT > | |
| int | pcl::io::savePLYFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, const std::vector< int > &indices, bool binary_mode=false) |
| Templated version for saving point cloud data to a PLY file containing a specific given cloud format. | |
| PCL_EXPORTS int | pcl::io::savePLYFile (const std::string &file_name, const pcl::PolygonMesh &mesh, unsigned precision=5) |
| Saves a PolygonMesh in ascii PLY format. | |
| PCL_EXPORTS int | pcl::io::saveVTKFile (const std::string &file_name, const pcl::PolygonMesh &triangles, unsigned precision=5) |
| Saves a PolygonMesh in ascii VTK format. | |
| PCL_EXPORTS int | pcl::io::saveVTKFile (const std::string &file_name, const sensor_msgs::PointCloud2 &cloud, unsigned precision=5) |
| Saves a PointCloud in ascii VTK format. | |
| PCL_EXPORTS int | pcl::io::loadPolygonFile (const std::string &file_name, pcl::PolygonMesh &mesh) |
| Load a PolygonMesh object given an input file name, based on the file extension. | |
| PCL_EXPORTS int | pcl::io::savePolygonFile (const std::string &file_name, const pcl::PolygonMesh &mesh) |
| Save a PolygonMesh object given an input file name, based on the file extension. | |
| PCL_EXPORTS int | pcl::io::loadPolygonFileVTK (const std::string &file_name, pcl::PolygonMesh &mesh) |
| Load a VTK file into a PolygonMesh object. | |
| PCL_EXPORTS int | pcl::io::loadPolygonFilePLY (const std::string &file_name, pcl::PolygonMesh &mesh) |
| Load a PLY file into a PolygonMesh object. | |
| PCL_EXPORTS int | pcl::io::loadPolygonFileOBJ (const std::string &file_name, pcl::PolygonMesh &mesh) |
| Load an OBJ file into a PolygonMesh object. | |
| PCL_EXPORTS int | pcl::io::loadPolygonFileSTL (const std::string &file_name, pcl::PolygonMesh &mesh) |
| Load an STL file into a PolygonMesh object. | |
| PCL_EXPORTS int | pcl::io::savePolygonFileVTK (const std::string &file_name, const pcl::PolygonMesh &mesh) |
| Save a PolygonMesh object into a VTK file. | |
| PCL_EXPORTS int | pcl::io::savePolygonFilePLY (const std::string &file_name, const pcl::PolygonMesh &mesh) |
| Save a PolygonMesh object into a PLY file. | |
| PCL_EXPORTS int | pcl::io::savePolygonFileSTL (const std::string &file_name, const pcl::PolygonMesh &mesh) |
| Save a PolygonMesh object into an STL file. | |
| PCL_EXPORTS void | pcl::io::saveRangeImagePlanarFilePNG (const std::string &file_name, const pcl::RangeImagePlanar &range_image) |
| Write a RangeImagePlanar object to a PNG file. | |
| template<typename PointT > | |
| void | pcl::io::pointCloudTovtkPolyData (const pcl::PointCloud< PointT > &cloud, vtkPolyData *const polydata) |
| Convert a pcl::PointCloud object to a VTK PolyData one. | |
| template<typename PointT > | |
| void | pcl::io::pointCloudTovtkStructuredGrid (const pcl::PointCloud< PointT > &cloud, vtkStructuredGrid *const structured_grid) |
| Convert a pcl::PointCloud object to a VTK StructuredGrid one. | |
| template<typename PointT > | |
| void | pcl::io::vtkPolyDataToPointCloud (vtkPolyData *const polydata, pcl::PointCloud< PointT > &cloud) |
| Convert a VTK PolyData object to a pcl::PointCloud one. | |
| template<typename PointT > | |
| void | pcl::io::vtkStructuredGridToPointCloud (vtkStructuredGrid *const structured_grid, pcl::PointCloud< PointT > &cloud) |
| Convert a VTK StructuredGrid object to a pcl::PointCloud one. | |
| int pcl::io::loadPCDFile | ( | const std::string & | file_name, |
| sensor_msgs::PointCloud2 & | cloud | ||
| ) | [inline] |
Load a PCD v.6 file into a templated PointCloud type.
Any PCD files > v.6 will generate a warning as a sensor_msgs/PointCloud2 message cannot hold the sensor origin.
| [in] | file_name | the name of the file to load |
| [out] | cloud | the resultant templated point cloud |
| int pcl::io::loadPCDFile | ( | const std::string & | file_name, |
| sensor_msgs::PointCloud2 & | cloud, | ||
| Eigen::Vector4f & | origin, | ||
| Eigen::Quaternionf & | orientation | ||
| ) | [inline] |
Load any PCD file into a templated PointCloud type.
| [in] | file_name | the name of the file to load |
| [out] | cloud | the resultant templated point cloud |
| [out] | origin | the sensor acquisition origin (only for > PCD_V7 - null if not present) |
| [out] | orientation | the sensor acquisition orientation (only for > PCD_V7 - identity if not present) |
| int pcl::io::loadPCDFile | ( | const std::string & | file_name, |
| pcl::PointCloud< PointT > & | cloud | ||
| ) | [inline] |
Load any PCD file into a templated PointCloud type.
| [in] | file_name | the name of the file to load |
| [out] | cloud | the resultant templated point cloud |
| int pcl::io::loadPLYFile | ( | const std::string & | file_name, |
| sensor_msgs::PointCloud2 & | cloud | ||
| ) | [inline] |
Load a PLY v.6 file into a templated PointCloud type.
Any PLY files containg sensor data will generate a warning as a sensor_msgs/PointCloud2 message cannot hold the sensor origin.
| [in] | file_name | the name of the file to load |
| [in] | cloud | the resultant templated point cloud |
| int pcl::io::loadPLYFile | ( | const std::string & | file_name, |
| sensor_msgs::PointCloud2 & | cloud, | ||
| Eigen::Vector4f & | origin, | ||
| Eigen::Quaternionf & | orientation | ||
| ) | [inline] |
Load any PLY file into a templated PointCloud type.
| [in] | file_name | the name of the file to load |
| [in] | cloud | the resultant templated point cloud |
| [in] | origin | the sensor acquisition origin (only for > PLY_V7 - null if not present) |
| [in] | orientation | the sensor acquisition orientation if availble, identity if not present |
| int pcl::io::loadPLYFile | ( | const std::string & | file_name, |
| pcl::PointCloud< PointT > & | cloud | ||
| ) | [inline] |
Load any PLY file into a templated PointCloud type.
| [in] | file_name | the name of the file to load |
| [in] | cloud | the resultant templated point cloud |
| PCL_EXPORTS int pcl::io::loadPolygonFile | ( | const std::string & | file_name, |
| pcl::PolygonMesh & | mesh | ||
| ) |
Load a PolygonMesh object given an input file name, based on the file extension.
| [in] | file_name | the name of the file containing the polygon data |
| [out] | mesh | the object that we want to load the data in |
| PCL_EXPORTS int pcl::io::loadPolygonFileOBJ | ( | const std::string & | file_name, |
| pcl::PolygonMesh & | mesh | ||
| ) |
Load an OBJ file into a PolygonMesh object.
| [in] | file_name | the name of the file that contains the data |
| [out] | mesh | the object that we want to load the data in |
| PCL_EXPORTS int pcl::io::loadPolygonFilePLY | ( | const std::string & | file_name, |
| pcl::PolygonMesh & | mesh | ||
| ) |
Load a PLY file into a PolygonMesh object.
| [in] | file_name | the name of the file that contains the data |
| [out] | mesh | the object that we want to load the data in |
| PCL_EXPORTS int pcl::io::loadPolygonFileSTL | ( | const std::string & | file_name, |
| pcl::PolygonMesh & | mesh | ||
| ) |
Load an STL file into a PolygonMesh object.
| [in] | file_name | the name of the file that contains the data |
| [out] | mesh | the object that we want to load the data in |
| PCL_EXPORTS int pcl::io::loadPolygonFileVTK | ( | const std::string & | file_name, |
| pcl::PolygonMesh & | mesh | ||
| ) |
Load a VTK file into a PolygonMesh object.
| [in] | file_name | the name of the file that contains the data |
| [out] | mesh | the object that we want to load the data in |
| void pcl::io::pointCloudTovtkPolyData | ( | const pcl::PointCloud< PointT > & | cloud, |
| vtkPolyData *const | polydata | ||
| ) |
Convert a pcl::PointCloud object to a VTK PolyData one.
| [in] | cloud | the input pcl::PointCloud object |
| [out] | polydata | the resultant VTK PolyData object |
Definition at line 277 of file vtk_lib_io.hpp.
| void pcl::io::pointCloudTovtkStructuredGrid | ( | const pcl::PointCloud< PointT > & | cloud, |
| vtkStructuredGrid *const | structured_grid | ||
| ) |
Convert a pcl::PointCloud object to a VTK StructuredGrid one.
| [in] | cloud | the input pcl::PointCloud object |
| [out] | structured_grid | the resultant VTK StructuredGrid object |
Definition at line 364 of file vtk_lib_io.hpp.
| PCL_EXPORTS int pcl::io::saveOBJFile | ( | const std::string & | file_name, |
| const pcl::TextureMesh & | tex_mesh, | ||
| unsigned | precision = 5 |
||
| ) |
Saves a TextureMesh in ascii OBJ format.
| [in] | file_name | the name of the file to write to disk |
| [in] | tex_mesh | the texture mesh to save |
| [in] | precision | the output ASCII precision |
| PCL_EXPORTS int pcl::io::saveOBJFile | ( | const std::string & | file_name, |
| const pcl::PolygonMesh & | mesh, | ||
| unsigned | precision = 5 |
||
| ) |
Saves a PolygonMesh in ascii PLY format.
| [in] | file_name | the name of the file to write to disk |
| [in] | mesh | the polygonal mesh to save |
| [in] | precision | the output ASCII precision default 5 |
| int pcl::io::savePCDFile | ( | const std::string & | file_name, |
| const sensor_msgs::PointCloud2 & | cloud, | ||
| const Eigen::Vector4f & | origin = Eigen::Vector4f::Zero (), |
||
| const Eigen::Quaternionf & | orientation = Eigen::Quaternionf::Identity (), |
||
| const bool | binary_mode = false |
||
| ) | [inline] |
Save point cloud data to a PCD file containing n-D points.
| [in] | file_name | the output file name |
| [in] | cloud | the point cloud data message |
| [in] | origin | the sensor acquisition origin |
| [in] | orientation | the sensor acquisition orientation |
| [in] | binary_mode | true for binary mode, false (default) for ASCII |
Caution: PointCloud structures containing an RGB field have traditionally used packed float values to store RGB data. Storing a float as ASCII can introduce variations to the smallest bits, and thus significantly alter the data. This is a known issue, and the fix involves switching RGB data to be stored as a packed integer in future versions of PCL.
| int pcl::io::savePCDFile | ( | const std::string & | file_name, |
| const pcl::PointCloud< PointT > & | cloud, | ||
| bool | binary_mode = false |
||
| ) | [inline] |
Templated version for saving point cloud data to a PCD file containing a specific given cloud format.
| [in] | file_name | the output file name |
| [in] | cloud | the point cloud data message |
| [in] | binary_mode | true for binary mode, false (default) for ASCII |
Caution: PointCloud structures containing an RGB field have traditionally used packed float values to store RGB data. Storing a float as ASCII can introduce variations to the smallest bits, and thus significantly alter the data. This is a known issue, and the fix involves switching RGB data to be stored as a packed integer in future versions of PCL.
| int pcl::io::savePCDFile | ( | const std::string & | file_name, |
| const pcl::PointCloud< PointT > & | cloud, | ||
| const std::vector< int > & | indices, | ||
| const bool | binary_mode = false |
||
| ) |
Templated version for saving point cloud data to a PCD file containing a specific given cloud format.
| [in] | file_name | the output file name |
| [in] | cloud | the point cloud data message |
| [in] | indices | the set of indices to save |
| [in] | binary_mode | true for binary mode, false (default) for ASCII |
Caution: PointCloud structures containing an RGB field have traditionally used packed float values to store RGB data. Storing a float as ASCII can introduce variations to the smallest bits, and thus significantly alter the data. This is a known issue, and the fix involves switching RGB data to be stored as a packed integer in future versions of PCL.
| int pcl::io::savePCDFileASCII | ( | const std::string & | file_name, |
| const pcl::PointCloud< PointT > & | cloud | ||
| ) | [inline] |
Templated version for saving point cloud data to a PCD file containing a specific given cloud format.
This version is to retain backwards compatibility.
| [in] | file_name | the output file name |
| [in] | cloud | the point cloud data message |
Caution: PointCloud structures containing an RGB field have traditionally used packed float values to store RGB data. Storing a float as ASCII can introduce variations to the smallest bits, and thus significantly alter the data. This is a known issue, and the fix involves switching RGB data to be stored as a packed integer in future versions of PCL.
| int pcl::io::savePCDFileBinary | ( | const std::string & | file_name, |
| const pcl::PointCloud< PointT > & | cloud | ||
| ) | [inline] |
| int pcl::io::savePLYFile | ( | const std::string & | file_name, |
| const sensor_msgs::PointCloud2 & | cloud, | ||
| const Eigen::Vector4f & | origin = Eigen::Vector4f::Zero (), |
||
| const Eigen::Quaternionf & | orientation = Eigen::Quaternionf::Identity (), |
||
| bool | binary_mode = false, |
||
| bool | use_camera = true |
||
| ) | [inline] |
Save point cloud data to a PLY file containing n-D points.
| [in] | file_name | the output file name |
| [in] | cloud | the point cloud data message |
| [in] | origin | the sensor data acquisition origin (translation) |
| [in] | orientation | the sensor data acquisition origin (rotation) |
| [in] | binary_mode | true for binary mode, false (default) for ASCII |
| int pcl::io::savePLYFile | ( | const std::string & | file_name, |
| const pcl::PointCloud< PointT > & | cloud, | ||
| bool | binary_mode = false |
||
| ) | [inline] |
| int pcl::io::savePLYFile | ( | const std::string & | file_name, |
| const pcl::PointCloud< PointT > & | cloud, | ||
| const std::vector< int > & | indices, | ||
| bool | binary_mode = false |
||
| ) |
Templated version for saving point cloud data to a PLY file containing a specific given cloud format.
| [in] | file_name | the output file name |
| [in] | cloud | the point cloud data message |
| [in] | indices | the set of indices to save |
| [in] | binary_mode | true for binary mode, false (default) for ASCII |
| PCL_EXPORTS int pcl::io::savePLYFile | ( | const std::string & | file_name, |
| const pcl::PolygonMesh & | mesh, | ||
| unsigned | precision = 5 |
||
| ) |
Saves a PolygonMesh in ascii PLY format.
| [in] | file_name | the name of the file to write to disk |
| [in] | mesh | the polygonal mesh to save |
| [in] | precision | the output ASCII precision default 5 |
| int pcl::io::savePLYFileASCII | ( | const std::string & | file_name, |
| const pcl::PointCloud< PointT > & | cloud | ||
| ) | [inline] |
| int pcl::io::savePLYFileBinary | ( | const std::string & | file_name, |
| const pcl::PointCloud< PointT > & | cloud | ||
| ) | [inline] |
| PCL_EXPORTS int pcl::io::savePolygonFile | ( | const std::string & | file_name, |
| const pcl::PolygonMesh & | mesh | ||
| ) |
Save a PolygonMesh object given an input file name, based on the file extension.
| [in] | file_name | the name of the file to save the data to |
| [in] | mesh | the object that contains the data |
| PCL_EXPORTS int pcl::io::savePolygonFilePLY | ( | const std::string & | file_name, |
| const pcl::PolygonMesh & | mesh | ||
| ) |
Save a PolygonMesh object into a PLY file.
| [in] | file_name | the name of the file to save the data to |
| [in] | mesh | the object that contains the data |
| PCL_EXPORTS int pcl::io::savePolygonFileSTL | ( | const std::string & | file_name, |
| const pcl::PolygonMesh & | mesh | ||
| ) |
Save a PolygonMesh object into an STL file.
| [in] | file_name | the name of the file to save the data to |
| [in] | mesh | the object that contains the data |
| PCL_EXPORTS int pcl::io::savePolygonFileVTK | ( | const std::string & | file_name, |
| const pcl::PolygonMesh & | mesh | ||
| ) |
Save a PolygonMesh object into a VTK file.
| [in] | file_name | the name of the file to save the data to |
| [in] | mesh | the object that contains the data |
| PCL_EXPORTS void pcl::io::saveRangeImagePlanarFilePNG | ( | const std::string & | file_name, |
| const pcl::RangeImagePlanar & | range_image | ||
| ) |
Write a RangeImagePlanar object to a PNG file.
| [in] | file_name | the name of the file to save the data to |
| [in] | range_image | the object that contains the data |
| PCL_EXPORTS int pcl::io::saveVTKFile | ( | const std::string & | file_name, |
| const pcl::PolygonMesh & | triangles, | ||
| unsigned | precision = 5 |
||
| ) |
Saves a PolygonMesh in ascii VTK format.
| [in] | file_name | the name of the file to write to disk |
| [in] | triangles | the polygonal mesh to save |
| [in] | precision | the output ASCII precision |
| PCL_EXPORTS int pcl::io::saveVTKFile | ( | const std::string & | file_name, |
| const sensor_msgs::PointCloud2 & | cloud, | ||
| unsigned | precision = 5 |
||
| ) |
Saves a PointCloud in ascii VTK format.
| [in] | file_name | the name of the file to write to disk |
| [in] | cloud | the point cloud to save |
| [in] | precision | the output ASCII precision |
| void pcl::throwPCLIOException | ( | const char * | function_name, |
| const char * | file_name, | ||
| unsigned | line_number, | ||
| const char * | format, | ||
| ... | |||
| ) | [inline] |
| [in] | function_name | the name of the method where the exception was caused |
| [in] | file_name | the name of the file where the exception was caused |
| [in] | line_number | the number of the line where the exception was caused |
| [in] | format | printf format |
Definition at line 81 of file pcl_io_exception.h.
| void pcl::io::vtkPolyDataToPointCloud | ( | vtkPolyData *const | polydata, |
| pcl::PointCloud< PointT > & | cloud | ||
| ) |
Convert a VTK PolyData object to a pcl::PointCloud one.
| [in] | polydata | the input VTK PolyData object |
| [out] | cloud | the resultant pcl::PointCloud object |
Definition at line 63 of file vtk_lib_io.hpp.
| void pcl::io::vtkStructuredGridToPointCloud | ( | vtkStructuredGrid *const | structured_grid, |
| pcl::PointCloud< PointT > & | cloud | ||
| ) |
Convert a VTK StructuredGrid object to a pcl::PointCloud one.
| [in] | structured_grid | the input VTK StructuredGrid object |
| [out] | cloud | the resultant pcl::PointCloud object |
Definition at line 152 of file vtk_lib_io.hpp.
1.7.6.1