Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Member Functions
pcl::FileWriter Class Referenceabstract

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

#include <pcl/io/file_io.h>

+ Inheritance diagram for pcl::FileWriter:

Public Member Functions

 FileWriter ()=default
 Empty constructor. More...
 
virtual ~FileWriter ()=default
 Empty destructor. More...
 
virtual 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)=0
 Save point cloud data to a FILE 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(), 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 (FILE) file format writer.

Any (FILE) format file reader should implement its virtual methods

Author
Nizar Sallem

Definition at line 162 of file file_io.h.

Constructor & Destructor Documentation

◆ FileWriter()

pcl::FileWriter::FileWriter ( )
default

Empty constructor.

◆ ~FileWriter()

virtual pcl::FileWriter::~FileWriter ( )
virtualdefault

Empty destructor.

Member Function Documentation

◆ write() [1/3]

virtual int pcl::FileWriter::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 
)
pure virtual

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
[in]originthe sensor acquisition origin
[in]orientationthe sensor acquisition orientation
[in]binaryset to true if the file is to be written in a binary FILE format, false (default) for ASCII

Implemented in pcl::PLYWriter, and pcl::PCDWriter.

◆ write() [2/3]

int pcl::FileWriter::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 
)
inline

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 194 of file file_io.h.

References pcl::write().

◆ write() [3/3]

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

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 209 of file file_io.h.

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


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