Point Cloud Library (PCL)  1.3.1
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]

List of all members.

Public Member Functions

 PLYWriter ()
 ~PLYWriter ()
std::string generateHeaderBinary (const sensor_msgs::PointCloud2 &cloud)
 Generate the header of a PLY v.7 file format.
std::string generateHeaderASCII (const sensor_msgs::PointCloud2 &cloud)
 Generate the header of a PLY v.7 file format.
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)
 Save point cloud data to a PLY file containing n-D points, in ASCII format.
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.
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)
 Save point cloud data to a PLY file containing n-D points.
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)
 Save point cloud data to a PLY file containing n-D points.
template<typename PointT >
int write (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, bool binary=false)
 Save point cloud data to a PLY file containing n-D points.

Detailed Description

Point Cloud Data (PLY) file format writer.

Author:
Nizar Sallem

Constructor & Destructor Documentation

pcl::PLYWriter::PLYWriter ( ) [inline]

Definition at line 165 of file ply_io.h.

pcl::PLYWriter::~PLYWriter ( ) [inline]

Definition at line 166 of file ply_io.h.


Member Function Documentation

std::string pcl::PLYWriter::generateHeaderASCII ( const sensor_msgs::PointCloud2 cloud) [inline]

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

Parameters:
cloudthe point cloud data message

Definition at line 179 of file ply_io.h.

std::string pcl::PLYWriter::generateHeaderBinary ( const sensor_msgs::PointCloud2 cloud) [inline]

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

Parameters:
cloudthe point cloud data message

Definition at line 171 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 
) [inline, virtual]

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

Parameters:
file_namethe output file name
cloudthe point cloud data message
originthe sensor acquisition origin
orientationthe sensor acquisition orientation
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 211 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 
) [inline]

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

Parameters:
file_namethe output file name
cloudthe point cloud data message (boost shared pointer)
binaryset to true if the file is to be written in a binary PLY format, false (default) for ASCII

Reimplemented from pcl::FileWriter.

Definition at line 229 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 
) [inline]

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

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

Reimplemented from pcl::FileWriter.

Definition at line 244 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 
)

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

Parameters:
file_namethe output file name
cloudthe point cloud data message
precisionthe specified output numeric stream precision (default: 8)
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:
file_namethe output file name
cloudthe point cloud data message

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines