Point Cloud Library (PCL)
1.3.1
|
Point Cloud Data (PLY) file format reader. More...
#include <pcl/io/ply_io.h>
Public Types | |
enum | { PLY_V0 = 0, PLY_V1 = 1 } |
Public Member Functions | |
int | readHeader (const std::string &file_name, sensor_msgs::PointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &ply_version, int &data_type, int &data_idx) |
Various PLY file versions. | |
int | read (const std::string &file_name, sensor_msgs::PointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &ply_version) |
Read a point cloud data from a PLY file and store it into a sensor_msgs/PointCloud2. | |
int | read (const std::string &file_name, sensor_msgs::PointCloud2 &cloud) |
Read a point cloud data from a PLY file (PLY_V6 only!) and store it into a sensor_msgs/PointCloud2. | |
template<typename PointT > | |
int | read (const std::string &file_name, pcl::PointCloud< PointT > &cloud) |
Read a point cloud data from any PLY file, and convert it to the given template format. | |
template<typename Type > | |
void | copyStringValue (const std::string &st, sensor_msgs::PointCloud2 &cloud, unsigned int point_index, unsigned int field_idx, unsigned int fields_count) |
Copy one single value of type T (uchar, char, uint, int, float, double, ...) from a string. |
Point Cloud Data (PLY) file format reader.
void pcl::FileReader::copyStringValue | ( | const std::string & | st, |
sensor_msgs::PointCloud2 & | cloud, | ||
unsigned int | point_index, | ||
unsigned int | field_idx, | ||
unsigned int | fields_count | ||
) | [inline, inherited] |
Copy one single value of type T (uchar, char, uint, int, float, double, ...) from a string.
Uses aoti/atof to do the conversion. Checks if the st is "nan" and converts it accordingly.
st | the string containing the value to convert and copy |
cloud | the cloud to copy it to |
point_index | the index of the point |
field_idx | the index of the dimension/field |
fields_count | the current fields count |
int pcl::PLYReader::read | ( | const std::string & | file_name, |
sensor_msgs::PointCloud2 & | cloud, | ||
Eigen::Vector4f & | origin, | ||
Eigen::Quaternionf & | orientation, | ||
int & | ply_version | ||
) | [virtual] |
Read a point cloud data from a PLY file and store it into a sensor_msgs/PointCloud2.
file_name | the name of the file containing the actual PointCloud data |
cloud | the resultant PointCloud message read from disk |
Implements pcl::FileReader.
int pcl::PLYReader::read | ( | const std::string & | file_name, |
sensor_msgs::PointCloud2 & | cloud | ||
) | [inline] |
Read a point cloud data from a PLY file (PLY_V6 only!) and store it into a sensor_msgs/PointCloud2.
file_name | the name of the file containing the actual PointCloud data |
cloud | the resultant PointCloud message read from disk |
Reimplemented from pcl::FileReader.
int pcl::PLYReader::read | ( | const std::string & | file_name, |
pcl::PointCloud< PointT > & | cloud | ||
) | [inline] |
Read a point cloud data from any PLY file, and convert it to the given template format.
file_name | the name of the file containing the actual PointCloud data |
cloud | the resultant PointCloud message read from disk |
Reimplemented from pcl::FileReader.
int pcl::PLYReader::readHeader | ( | const std::string & | file_name, |
sensor_msgs::PointCloud2 & | cloud, | ||
Eigen::Vector4f & | origin, | ||
Eigen::Quaternionf & | orientation, | ||
int & | ply_version, | ||
int & | data_type, | ||
int & | data_idx | ||
) | [virtual] |
Various PLY file versions.
PLY represents PLY files with. The are organised this way:
Read a point cloud data header from a PLY file.
Load only the meta information (number of points, their types, etc), and not the points themselves, from a given PLY file. Useful for fast evaluation of the underlying data structure.
Returns: * < 0 (-1) on error * > 0 on success
file_name | the name of the file to load |
cloud | the resultant point cloud dataset (only the header will be filled) |
Implements pcl::FileReader.