Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
pcl::PLYWriter Class Reference

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

#include <pcl/io/ply_io.h>

Inheritance diagram for pcl::PLYWriter:
Inheritance graph
[legend]
Collaboration diagram for pcl::PLYWriter:
Collaboration graph
[legend]

Public Member Functions

 PLYWriter ()
 Constructor. More...
 
 ~PLYWriter ()
 Destructor. More...
 
std::string generateHeaderBinary (const sensor_msgs::PointCloud2 &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 sensor_msgs::PointCloud2 &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 sensor_msgs::PointCloud2 &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 sensor_msgs::PointCloud2 &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity())
 Save point cloud data to a PLY file containing n-D points, in BINARY format. More...
 
int write (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=false)
 Save point cloud data to a PLY file containing n-D points. More...
 
int write (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=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 sensor_msgs::PointCloud2::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...
 
int write (const std::string &file_name, const sensor_msgs::PointCloud2::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 456 of file ply_io.h.

Constructor & Destructor Documentation

pcl::PLYWriter::PLYWriter ( )
inline

Constructor.

Definition at line 460 of file ply_io.h.

pcl::PLYWriter::~PLYWriter ( )
inline

Destructor.

Definition at line 463 of file ply_io.h.

Member Function Documentation

std::string pcl::PLYWriter::generateHeaderASCII ( const sensor_msgs::PointCloud2 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]cloudthe point cloud data message
[in]originthe sensor data acquisition origin (translation)
[in]orientationthe sensor data acquisition origin (rotation)
[in]valid_pointsnumber of valid points (finite ones for range_grid and all of them for camer)
[in]use_cameraif set to true then PLY file will use element camera else element range_grid will be used.

Definition at line 494 of file ply_io.h.

std::string pcl::PLYWriter::generateHeaderBinary ( const sensor_msgs::PointCloud2 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]cloudthe point cloud data message
[in]originthe sensor data acquisition origin (translation)
[in]orientationthe sensor data acquisition origin (rotation)
[in]valid_pointsnumber of valid points (finite ones for range_grid and all of them for camer)
[in]use_cameraif set to true then PLY file will use element camera else element range_grid will be used.

Definition at line 475 of file ply_io.h.

int pcl::FileWriter::write ( const std::string &  file_name,
const sensor_msgs::PointCloud2::ConstPtr cloud,
const Eigen::Vector4f &  origin = Eigen::Vector4f::Zero (),
const Eigen::Quaternionf &  orientation = Eigen::Quaternionf::Identity (),
const bool  binary = false 
)
inlineinherited

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

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message (boost shared pointer)
[in]binaryset to true if the file is to be written in a binary FILE format, false (default) for ASCII
[in]originthe sensor acquisition origin
[in]orientationthe sensor acquisition orientation

Definition at line 192 of file file_io.h.

template<typename PointT >
int pcl::FileWriter::write ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud,
const bool  binary = false 
)
inlineinherited

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

Parameters
[in]file_namethe output file name
[in]cloudthe pcl::PointCloud data
[in]binaryset to true if the file is to be written in a binary FILE format, false (default) for ASCII

Definition at line 207 of file file_io.h.

int pcl::PLYWriter::write ( 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 = false 
)
inlinevirtual

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

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message
[in]originthe sensor acquisition origin
[in]orientationthe sensor acquisition orientation
[in]binaryset to true if the file is to be written in a binary PLY format, false (default) for ASCII

Implements pcl::FileWriter.

Definition at line 539 of file ply_io.h.

int pcl::PLYWriter::write ( 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 = false,
bool  use_camera = true 
)
inline

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

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message
[in]originthe sensor acquisition origin
[in]orientationthe sensor acquisition orientation
[in]binaryset to true if the file is to be written in a binary PLY format, false (default) for ASCII
[in]use_cameraset to true to used camera element and false to use range_grid element

Definition at line 561 of file ply_io.h.

int pcl::PLYWriter::write ( const std::string &  file_name,
const sensor_msgs::PointCloud2::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_namethe output file name
[in]cloudthe point cloud data message (boost shared pointer)
[in]originthe sensor acquisition origin
[in]orientationthe sensor acquisition orientation
[in]binaryset to true if the file is to be written in a binary PLY format, false (default) for ASCII
[in]use_cameraset to true to used camera element and false to use range_grid element

Definition at line 584 of file ply_io.h.

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_namethe output file name
[in]cloudthe pcl::PointCloud data
[in]binaryset to true if the file is to be written in a binary PLY format, false (default) for ASCII
[in]use_cameraset to true to used camera element and false to use range_grid element

Definition at line 602 of file ply_io.h.

int pcl::PLYWriter::writeASCII ( const std::string &  file_name,
const sensor_msgs::PointCloud2 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_namethe output file name
[in]cloudthe point cloud data message
[in]originthe sensor data acquisition origin (translation)
[in]orientationthe sensor data acquisition origin (rotation)
[in]precisionthe specified output numeric stream precision (default: 8)
[in]use_cameraif set to true then PLY file will use element camera else element range_grid will be used.
int pcl::PLYWriter::writeBinary ( const std::string &  file_name,
const sensor_msgs::PointCloud2 cloud,
const Eigen::Vector4f &  origin = Eigen::Vector4f::Zero(),
const Eigen::Quaternionf &  orientation = Eigen::Quaternionf::Identity() 
)

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

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message
[in]originthe sensor data acquisition origin (translation)
[in]orientationthe sensor data acquisition origin (rotation)

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