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

Indexed Face set (IFS) file format reader. More...

#include <pcl/io/ifs_io.h>

Public Types

enum  { IFS_V1_0 = 0, IFS_V1_1 = 1 }
 we support two versions 1.0 classic 1.1 with texture coordinates addon More...
 

Public Member Functions

 IFSReader ()
 Empty constructor. More...
 
 ~IFSReader ()
 Empty destructor. More...
 
int readHeader (const std::string &file_name, pcl::PCLPointCloud2 &cloud, int &ifs_version, unsigned int &data_idx)
 Read a point cloud data header from an IFS file. More...
 
int read (const std::string &file_name, pcl::PCLPointCloud2 &cloud, int &ifs_version)
 Read a point cloud data from an IFS file and store it into a pcl/PCLPointCloud2. More...
 
int read (const std::string &file_name, pcl::PolygonMesh &mesh, int &ifs_version)
 Read a point cloud data from an IFS file and store it into a PolygonMesh. More...
 
template<typename PointT >
int read (const std::string &file_name, pcl::PointCloud< PointT > &cloud)
 Read a point cloud data from an IFS file, and convert it to the given template pcl::PointCloud format. More...
 

Detailed Description

Indexed Face set (IFS) file format reader.

This file format is used for the Brown Mesh Set for instance.

Author
Nizar Sallem

Definition at line 54 of file ifs_io.h.

Member Enumeration Documentation

anonymous enum

we support two versions 1.0 classic 1.1 with texture coordinates addon

Enumerator
IFS_V1_0 
IFS_V1_1 

Definition at line 66 of file ifs_io.h.

Constructor & Destructor Documentation

pcl::IFSReader::IFSReader ( )
inline

Empty constructor.

Definition at line 58 of file ifs_io.h.

pcl::IFSReader::~IFSReader ( )
inline

Empty destructor.

Definition at line 60 of file ifs_io.h.

Member Function Documentation

int pcl::IFSReader::read ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud,
int &  ifs_version 
)

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

Parameters
[in]file_namethe name of the file containing the actual PointCloud data
[out]cloudthe resultant PCLPointCloud2 blob read from disk
[out]ifs_versionthe IFS version of the file (either IFS_V1_0 or IFS_V1_1)
Returns
  • < 0 (-1) on error
  • == 0 on success

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

int pcl::IFSReader::read ( const std::string &  file_name,
pcl::PolygonMesh mesh,
int &  ifs_version 
)

Read a point cloud data from an IFS file and store it into a PolygonMesh.

Parameters
[in]file_namethe name of the file containing the mesh data
[out]meshthe resultant PolygonMesh
[out]ifs_versionthe IFS version of the file (either IFS_V1_0 or IFS_V1_1)
Returns
  • < 0 (-1) on error
  • == 0 on success
template<typename PointT >
int pcl::IFSReader::read ( const std::string &  file_name,
pcl::PointCloud< PointT > &  cloud 
)
inline

Read a point cloud data from an IFS file, and convert it to the given template pcl::PointCloud format.

Parameters
[in]file_namethe name of the file containing the actual PointCloud data
[out]cloudthe resultant PointCloud message read from disk
Returns
  • < 0 (-1) on error
  • == 0 on success

Definition at line 125 of file ifs_io.h.

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

int pcl::IFSReader::readHeader ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud,
int &  ifs_version,
unsigned int &  data_idx 
)

Read a point cloud data header from an IFS file.

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

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant point cloud dataset (only header will be filled)
[out]ifs_versionthe IFS version of the file (IFS_V1_0 or IFS_V1_1)
[out]data_idxthe offset of cloud data within the file
Returns
  • < 0 (-1) on error
  • == 0 on success

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