point_cloud_library / 1.12.1 / classpcl_1_1_p_l_y_writer.html /

Point Cloud Data (PLY) file format writer. More...

#include <pcl/io/ply_io.h>

Public Member Functions

PLYWriter ()
Constructor. More...
~PLYWriter ()
Destructor. More...
std::string generateHeaderBinary (const pcl::PCLPointCloud2 &cloud, const Eigen::Vector4f &origin, const Eigen::Quaternionf &orientation, int valid_points, bool use_camera=true)
Generate the header of a PLY v.7 file format. More...
std::string generateHeaderASCII (const pcl::PCLPointCloud2 &cloud, const Eigen::Vector4f &origin, const Eigen::Quaternionf &orientation, int valid_points, bool use_camera=true)
Generate the header of a PLY v.7 file format. More...
int writeASCII (const std::string &file_name, const pcl::PCLPointCloud2 &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity(), int precision=8, bool use_camera=true)
Save point cloud data to a PLY file containing n-D points, in ASCII format. More...
int writeBinary (const std::string &file_name, const pcl::PCLPointCloud2 &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity(), bool use_camera=true)
Save point cloud data to a PLY file containing n-D points, in BINARY format. More...
int write (const std::string &file_name, const pcl::PCLPointCloud2 &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity(), const bool binary=false) override
Save point cloud data to a PLY file containing n-D points. More...
int write (const std::string &file_name, const pcl::PCLPointCloud2 &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity(), bool binary=false, bool use_camera=true)
Save point cloud data to a PLY file containing n-D points. More...
int write (const std::string &file_name, const pcl::PCLPointCloud2::ConstPtr &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity(), bool binary=false, bool use_camera=true)
Save point cloud data to a PLY file containing n-D points. More...
template<typename PointT >
int write (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, bool binary=false, bool use_camera=true)
Save point cloud data to a PLY file containing n-D points. More...
- Public Member Functions inherited from pcl::FileWriter
FileWriter ()
Empty constructor. More...
virtual ~FileWriter ()
Empty destructor. More...
int write (const std::string &file_name, const pcl::PCLPointCloud2::ConstPtr &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity(), const bool binary=false)
Save point cloud data to a FILE file containing n-D points. More...
template<typename PointT >
int write (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, const bool binary=false)
Save point cloud data to a FILE file containing n-D points. More...

Detailed Description

Point Cloud Data (PLY) file format writer.

Author
Nizar Sallem

Definition at line 546 of file ply_io.h.

Constructor & Destructor Documentation

PLYWriter()

pcl::PLYWriter::PLYWriter ( )
inline

Constructor.

Definition at line 550 of file ply_io.h.

~PLYWriter()

pcl::PLYWriter::~PLYWriter ( )
inline

Destructor.

Definition at line 553 of file ply_io.h.

Member Function Documentation

generateHeaderASCII()

std::string pcl::PLYWriter::generateHeaderASCII ( const pcl::PCLPointCloud2 & cloud,
const Eigen::Vector4f & origin,
const Eigen::Quaternionf & orientation,
int valid_points,
bool use_camera = true
)
inline

Generate the header of a PLY v.7 file format.

Parameters
[in] cloud the point cloud data message
[in] origin the sensor data acquisition origin (translation)
[in] orientation the sensor data acquisition origin (rotation)
[in] valid_points number of valid points (finite ones for range_grid and all of them for camer)
[in] use_camera if set to true then PLY file will use element camera else element range_grid will be used.

Definition at line 584 of file ply_io.h.

generateHeaderBinary()

std::string pcl::PLYWriter::generateHeaderBinary ( const pcl::PCLPointCloud2 & cloud,
const Eigen::Vector4f & origin,
const Eigen::Quaternionf & orientation,
int valid_points,
bool use_camera = true
)
inline

Generate the header of a PLY v.7 file format.

Parameters
[in] cloud the point cloud data message
[in] origin the sensor data acquisition origin (translation)
[in] orientation the sensor data acquisition origin (rotation)
[in] valid_points number of valid points (finite ones for range_grid and all of them for camer)
[in] use_camera if set to true then PLY file will use element camera else element range_grid will be used.

Definition at line 565 of file ply_io.h.

write() [1/4]

int pcl::PLYWriter::write ( const std::string & file_name,
const pcl::PCLPointCloud2 & cloud,
const Eigen::Vector4f & origin = Eigen::Vector4f::Zero (),
const Eigen::Quaternionf & orientation = Eigen::Quaternionf::Identity (),
bool binary = false,
bool use_camera = true
)
inline

Save point cloud data to a PLY file containing n-D points.

Parameters
[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 set to true if the file is to be written in a binary PLY format, false (default) for ASCII
[in] use_camera set to true to use camera element and false to use range_grid element

Definition at line 653 of file ply_io.h.

write() [2/4]

int pcl::PLYWriter::write ( const std::string & file_name,
const pcl::PCLPointCloud2 & cloud,
const Eigen::Vector4f & origin = Eigen::Vector4f::Zero (),
const Eigen::Quaternionf & orientation = Eigen::Quaternionf::Identity (),
const bool binary = false
)
inlineoverridevirtual

Save point cloud data to a PLY file containing n-D points.

Parameters
[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 set to true if the file is to be written in a binary PLY format, false (default) for ASCII

Implements pcl::FileWriter.

Definition at line 632 of file ply_io.h.

Referenced by pcl::io::savePLYFile(), pcl::io::savePLYFileASCII(), and pcl::io::savePLYFileBinary().

write() [3/4]

int pcl::PLYWriter::write ( const std::string & file_name,
const pcl::PCLPointCloud2::ConstPtr & cloud,
const Eigen::Vector4f & origin = Eigen::Vector4f::Zero (),
const Eigen::Quaternionf & orientation = Eigen::Quaternionf::Identity (),
bool binary = false,
bool use_camera = true
)
inline

Save point cloud data to a PLY file containing n-D points.

Parameters
[in] file_name the output file name
[in] cloud the point cloud data message (boost shared pointer)
[in] origin the sensor acquisition origin
[in] orientation the sensor acquisition orientation
[in] binary set to true if the file is to be written in a binary PLY format, false (default) for ASCII
[in] use_camera set to true to use camera element and false to use range_grid element

Definition at line 675 of file ply_io.h.

References pcl::write().

write() [4/4]

template<typename PointT >
int pcl::PLYWriter::write ( const std::string & file_name,
const pcl::PointCloud< PointT > & cloud,
bool binary = false,
bool use_camera = true
)
inline

Save point cloud data to a PLY file containing n-D points.

Parameters
[in] file_name the output file name
[in] cloud the pcl::PointCloud data
[in] binary set to true if the file is to be written in a binary PLY format, false (default) for ASCII
[in] use_camera set to true to use camera element and false to use range_grid element

Definition at line 693 of file ply_io.h.

References pcl::PointCloud< PointT >::sensor_orientation_, pcl::PointCloud< PointT >::sensor_origin_, pcl::toPCLPointCloud2(), and pcl::write().

writeASCII()

int pcl::PLYWriter::writeASCII ( const std::string & file_name,
const pcl::PCLPointCloud2 & cloud,
const Eigen::Vector4f & origin = Eigen::Vector4f::Zero(),
const Eigen::Quaternionf & orientation = Eigen::Quaternionf::Identity(),
int precision = 8,
bool use_camera = true
)

Save point cloud data to a PLY file containing n-D points, in ASCII format.

Parameters
[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] precision the specified output numeric stream precision (default: 8)
[in] use_camera if set to true then PLY file will use element camera else element range_grid will be used.

writeBinary()

int pcl::PLYWriter::writeBinary ( const std::string & file_name,
const pcl::PCLPointCloud2 & cloud,
const Eigen::Vector4f & origin = Eigen::Vector4f::Zero(),
const Eigen::Quaternionf & orientation = Eigen::Quaternionf::Identity(),
bool use_camera = true
)

Save point cloud data to a PLY file containing n-D points, in BINARY format.

Parameters
[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] use_camera if set to true then PLY file will use element camera else element range_grid will be used

The documentation for this class was generated from the following file:

© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1_p_l_y_writer.html