Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Functions
pcl::io Namespace Reference

Namespaces

namespace  ply
 

Classes

struct  TARHeader
 A TAR file's header, as described on http://en.wikipedia.org/wiki/Tar_%28file_format%29. More...
 

Functions

template<std::size_t N>
void swapByte (char *bytes)
 swap bytes order of a char array of length N More...
 
template<>
void swapByte< 1 > (char *bytes)
 specialization of swapByte for dimension 1 More...
 
template<>
void swapByte< 2 > (char *bytes)
 specialization of swapByte for dimension 2 More...
 
template<>
void swapByte< 4 > (char *bytes)
 specialization of swapByte for dimension 4 More...
 
template<>
void swapByte< 8 > (char *bytes)
 specialization of swapByte for dimension 8 More...
 
template<typename T >
void swapByte (T &value)
 swaps byte of an arbitrary type T casting it to char* More...
 
PCL_EXPORTS int saveOBJFile (const std::string &file_name, const pcl::TextureMesh &tex_mesh, unsigned precision=5)
 Saves a TextureMesh in ascii OBJ format. More...
 
PCL_EXPORTS int saveOBJFile (const std::string &file_name, const pcl::PolygonMesh &mesh, unsigned precision=5)
 Saves a PolygonMesh in ascii PLY format. More...
 
int loadPCDFile (const std::string &file_name, sensor_msgs::PointCloud2 &cloud)
 Load a PCD v.6 file into a templated PointCloud type. More...
 
int loadPCDFile (const std::string &file_name, sensor_msgs::PointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation)
 Load any PCD file into a templated PointCloud type. More...
 
template<typename PointT >
int loadPCDFile (const std::string &file_name, pcl::PointCloud< PointT > &cloud)
 Load any PCD file into a templated PointCloud type. More...
 
int savePCDFile (const std::string &file_name, const sensor_msgs::PointCloud2 &cloud, const Eigen::Vector4f &origin=Eigen::Vector4f::Zero(), const Eigen::Quaternionf &orientation=Eigen::Quaternionf::Identity(), const bool binary_mode=false)
 Save point cloud data to a PCD file containing n-D points. More...
 
template<typename PointT >
int savePCDFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, bool binary_mode=false)
 Templated version for saving point cloud data to a PCD file containing a specific given cloud format. More...
 
template<typename PointT >
int savePCDFileASCII (const std::string &file_name, const pcl::PointCloud< PointT > &cloud)
 Templated version for saving point cloud data to a PCD file containing a specific given cloud format. More...
 
template<typename PointT >
int savePCDFileBinary (const std::string &file_name, const pcl::PointCloud< PointT > &cloud)
 Templated version for saving point cloud data to a PCD file containing a specific given cloud format. More...
 
template<typename PointT >
int savePCDFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, const std::vector< int > &indices, const bool binary_mode=false)
 Templated version for saving point cloud data to a PCD file containing a specific given cloud format. More...
 
int loadPLYFile (const std::string &file_name, sensor_msgs::PointCloud2 &cloud)
 Load a PLY v.6 file into a templated PointCloud type. More...
 
int loadPLYFile (const std::string &file_name, sensor_msgs::PointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation)
 Load any PLY file into a templated PointCloud type. More...
 
template<typename PointT >
int loadPLYFile (const std::string &file_name, pcl::PointCloud< PointT > &cloud)
 Load any PLY file into a templated PointCloud type. More...
 
int savePLYFile (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_mode=false, bool use_camera=true)
 Save point cloud data to a PLY file containing n-D points. More...
 
template<typename PointT >
int savePLYFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, bool binary_mode=false)
 Templated version for saving point cloud data to a PLY file containing a specific given cloud format. More...
 
template<typename PointT >
int savePLYFileASCII (const std::string &file_name, const pcl::PointCloud< PointT > &cloud)
 Templated version for saving point cloud data to a PLY file containing a specific given cloud format. More...
 
template<typename PointT >
int savePLYFileBinary (const std::string &file_name, const pcl::PointCloud< PointT > &cloud)
 Templated version for saving point cloud data to a PLY file containing a specific given cloud format. More...
 
template<typename PointT >
int savePLYFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, const std::vector< int > &indices, bool binary_mode=false)
 Templated version for saving point cloud data to a PLY file containing a specific given cloud format. More...
 
PCL_EXPORTS int savePLYFile (const std::string &file_name, const pcl::PolygonMesh &mesh, unsigned precision=5)
 Saves a PolygonMesh in ascii PLY format. More...
 
PCL_EXPORTS int saveVTKFile (const std::string &file_name, const pcl::PolygonMesh &triangles, unsigned precision=5)
 Saves a PolygonMesh in ascii VTK format. More...
 
PCL_EXPORTS int saveVTKFile (const std::string &file_name, const sensor_msgs::PointCloud2 &cloud, unsigned precision=5)
 Saves a PointCloud in ascii VTK format. More...
 
PCL_EXPORTS int vtk2mesh (const vtkSmartPointer< vtkPolyData > &poly_data, pcl::PolygonMesh &mesh)
 Convert vtkPolyData object to a PCL PolygonMesh. More...
 
PCL_EXPORTS int mesh2vtk (const pcl::PolygonMesh &mesh, vtkSmartPointer< vtkPolyData > &poly_data)
 Convert a PCL PolygonMesh to a vtkPolyData object. More...
 
PCL_EXPORTS int loadPolygonFile (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load a PolygonMesh object given an input file name, based on the file extension. More...
 
PCL_EXPORTS int savePolygonFile (const std::string &file_name, const pcl::PolygonMesh &mesh)
 Save a PolygonMesh object given an input file name, based on the file extension. More...
 
PCL_EXPORTS int loadPolygonFileVTK (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load a VTK file into a PolygonMesh object. More...
 
PCL_EXPORTS int loadPolygonFilePLY (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load a PLY file into a PolygonMesh object. More...
 
PCL_EXPORTS int loadPolygonFileOBJ (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load an OBJ file into a PolygonMesh object. More...
 
PCL_EXPORTS int loadPolygonFileSTL (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load an STL file into a PolygonMesh object. More...
 
PCL_EXPORTS int savePolygonFileVTK (const std::string &file_name, const pcl::PolygonMesh &mesh)
 Save a PolygonMesh object into a VTK file. More...
 
PCL_EXPORTS int savePolygonFilePLY (const std::string &file_name, const pcl::PolygonMesh &mesh)
 Save a PolygonMesh object into a PLY file. More...
 
PCL_EXPORTS int savePolygonFileSTL (const std::string &file_name, const pcl::PolygonMesh &mesh)
 Save a PolygonMesh object into an STL file. More...
 
PCL_EXPORTS void saveRangeImagePlanarFilePNG (const std::string &file_name, const pcl::RangeImagePlanar &range_image)
 Write a RangeImagePlanar object to a PNG file. More...
 
template<typename PointT >
void pointCloudTovtkPolyData (const pcl::PointCloud< PointT > &cloud, vtkPolyData *const polydata)
 Convert a pcl::PointCloud object to a VTK PolyData one. More...
 
template<typename PointT >
void pointCloudTovtkStructuredGrid (const pcl::PointCloud< PointT > &cloud, vtkStructuredGrid *const structured_grid)
 Convert a pcl::PointCloud object to a VTK StructuredGrid one. More...
 
template<typename PointT >
void vtkPolyDataToPointCloud (vtkPolyData *const polydata, pcl::PointCloud< PointT > &cloud)
 Convert a VTK PolyData object to a pcl::PointCloud one. More...
 
template<typename PointT >
void vtkStructuredGridToPointCloud (vtkStructuredGrid *const structured_grid, pcl::PointCloud< PointT > &cloud)
 Convert a VTK StructuredGrid object to a pcl::PointCloud one. More...
 

Function Documentation

PCL_EXPORTS int pcl::io::mesh2vtk ( const pcl::PolygonMesh mesh,
vtkSmartPointer< vtkPolyData > &  poly_data 
)

Convert a PCL PolygonMesh to a vtkPolyData object.

Parameters
[in]meshReference to PCL Polygon Mesh
[out]poly_dataPointer (vtkSmartPointer) to a vtkPolyData object
Returns
Number of points in the point cloud of mesh.
template<typename T >
void pcl::io::swapByte ( T &  value)

swaps byte of an arbitrary type T casting it to char*

Parameters
valuethe data you want its bytes swapped

Definition at line 451 of file io.h.

template<>
void pcl::io::swapByte< 1 > ( char *  bytes)
inline

specialization of swapByte for dimension 1

Parameters
byteschar array to swap

Definition at line 416 of file io.h.

template<>
void pcl::io::swapByte< 2 > ( char *  bytes)
inline

specialization of swapByte for dimension 2

Parameters
byteschar array to swap

Definition at line 423 of file io.h.

template<>
void pcl::io::swapByte< 4 > ( char *  bytes)
inline

specialization of swapByte for dimension 4

Parameters
byteschar array to swap

Definition at line 429 of file io.h.

template<>
void pcl::io::swapByte< 8 > ( char *  bytes)
inline

specialization of swapByte for dimension 8

Parameters
byteschar array to swap

Definition at line 439 of file io.h.

PCL_EXPORTS int pcl::io::vtk2mesh ( const vtkSmartPointer< vtkPolyData > &  poly_data,
pcl::PolygonMesh mesh 
)

Convert vtkPolyData object to a PCL PolygonMesh.

Parameters
[in]poly_dataPointer (vtkSmartPointer) to a vtkPolyData object
[out]meshPCL Polygon Mesh to fill
Returns
Number of points in the point cloud of mesh.