Point Cloud Library (PCL)  1.14.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 ()=default
 Empty constructor. More...
 
 ~IFSReader ()=default
 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 52 of file ifs_io.h.

Member Enumeration Documentation

◆ anonymous enum

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 64 of file ifs_io.h.

Constructor & Destructor Documentation

◆ IFSReader()

pcl::IFSReader::IFSReader ( )
default

Empty constructor.

◆ ~IFSReader()

pcl::IFSReader::~IFSReader ( )
default

Empty destructor.

Member Function Documentation

◆ read() [1/3]

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().

◆ read() [2/3]

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 123 of file ifs_io.h.

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

◆ read() [3/3]

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

◆ readHeader()

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: