Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Member Functions
pcl::OBJReader Class Reference

#include <pcl/io/obj_io.h>

+ Inheritance diagram for pcl::OBJReader:
+ Collaboration diagram for pcl::OBJReader:

Public Member Functions

 OBJReader ()=default
 empty constructor More...
 
 ~OBJReader () override=default
 empty destructor More...
 
int readHeader (const std::string &file_name, pcl::PCLPointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &file_version, int &data_type, unsigned int &data_idx, const int offset) override
 Read a point cloud data header from a FILE file. More...
 
int read (const std::string &file_name, pcl::PCLPointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &file_version, const int offset=0) override
 Read a point cloud data from a FILE file and store it into a pcl/PCLPointCloud2. More...
 
int read (const std::string &file_name, pcl::PCLPointCloud2 &cloud, const int offset=0)
 Read a point cloud data from a FILE file and store it into a pcl/PCLPointCloud2. More...
 
int read (const std::string &file_name, pcl::TextureMesh &mesh, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &file_version, const int offset=0)
 Read a point cloud data from a FILE file and store it into a pcl/TextureMesh. More...
 
int read (const std::string &file_name, pcl::TextureMesh &mesh, const int offset=0)
 Read a point cloud data from a FILE file and store it into a pcl/TextureMesh. More...
 
int read (const std::string &file_name, pcl::PolygonMesh &mesh, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &file_version, const int offset=0)
 Read a point cloud data from a FILE file and store it into a pcl/PolygonMesh. More...
 
int read (const std::string &file_name, pcl::PolygonMesh &mesh, const int offset=0)
 Read a point cloud data from a FILE file and store it into a pcl/PolygonMesh. 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 FILE file, and convert it to the given template format. More...
 
- Public Member Functions inherited from pcl::FileReader
 FileReader ()=default
 empty constructor More...
 
virtual ~FileReader ()=default
 empty destructor More...
 
int read (const std::string &file_name, pcl::PCLPointCloud2 &cloud, const int offset=0)
 Read a point cloud data from a FILE file (FILE_V6 only!) and store it into a pcl/PCLPointCloud2. 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 FILE file, and convert it to the given template format. More...
 

Detailed Description

Definition at line 93 of file obj_io.h.

Constructor & Destructor Documentation

◆ OBJReader()

pcl::OBJReader::OBJReader ( )
default

empty constructor

◆ ~OBJReader()

pcl::OBJReader::~OBJReader ( )
overridedefault

empty destructor

Member Function Documentation

◆ read() [1/7]

int pcl::OBJReader::read ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud,
const int  offset = 0 
)

Read a point cloud data from a FILE file and store it into a pcl/PCLPointCloud2.

Parameters
[in]file_namethe name of the file containing the actual PointCloud data
[out]cloudthe resultant PointCloud message read from disk
[in]offsetthe 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).
Returns
0 on success.

◆ read() [2/7]

int pcl::OBJReader::read ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud,
Eigen::Vector4f &  origin,
Eigen::Quaternionf &  orientation,
int &  file_version,
const int  offset = 0 
)
overridevirtual

Read a point cloud data from a FILE file and store it into a pcl/PCLPointCloud2.

Parameters
[in]file_namethe name of the file containing the actual PointCloud data
[out]cloudthe resultant PointCloud message read from disk
[out]originthe sensor acquisition origin always null
[out]orientationthe sensor acquisition orientation always identity
[out]file_versionalways 0
[in]offsetthe 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).
Returns
0 on success.

Implements pcl::FileReader.

Referenced by pcl::io::loadOBJFile().

◆ read() [3/7]

template<typename PointT >
int pcl::OBJReader::read ( const std::string &  file_name,
pcl::PointCloud< PointT > &  cloud,
const int  offset = 0 
)
inline

Read a point cloud data from any FILE file, and convert it to the given template format.

Parameters
[in]file_namethe name of the file containing the actual PointCloud data
[out]cloudthe resultant PointCloud message read from disk
[in]offsetthe 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 232 of file obj_io.h.

References pcl::fromPCLPointCloud2(), pcl::read(), pcl::PointCloud< PointT >::sensor_orientation_, and pcl::PointCloud< PointT >::sensor_origin_.

◆ read() [4/7]

int pcl::OBJReader::read ( const std::string &  file_name,
pcl::PolygonMesh mesh,
const int  offset = 0 
)

Read a point cloud data from a FILE file and store it into a pcl/PolygonMesh.

Parameters
[in]file_namethe name of the file containing data
[out]meshthe resultant PolygonMesh read from disk
[in]offsetthe offset in the file where to expect the true header to begin.
Returns
0 on success.

◆ read() [5/7]

int pcl::OBJReader::read ( const std::string &  file_name,
pcl::PolygonMesh mesh,
Eigen::Vector4f &  origin,
Eigen::Quaternionf &  orientation,
int &  file_version,
const int  offset = 0 
)

Read a point cloud data from a FILE file and store it into a pcl/PolygonMesh.

Parameters
[in]file_namethe name of the file containing data
[out]meshthe resultant PolygonMesh read from disk
[out]originthe sensor origin always null
[out]orientationthe sensor orientation always identity
[out]file_versionalways 0
[in]offsetthe offset in the file where to expect the true header to begin.
Returns
0 on success.

◆ read() [6/7]

int pcl::OBJReader::read ( const std::string &  file_name,
pcl::TextureMesh mesh,
const int  offset = 0 
)

Read a point cloud data from a FILE file and store it into a pcl/TextureMesh.

Parameters
[in]file_namethe name of the file containing data
[out]meshthe resultant TextureMesh read from disk
[in]offsetthe offset in the file where to expect the true header to begin.
Returns
0 on success.

◆ read() [7/7]

int pcl::OBJReader::read ( const std::string &  file_name,
pcl::TextureMesh mesh,
Eigen::Vector4f &  origin,
Eigen::Quaternionf &  orientation,
int &  file_version,
const int  offset = 0 
)

Read a point cloud data from a FILE file and store it into a pcl/TextureMesh.

Parameters
[in]file_namethe name of the file containing data
[out]meshthe resultant TextureMesh read from disk
[out]originthe sensor origin always null
[out]orientationthe sensor orientation always identity
[out]file_versionalways 0
[in]offsetthe offset in the file where to expect the true header to begin.
Returns
0 on success.

◆ readHeader()

int pcl::OBJReader::readHeader ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud,
Eigen::Vector4f &  origin,
Eigen::Quaternionf &  orientation,
int &  file_version,
int &  data_type,
unsigned int &  data_idx,
const int  offset 
)
overridevirtual

Read a point cloud data header from a FILE file.

Load only the meta information (number of points, their types, etc), and not the points themselves, from a given FILE file. Useful for fast evaluation of the underlying data structure.

Parameters
[in]file_namethe name of the file containing the actual PointCloud data
[out]cloudthe resultant PointCloud message read from disk
[out]originthe sensor acquisition origin always null
[out]orientationthe sensor acquisition orientation always identity
[out]file_versionalways 0
data_type
data_idx
[in]offsetthe 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).
Returns
0 on success.

Implements pcl::FileReader.


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