Point Cloud Data (PLY) file format reader.
More...
#include <pcl/io/ply_io.h>
|
| | PLYReader () |
| |
| | PLYReader (const PLYReader &p) |
| |
| PLYReader & | operator= (const PLYReader &p) |
| |
| | ~PLYReader () |
| |
| int | readHeader (const std::string &file_name, sensor_msgs::PointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &ply_version, int &data_type, unsigned int &data_idx, const int offset=0) |
| | Read a point cloud data header from a PLY file. More...
|
| |
| int | read (const std::string &file_name, sensor_msgs::PointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &ply_version, const int offset=0) |
| | Read a point cloud data from a PLY file and store it into a sensor_msgs/PointCloud2. More...
|
| |
| int | read (const std::string &file_name, sensor_msgs::PointCloud2 &cloud, const int offset=0) |
| | Read a point cloud data from a PLY file (PLY_V6 only!) and store it into a sensor_msgs/PointCloud2. More...
|
| |
| template<typename PointT > |
| int | read (const std::string &file_name, pcl::PointCloud< PointT > &cloud, const int offset=0) |
| | Read a point cloud data from any PLY file, and convert it to the given template format. More...
|
| |
Point Cloud Data (PLY) file format reader.
The PLY data format is organized in the following way: lines beginning with "comment" are treated as comments
- ply
- format [ascii|binary_little_endian|binary_big_endian] 1.0
- element vertex COUNT
- property float x
- property float y
- [property float z]
- [property float normal_x]
- [property float normal_y]
- [property float normal_z]
- [property uchar red]
- [property uchar green]
- [property uchar blue] ...
- ascii/binary point coordinates
- [element camera 1]
- [property float view_px] ...
- [element range_grid COUNT]
- [property list uchar int vertex_indices]
- end header
- Author
- Nizar Sallem
Definition at line 77 of file ply_io.h.
| pcl::PLYReader::PLYReader |
( |
) | |
|
|
inline |
| pcl::PLYReader::PLYReader |
( |
const PLYReader & |
p) | |
|
|
inline |
| pcl::PLYReader::~PLYReader |
( |
) | |
|
|
inline |
| int pcl::PLYReader::read |
( |
const std::string & |
file_name, |
|
|
sensor_msgs::PointCloud2 & |
cloud, |
|
|
Eigen::Vector4f & |
origin, |
|
|
Eigen::Quaternionf & |
orientation, |
|
|
int & |
ply_version, |
|
|
const int |
offset = 0 |
|
) |
| |
|
virtual |
Read a point cloud data from a PLY file and store it into a sensor_msgs/PointCloud2.
- Parameters
-
| [in] | file_name | the name of the file containing the actual PointCloud data |
| [out] | cloud | the resultant PointCloud message read from disk |
| [in] | origin | the sensor data acquisition origin (translation) |
| [in] | orientation | the sensor data acquisition origin (rotation) |
| [out] | ply_version | the PLY version read from the file |
| [in] | offset | the offset in the file where to expect the true header to begin. One usage example for setting the offset parameter is for reading data from a TAR "archive containing multiple files: TAR files always add a 512 byte header in front of the actual file, so set the offset to the next byte after the header (e.g., 513). |
Implements pcl::FileReader.
Read a point cloud data from a PLY file (PLY_V6 only!) and store it into a sensor_msgs/PointCloud2.
- Note
- This function is provided for backwards compatibility only and it can only read PLY_V6 files correctly, as sensor_msgs::PointCloud2 does not contain a sensor origin/orientation. Reading any file
PLY_V6 will generate a warning.
- Parameters
-
| [in] | file_name | the name of the file containing the actual PointCloud data |
| [out] | cloud | the resultant PointCloud message read from disk |
| [in] | offset | the offset in the file where to expect the true header to begin. One usage example for setting the offset parameter is for reading data from a TAR "archive containing multiple files: TAR files always add a 512 byte header in front of the actual file, so set the offset to the next byte after the header (e.g., 513). |
Definition at line 186 of file ply_io.h.
template<typename PointT >
| int pcl::PLYReader::read |
( |
const std::string & |
file_name, |
|
|
pcl::PointCloud< PointT > & |
cloud, |
|
|
const int |
offset = 0 |
|
) |
| |
|
inline |
Read a point cloud data from any PLY file, and convert it to the given template format.
- Parameters
-
| [in] | file_name | the name of the file containing the actual PointCloud data |
| [out] | cloud | the resultant PointCloud message read from disk |
| [in] | offset | the offset in the file where to expect the true header to begin. One usage example for setting the offset parameter is for reading data from a TAR "archive containing multiple files: TAR files always add a 512 byte header in front of the actual file, so set the offset to the next byte after the header (e.g., 513). |
Definition at line 204 of file ply_io.h.
| 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, |
|
|
unsigned int & |
data_idx, |
|
|
const int |
offset = 0 |
|
) |
| |
|
virtual |
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
- Parameters
-
| [in] | file_name | the name of the file to load |
| [out] | cloud | the resultant point cloud dataset (only the header will be filled) |
| [in] | origin | the sensor data acquisition origin (translation) |
| [in] | orientation | the sensor data acquisition origin (rotation) |
| [out] | ply_version | the PLY version read from the file |
| [out] | data_type | the type of PLY data stored in the file |
| [out] | data_idx | the data index |
| [in] | offset | the offset in the file where to expect the true header to begin. One usage example for setting the offset parameter is for reading data from a TAR "archive containing multiple files: TAR files always add a 512 byte header in front of the actual file, so set the offset to the next byte after the header (e.g., 513). |
Implements pcl::FileReader.
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/PCL-1.6.0-Source/io/include/pcl/io/ply_io.h