Point Cloud Library (PCL)  1.14.1-dev
Classes | Files | Functions
Module io

Detailed Description

Overview

The pcl_io library contains classes and functions for reading and writing files, as well as capturing point clouds from a variety of sensing devices. An introduction to some of these capabilities can be found in the following tutorials:

Reading from files
pcl::PointCloudpcl::PCLPointCloud2pcl::PolygonMeshpcl::TextureMesh
PCD (ASCII/BINARY/COMPRESSED)loadPCDFile loadPCDFile
PLY (ASCII/BINARY)loadPLYFile loadPLYFile loadPLYFile
OBJ (ASCII)loadOBJFile loadOBJFile loadOBJFile loadOBJFile
IFSloadIFSFile loadIFSFile loadIFSFile
STL (ASCII/BINARY)loadPolygonFileSTL
VTKloadPolygonFileVTK
CSV/ASCIIvia pcl::ASCIIReader
Automatic format detectionload load load load
Writing to files
pcl::PointCloudpcl::PCLPointCloud2pcl::PolygonMeshpcl::TextureMesh
PCD ASCIIsavePCDFile savePCDFile
PCD BINARYsavePCDFile savePCDFile
PCD COMPRESSEDsavePCDFileBinaryCompressed via pcl::PCDWriter
PLY ASCIIsavePLYFile savePLYFile savePLYFile
PLY BINARYsavePLYFile savePLYFile savePLYFileBinary
OBJ (ASCII)saveOBJFile saveOBJFile
IFSsaveIFSFile saveIFSFile
STL (ASCII/BINARY)savePolygonFileSTL
VTKsaveVTKFile saveVTKFile or savePolygonFileVTK
Automatic format detectionsave save save save

PCL is agnostic with respect to the data sources that are used to generate 3D point clouds. While OpenNI-compatible cameras have recently been at the center of attention in the 3D/robotics sensing community, many of the devices enumerated below have been used with PCL tools in the past:

Requirements

Classes

class  pcl::ASCIIReader
 Ascii Point Cloud Reader. More...
 
class  pcl::io::Buffer< T >
 An abstract base class for fixed-size data buffers. More...
 
class  pcl::DavidSDKGrabber
 Grabber for davidSDK structured light compliant devices. More...
 
class  pcl::io::DeBayer
 Various debayering methods. More...
 
class  pcl::DepthSenseGrabber
 Grabber for DepthSense devices (e.g. More...
 
class  pcl::DinastGrabber
 Grabber for DINAST devices (i.e., IPA-1002, IPA-1110, IPA-2001) More...
 
class  pcl::EnsensoGrabber
 Grabber for IDS-Imaging Ensenso's devices. More...
 
class  pcl::FileGrabber< PointT >
 FileGrabber provides a container-style interface for grabbers which operate on fixed-size input. More...
 
class  pcl::FileReader
 Point Cloud Data (FILE) file format reader interface. More...
 
class  pcl::FileWriter
 Point Cloud Data (FILE) file format writer. More...
 
class  pcl::Grabber
 Grabber interface for PCL 1.x device drivers. More...
 
class  pcl::HDLGrabber
 Grabber for the Velodyne High-Definition-Laser (HDL) More...
 
class  pcl::IFSReader
 Indexed Face set (IFS) file format reader. More...
 
class  pcl::IFSWriter
 Point Cloud Data (IFS) file format writer. More...
 
class  pcl::io::Image
 Image interface class providing an interface to fill a RGB or Grayscale image buffer. More...
 
class  pcl::ImageGrabberBase
 Base class for Image file grabber. More...
 
class  pcl::io::ImageRGB24
 This class provides methods to fill a RGB or Grayscale image buffer from underlying RGB24 image. More...
 
class  pcl::io::ImageYUV422
 Concrete implementation of the interface Image for a YUV 422 image used by Primesense devices. More...
 
class  pcl::io::LZFImageReader
 PCL-LZF image format reader. More...
 
class  pcl::io::LZFDepth16ImageReader
 PCL-LZF 16-bit depth image format reader. More...
 
class  pcl::io::LZFRGB24ImageReader
 PCL-LZF 24-bit RGB image format reader. More...
 
class  pcl::io::LZFYUV422ImageReader
 PCL-LZF 8-bit Bayer image format reader. More...
 
class  pcl::io::LZFBayer8ImageReader
 PCL-LZF 8-bit Bayer image format reader. More...
 
class  pcl::io::LZFImageWriter
 PCL-LZF image format writer. More...
 
class  pcl::io::LZFDepth16ImageWriter
 PCL-LZF 16-bit depth image format writer. More...
 
class  pcl::io::LZFRGB24ImageWriter
 PCL-LZF 24-bit RGB image format writer. More...
 
class  pcl::io::LZFYUV422ImageWriter
 PCL-LZF 16-bit YUV422 image format writer. More...
 
class  pcl::io::LZFBayer8ImageWriter
 PCL-LZF 8-bit Bayer image format writer. More...
 
class  pcl::ONIGrabber
 A simple ONI grabber. More...
 
class  openni_wrapper::OpenNIDevice
 Class representing an astract device for OpenNI devices: Primesense PSDK, Microsoft Kinect, Asus Xtion Pro/Live. More...
 
class  openni_wrapper::DeviceKinect
 Concrete implementation of the interface OpenNIDevice for a MS Kinect device. More...
 
class  openni_wrapper::DeviceONI
 Concrete implementation of the interface OpenNIDevice for a virtual device playing back an ONI file. More...
 
class  openni_wrapper::DevicePrimesense
 Concrete implementation of the interface OpenNIDevice for a Primesense device. More...
 
class  openni_wrapper::DeviceXtionPro
 Concrete implementation of the interface OpenNIDevice for a Asus Xtion Pro device. More...
 
class  openni_wrapper::OpenNIDriver
 Driver class implemented as Singleton. More...
 
class  openni_wrapper::OpenNIException
 General exception class. More...
 
class  openni_wrapper::Image
 Image class containing just a reference to image meta data. More...
 
class  openni_wrapper::ImageBayerGRBG
 This class provides methods to fill a RGB or Grayscale image buffer from underlying Bayer pattern image. More...
 
class  openni_wrapper::ImageRGB24
 This class provides methods to fill a RGB or Grayscale image buffer from underlying RGB24 image. More...
 
class  openni_wrapper::ImageYUV422
 Concrete implementation of the interface Image for a YUV 422 image used by Primesense devices. More...
 
class  pcl::OpenNIGrabber
 Grabber for OpenNI devices (i.e., Primesense PSDK, Microsoft Kinect, Asus XTion Pro/Live) More...
 
class  pcl::PCDGrabberBase
 Base class for PCD file grabber. More...
 
class  pcl::PCDReader
 Point Cloud Data (PCD) file format reader. More...
 
class  pcl::PCDWriter
 Point Cloud Data (PCD) file format writer. More...
 
class  pcl::PLYReader
 Point Cloud Data (PLY) file format reader. More...
 
class  pcl::PLYWriter
 Point Cloud Data (PLY) file format writer. More...
 
class  pcl::io::PointCloudImageExtractor< PointT >
 Base Image Extractor class for organized point clouds. More...
 
class  pcl::io::PointCloudImageExtractorWithScaling< PointT >
 Image Extractor extension which provides functionality to apply scaling to the values extracted from a field. More...
 
class  pcl::io::PointCloudImageExtractorFromNormalField< PointT >
 Image Extractor which uses the data present in the "normal" field. More...
 
class  pcl::io::PointCloudImageExtractorFromRGBField< PointT >
 Image Extractor which uses the data present in the "rgb" or "rgba" fields to produce a color image with rgb8 encoding. More...
 
class  pcl::io::PointCloudImageExtractorFromLabelField< PointT >
 Image Extractor which uses the data present in the "label" field to produce either monochrome or RGB image where different labels correspond to different colors. More...
 
class  pcl::io::PointCloudImageExtractorFromZField< PointT >
 Image Extractor which uses the data present in the "z" field to produce a depth map (as a monochrome image with mono16 encoding). More...
 
class  pcl::io::PointCloudImageExtractorFromCurvatureField< PointT >
 Image Extractor which uses the data present in the "curvature" field to produce a curvature map (as a monochrome image with mono16 encoding). More...
 
class  pcl::io::PointCloudImageExtractorFromIntensityField< PointT >
 Image Extractor which uses the data present in the "intensity" field to produce a monochrome intensity image (with mono16 encoding). More...
 
class  pcl::RealSense2Grabber
 Grabber for Intel Realsense 2 SDK devices (D400 series) More...
 
class  pcl::RobotEyeGrabber
 Grabber for the Ocular Robotics RobotEye sensor. More...
 
class  pcl::VLPGrabber
 Grabber for the Velodyne LiDAR (VLP), based on the Velodyne High Definition Laser (HDL) More...
 
class  pcl::StereoGrabberBase
 Base class for Stereo file grabber. More...
 

Files

file  byte_order.h
 defines byte shift operations and endianness.
 
file  io_operators.h
 defines output operators for int8 and uint8
 
file  ply.h
 contains standard typedefs and generic type traits
 

Functions

PCL_EXPORTS void pcl::io::encodeMonoImageToPNG (std::vector< std::uint8_t > &image_arg, std::size_t width_arg, std::size_t height_arg, std::vector< std::uint8_t > &pngData_arg, int png_level_arg=-1)
 Encodes 8-bit mono image to PNG format. More...
 
PCL_EXPORTS void pcl::io::encodeMonoImageToPNG (std::vector< std::uint16_t > &image_arg, std::size_t width_arg, std::size_t height_arg, std::vector< std::uint8_t > &pngData_arg, int png_level_arg=-1)
 Encodes 16-bit mono image to PNG format. More...
 
PCL_EXPORTS void pcl::io::encodeRGBImageToPNG (std::vector< std::uint8_t > &image_arg, std::size_t width_arg, std::size_t height_arg, std::vector< std::uint8_t > &pngData_arg, int png_level_arg=-1)
 Encodes 8-bit RGB image to PNG format. More...
 
PCL_EXPORTS void pcl::io::encodeRGBImageToPNG (std::vector< std::uint16_t > &image_arg, std::size_t width_arg, std::size_t height_arg, std::vector< std::uint8_t > &pngData_arg, int png_level_arg=-1)
 Encodes 16-bit RGB image to PNG format. More...
 
PCL_EXPORTS void pcl::io::decodePNGToImage (std::vector< std::uint8_t > &pngData_arg, std::vector< std::uint8_t > &imageData_arg, std::size_t &width_arg, std::size_t &heigh_argt, unsigned int &channels_arg)
 Decode compressed PNG to 8-bit image. More...
 
PCL_EXPORTS void pcl::io::decodePNGToImage (std::vector< std::uint8_t > &pngData_arg, std::vector< std::uint16_t > &imageData_arg, std::size_t &width_arg, std::size_t &height_arg, unsigned int &channels_arg)
 Decode compressed PNG to 16-bit image. More...
 
static void pcl::io::OrganizedConversion< PointT, false >::convert (const pcl::PointCloud< PointT > &cloud_arg, float focalLength_arg, float disparityShift_arg, float disparityScale_arg, bool, typename std::vector< std::uint16_t > &disparityData_arg, typename std::vector< std::uint8_t > &)
 Convert point cloud to disparity image. More...
 
static void pcl::io::OrganizedConversion< PointT, false >::convert (typename std::vector< std::uint16_t > &disparityData_arg, typename std::vector< std::uint8_t > &, bool, std::size_t width_arg, std::size_t height_arg, float focalLength_arg, float disparityShift_arg, float disparityScale_arg, pcl::PointCloud< PointT > &cloud_arg)
 Convert disparity image to point cloud. More...
 
static void pcl::io::OrganizedConversion< PointT, false >::convert (typename std::vector< float > &depthData_arg, typename std::vector< std::uint8_t > &, bool, std::size_t width_arg, std::size_t height_arg, float focalLength_arg, pcl::PointCloud< PointT > &cloud_arg)
 Convert disparity image to point cloud. More...
 
static void pcl::io::OrganizedConversion< PointT, true >::convert (const pcl::PointCloud< PointT > &cloud_arg, float focalLength_arg, float disparityShift_arg, float disparityScale_arg, bool convertToMono, typename std::vector< std::uint16_t > &disparityData_arg, typename std::vector< std::uint8_t > &rgbData_arg)
 Convert point cloud to disparity image and rgb image. More...
 
static void pcl::io::OrganizedConversion< PointT, true >::convert (typename std::vector< std::uint16_t > &disparityData_arg, typename std::vector< std::uint8_t > &rgbData_arg, bool monoImage_arg, std::size_t width_arg, std::size_t height_arg, float focalLength_arg, float disparityShift_arg, float disparityScale_arg, pcl::PointCloud< PointT > &cloud_arg)
 Convert disparity image to point cloud. More...
 
static void pcl::io::OrganizedConversion< PointT, true >::convert (typename std::vector< float > &depthData_arg, typename std::vector< std::uint8_t > &rgbData_arg, bool monoImage_arg, std::size_t width_arg, std::size_t height_arg, float focalLength_arg, pcl::PointCloud< PointT > &cloud_arg)
 Convert disparity image to point cloud. More...
 
PCL_EXPORTS int pcl::io::load (const std::string &file_name, pcl::PCLPointCloud2 &blob)
 Load a file into a PointCloud2 according to extension. More...
 
template<typename PointT >
int pcl::io::load (const std::string &file_name, pcl::PointCloud< PointT > &cloud)
 Load a file into a template PointCloud type according to extension. More...
 
PCL_EXPORTS int pcl::io::load (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load a file into a PolygonMesh according to extension. More...
 
PCL_EXPORTS int pcl::io::load (const std::string &file_name, pcl::TextureMesh &mesh)
 Load a file into a TextureMesh according to extension. More...
 
PCL_EXPORTS int pcl::io::save (const std::string &file_name, const pcl::PCLPointCloud2 &blob, unsigned precision=5)
 Save point cloud data to a binary file when available else to ASCII. More...
 
template<typename PointT >
int pcl::io::save (const std::string &file_name, const pcl::PointCloud< PointT > &cloud)
 Save point cloud to a binary file when available else to ASCII. More...
 
PCL_EXPORTS int pcl::io::save (const std::string &file_name, const pcl::TextureMesh &tex_mesh, unsigned precision=5)
 Saves a TextureMesh to a binary file when available else to ASCII. More...
 
PCL_EXPORTS int pcl::io::save (const std::string &file_name, const pcl::PolygonMesh &mesh, unsigned precision=5)
 Saves a PolygonMesh to a binary file when available else to ASCII. More...
 
int pcl::io::loadIFSFile (const std::string &file_name, pcl::PCLPointCloud2 &cloud)
 Load an IFS file into a PCLPointCloud2 blob type. More...
 
template<typename PointT >
int pcl::io::loadIFSFile (const std::string &file_name, pcl::PointCloud< PointT > &cloud)
 Load any IFS file into a templated PointCloud type. More...
 
int pcl::io::loadIFSFile (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load any IFS file into a PolygonMesh type. More...
 
int pcl::io::saveIFSFile (const std::string &file_name, const pcl::PCLPointCloud2 &cloud)
 Save point cloud data to an IFS file containing 3D points. More...
 
template<typename PointT >
int pcl::io::saveIFSFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud)
 Save point cloud data to an IFS file containing 3D points. More...
 
int pcl::io::loadOBJFile (const std::string &file_name, pcl::PCLPointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation)
 Load any OBJ file into a templated PointCloud type. More...
 
int pcl::io::loadOBJFile (const std::string &file_name, pcl::PCLPointCloud2 &cloud)
 Load an OBJ file into a PCLPointCloud2 blob type. More...
 
template<typename PointT >
int pcl::io::loadOBJFile (const std::string &file_name, pcl::PointCloud< PointT > &cloud)
 Load any OBJ file into a templated PointCloud type. More...
 
int pcl::io::loadOBJFile (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load any OBJ file into a PolygonMesh type. More...
 
int pcl::io::loadOBJFile (const std::string &file_name, pcl::TextureMesh &mesh)
 Load any OBJ file into a TextureMesh type. More...
 
PCL_EXPORTS int pcl::io::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 pcl::io::saveOBJFile (const std::string &file_name, const pcl::PolygonMesh &mesh, unsigned precision=5)
 Saves a PolygonMesh in ascii OBJ format. More...
 
int pcl::io::loadPCDFile (const std::string &file_name, pcl::PCLPointCloud2 &cloud)
 Load a PCD v.6 file into a templated PointCloud type. More...
 
int pcl::io::loadPCDFile (const std::string &file_name, pcl::PCLPointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation)
 Load any PCD file into a templated PointCloud type. More...
 
template<typename PointT >
int pcl::io::loadPCDFile (const std::string &file_name, pcl::PointCloud< PointT > &cloud)
 Load any PCD file into a templated PointCloud type. More...
 
int pcl::io::savePCDFile (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_mode=false)
 Save point cloud data to a PCD file containing n-D points. More...
 
template<typename PointT >
int pcl::io::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 pcl::io::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 pcl::io::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 pcl::io::savePCDFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, const pcl::Indices &indices, const 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 pcl::io::savePCDFileBinaryCompressed (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...
 
int pcl::io::loadPLYFile (const std::string &file_name, pcl::PCLPointCloud2 &cloud)
 Load a PLY v.6 file into a PCLPointCloud2 type. More...
 
int pcl::io::loadPLYFile (const std::string &file_name, pcl::PCLPointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation)
 Load any PLY file into a PCLPointCloud2 type. More...
 
template<typename PointT >
int pcl::io::loadPLYFile (const std::string &file_name, pcl::PointCloud< PointT > &cloud)
 Load any PLY file into a templated PointCloud type. More...
 
int pcl::io::loadPLYFile (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load a PLY file into a PolygonMesh type. More...
 
int pcl::io::savePLYFile (const std::string &file_name, const pcl::PCLPointCloud2 &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 pcl::io::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 pcl::io::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 pcl::io::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 pcl::io::savePLYFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, const pcl::Indices &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 pcl::io::savePLYFile (const std::string &file_name, const pcl::PolygonMesh &mesh, unsigned precision=5)
 Saves a PolygonMesh in ascii PLY format. More...
 
PCL_EXPORTS int pcl::io::savePLYFileBinary (const std::string &file_name, const pcl::PolygonMesh &mesh)
 Saves a PolygonMesh in binary PLY format. More...
 
PCL_EXPORTS void pcl::io::saveCharPNGFile (const std::string &file_name, const unsigned char *mono_image, int width, int height, int channels)
 Saves 8-bit encoded image to PNG file. More...
 
PCL_EXPORTS void pcl::io::saveShortPNGFile (const std::string &file_name, const unsigned short *short_image, int width, int height, int channels)
 Saves 16-bit encoded image to PNG file. More...
 
PCL_EXPORTS void pcl::io::saveRgbPNGFile (const std::string &file_name, const unsigned char *rgb_image, int width, int height)
 Saves 8-bit encoded RGB image to PNG file. More...
 
PCL_EXPORTS void pcl::io::savePNGFile (const std::string &file_name, const pcl::PointCloud< unsigned char > &cloud)
 Saves 8-bit grayscale cloud as image to PNG file. More...
 
PCL_EXPORTS void pcl::io::savePNGFile (const std::string &file_name, const pcl::PointCloud< unsigned short > &cloud)
 Saves 16-bit grayscale cloud as image to PNG file. More...
 
PCL_EXPORTS void pcl::io::savePNGFile (const std::string &file_name, const pcl::PCLImage &image)
 Saves a PCLImage (formerly ROS sensor_msgs::Image) to PNG file. More...
 
template<typename PointT >
void pcl::io::savePNGFile (const std::string &file_name, const pcl::PointCloud< PointT > &cloud, const std::string &field_name)
 Saves the data from the specified field of the point cloud as image to PNG file. More...
 
PCL_EXPORTS int pcl::io::saveVTKFile (const std::string &file_name, const pcl::PolygonMesh &triangles, unsigned precision=5)
 Saves a PolygonMesh in ascii VTK format. More...
 
PCL_EXPORTS int pcl::io::saveVTKFile (const std::string &file_name, const pcl::PCLPointCloud2 &cloud, unsigned precision=5)
 Saves a PointCloud in ascii VTK format. More...
 
PCL_EXPORTS int pcl::io::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 bool pcl::io::savePolygonFile (const std::string &file_name, const pcl::PolygonMesh &mesh, const bool binary_format=true)
 Save a PolygonMesh object given an input file name, based on the file extension. More...
 
PCL_EXPORTS int pcl::io::loadPolygonFileVTK (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load a VTK file into a PolygonMesh object. More...
 
PCL_EXPORTS int pcl::io::loadPolygonFilePLY (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load a PLY file into a PolygonMesh object. More...
 
PCL_EXPORTS int pcl::io::loadPolygonFileOBJ (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load an OBJ file into a PolygonMesh object. More...
 
PCL_EXPORTS int pcl::io::loadPolygonFileOBJ (const std::string &file_name, pcl::TextureMesh &mesh)
 Load an OBJ file into a TextureMesh object. More...
 
PCL_EXPORTS int pcl::io::loadPolygonFileSTL (const std::string &file_name, pcl::PolygonMesh &mesh)
 Load an STL file into a PolygonMesh object. More...
 
PCL_EXPORTS bool pcl::io::savePolygonFileVTK (const std::string &file_name, const pcl::PolygonMesh &mesh, const bool binary_format=true)
 Save a PolygonMesh object into a VTK file. More...
 
PCL_EXPORTS bool pcl::io::savePolygonFilePLY (const std::string &file_name, const pcl::PolygonMesh &mesh, const bool binary_format=true)
 Save a PolygonMesh object into a PLY file. More...
 
PCL_EXPORTS bool pcl::io::savePolygonFileSTL (const std::string &file_name, const pcl::PolygonMesh &mesh, const bool binary_format=true)
 Save a PolygonMesh object into an STL file. More...
 
PCL_EXPORTS void pcl::io::saveRangeImagePlanarFilePNG (const std::string &file_name, const pcl::RangeImagePlanar &range_image)
 Write a RangeImagePlanar object to a PNG file. More...
 
template<typename PointT >
void pcl::io::pointCloudTovtkPolyData (const pcl::PointCloud< PointT > &cloud, vtkPolyData *const polydata)
 Convert a pcl::PointCloud object to a VTK PolyData one. More...
 
PCL_EXPORTS void pcl::io::pointCloudTovtkPolyData (const pcl::PCLPointCloud2Ptr &cloud, vtkSmartPointer< vtkPolyData > &poly_data)
 Convert a PCLPointCloud2 object to a VTK PolyData object. More...
 
template<typename PointT >
void pcl::io::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 pcl::io::vtkPolyDataToPointCloud (vtkPolyData *const polydata, pcl::PointCloud< PointT > &cloud)
 Convert a VTK PolyData object to a pcl::PointCloud one. More...
 
template<typename PointT >
void pcl::io::vtkStructuredGridToPointCloud (vtkStructuredGrid *const structured_grid, pcl::PointCloud< PointT > &cloud)
 Convert a VTK StructuredGrid object to a pcl::PointCloud one. More...
 

Function Documentation

◆ convert() [1/6]

template<typename PointT >
static void pcl::io::OrganizedConversion< PointT, true >::convert ( const pcl::PointCloud< PointT > &  cloud_arg,
float  focalLength_arg,
float  disparityShift_arg,
float  disparityScale_arg,
bool  convertToMono,
typename std::vector< std::uint16_t > &  disparityData_arg,
typename std::vector< std::uint8_t > &  rgbData_arg 
)
inlinestatic

#include <pcl/compression/organized_pointcloud_conversion.h>

Convert point cloud to disparity image and rgb image.

Parameters
[in]cloud_arginput point cloud
[in]focalLength_argfocal length
[in]disparityShift_argdisparity shift
[in]disparityScale_argdisparity scaling
[in]convertToMonoconvert color to mono/grayscale
[out]disparityData_argoutput disparity image
[out]rgbData_argoutput rgb image

Definition at line 273 of file organized_pointcloud_conversion.h.

References pcl::isFinite(), pcl::PointCloud< PointT >::push_back(), and pcl::PointCloud< PointT >::size().

◆ convert() [2/6]

template<typename PointT >
static void pcl::io::OrganizedConversion< PointT, false >::convert ( const pcl::PointCloud< PointT > &  cloud_arg,
float  focalLength_arg,
float  disparityShift_arg,
float  disparityScale_arg,
bool  ,
typename std::vector< std::uint16_t > &  disparityData_arg,
typename std::vector< std::uint8_t > &   
)
inlinestatic

#include <pcl/compression/organized_pointcloud_conversion.h>

Convert point cloud to disparity image.

Parameters
[in]cloud_arginput point cloud
[in]focalLength_argfocal length
[in]disparityShift_argdisparity shift
[in]disparityScale_argdisparity scaling
[out]disparityData_argoutput disparity image

Definition at line 93 of file organized_pointcloud_conversion.h.

References pcl::isFinite(), pcl::PointCloud< PointT >::push_back(), and pcl::PointCloud< PointT >::size().

◆ convert() [3/6]

template<typename PointT >
static void pcl::io::OrganizedConversion< PointT, false >::convert ( typename std::vector< float > &  depthData_arg,
typename std::vector< std::uint8_t > &  ,
bool  ,
std::size_t  width_arg,
std::size_t  height_arg,
float  focalLength_arg,
pcl::PointCloud< PointT > &  cloud_arg 
)
inlinestatic

#include <pcl/compression/organized_pointcloud_conversion.h>

Convert disparity image to point cloud.

Parameters
[in]depthData_arginput depth image
[in]width_argwidth of disparity image
[in]height_argheight of disparity image
[in]focalLength_argfocal length
[out]cloud_argoutput point cloud

Definition at line 204 of file organized_pointcloud_conversion.h.

References pcl::PointCloud< PointT >::clear(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::push_back(), pcl::PointCloud< PointT >::reserve(), and pcl::PointCloud< PointT >::width.

◆ convert() [4/6]

template<typename PointT >
static void pcl::io::OrganizedConversion< PointT, true >::convert ( typename std::vector< float > &  depthData_arg,
typename std::vector< std::uint8_t > &  rgbData_arg,
bool  monoImage_arg,
std::size_t  width_arg,
std::size_t  height_arg,
float  focalLength_arg,
pcl::PointCloud< PointT > &  cloud_arg 
)
inlinestatic

#include <pcl/compression/organized_pointcloud_conversion.h>

Convert disparity image to point cloud.

Parameters
[in]depthData_argoutput disparity image
[in]rgbData_argoutput rgb image
[in]monoImage_arginput image is a single-channel mono image
[in]width_argwidth of disparity image
[in]height_argheight of disparity image
[in]focalLength_argfocal length
[out]cloud_argoutput point cloud

Definition at line 460 of file organized_pointcloud_conversion.h.

References pcl::PointCloud< PointT >::clear(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::push_back(), pcl::PointCloud< PointT >::reserve(), and pcl::PointCloud< PointT >::width.

◆ convert() [5/6]

template<typename PointT >
static void pcl::io::OrganizedConversion< PointT, false >::convert ( typename std::vector< std::uint16_t > &  disparityData_arg,
typename std::vector< std::uint8_t > &  ,
bool  ,
std::size_t  width_arg,
std::size_t  height_arg,
float  focalLength_arg,
float  disparityShift_arg,
float  disparityScale_arg,
pcl::PointCloud< PointT > &  cloud_arg 
)
inlinestatic

#include <pcl/compression/organized_pointcloud_conversion.h>

Convert disparity image to point cloud.

Parameters
[in]disparityData_arginput depth image
[in]width_argwidth of disparity image
[in]height_argheight of disparity image
[in]focalLength_argfocal length
[in]disparityShift_argdisparity shift
[in]disparityScale_argdisparity scaling
[out]cloud_argoutput point cloud

Definition at line 137 of file organized_pointcloud_conversion.h.

References pcl::PointCloud< PointT >::clear(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::push_back(), pcl::PointCloud< PointT >::reserve(), and pcl::PointCloud< PointT >::width.

◆ convert() [6/6]

template<typename PointT >
static void pcl::io::OrganizedConversion< PointT, true >::convert ( typename std::vector< std::uint16_t > &  disparityData_arg,
typename std::vector< std::uint8_t > &  rgbData_arg,
bool  monoImage_arg,
std::size_t  width_arg,
std::size_t  height_arg,
float  focalLength_arg,
float  disparityShift_arg,
float  disparityScale_arg,
pcl::PointCloud< PointT > &  cloud_arg 
)
inlinestatic

#include <pcl/compression/organized_pointcloud_conversion.h>

Convert disparity image to point cloud.

Parameters
[in]disparityData_argoutput disparity image
[in]rgbData_argoutput rgb image
[in]monoImage_arginput image is a single-channel mono image
[in]width_argwidth of disparity image
[in]height_argheight of disparity image
[in]focalLength_argfocal length
[in]disparityShift_argdisparity shift
[in]disparityScale_argdisparity scaling
[out]cloud_argoutput point cloud

Definition at line 356 of file organized_pointcloud_conversion.h.

References pcl::PointCloud< PointT >::clear(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::push_back(), pcl::PointCloud< PointT >::reserve(), and pcl::PointCloud< PointT >::width.

◆ decodePNGToImage() [1/2]

PCL_EXPORTS void pcl::io::decodePNGToImage ( std::vector< std::uint8_t > &  pngData_arg,
std::vector< std::uint16_t > &  imageData_arg,
std::size_t &  width_arg,
std::size_t &  height_arg,
unsigned int &  channels_arg 
)

#include <pcl/compression/libpng_wrapper.h>

Decode compressed PNG to 16-bit image.

Parameters
[in]pngData_argPNG compressed input data
[in]imageData_argimage output data
[out]width_argimage width
[out]height_argimage height
[out]channels_argnumber of channels

◆ decodePNGToImage() [2/2]

PCL_EXPORTS void pcl::io::decodePNGToImage ( std::vector< std::uint8_t > &  pngData_arg,
std::vector< std::uint8_t > &  imageData_arg,
std::size_t &  width_arg,
std::size_t &  heigh_argt,
unsigned int &  channels_arg 
)

#include <pcl/compression/libpng_wrapper.h>

Decode compressed PNG to 8-bit image.

Parameters
[in]pngData_argPNG compressed input data
[in]imageData_argimage output data
[out]width_argimage width
[out]heigh_argtimage height
[out]channels_argnumber of channels

Referenced by pcl::io::OrganizedPointCloudCompression< PointT >::decodePointCloud().

◆ encodeMonoImageToPNG() [1/2]

PCL_EXPORTS void pcl::io::encodeMonoImageToPNG ( std::vector< std::uint16_t > &  image_arg,
std::size_t  width_arg,
std::size_t  height_arg,
std::vector< std::uint8_t > &  pngData_arg,
int  png_level_arg = -1 
)

#include <pcl/compression/libpng_wrapper.h>

Encodes 16-bit mono image to PNG format.

Parameters
[in]image_arginput image data
[in]width_argimage width
[in]height_argimage height
[out]pngData_argPNG compressed image data
[in]png_level_argzLib compression level (default level: -1)

◆ encodeMonoImageToPNG() [2/2]

PCL_EXPORTS void pcl::io::encodeMonoImageToPNG ( std::vector< std::uint8_t > &  image_arg,
std::size_t  width_arg,
std::size_t  height_arg,
std::vector< std::uint8_t > &  pngData_arg,
int  png_level_arg = -1 
)

#include <pcl/compression/libpng_wrapper.h>

Encodes 8-bit mono image to PNG format.

Parameters
[in]image_arginput image data
[in]width_argimage width
[in]height_argimage height
[out]pngData_argPNG compressed image data
[in]png_level_argzLib compression level (default level: -1)

Referenced by pcl::io::OrganizedPointCloudCompression< PointT >::encodePointCloud(), and pcl::io::OrganizedPointCloudCompression< PointT >::encodeRawDisparityMapWithColorImage().

◆ encodeRGBImageToPNG() [1/2]

PCL_EXPORTS void pcl::io::encodeRGBImageToPNG ( std::vector< std::uint16_t > &  image_arg,
std::size_t  width_arg,
std::size_t  height_arg,
std::vector< std::uint8_t > &  pngData_arg,
int  png_level_arg = -1 
)

#include <pcl/compression/libpng_wrapper.h>

Encodes 16-bit RGB image to PNG format.

Parameters
[in]image_arginput image data
[in]width_argimage width
[in]height_argimage height
[out]pngData_argPNG compressed image data
[in]png_level_argzLib compression level (default level: -1)

◆ encodeRGBImageToPNG() [2/2]

PCL_EXPORTS void pcl::io::encodeRGBImageToPNG ( std::vector< std::uint8_t > &  image_arg,
std::size_t  width_arg,
std::size_t  height_arg,
std::vector< std::uint8_t > &  pngData_arg,
int  png_level_arg = -1 
)

#include <pcl/compression/libpng_wrapper.h>

Encodes 8-bit RGB image to PNG format.

Parameters
[in]image_arginput image data
[in]width_argimage width
[in]height_argimage height
[out]pngData_argPNG compressed image data
[in]png_level_argzLib compression level (default level: -1)

Referenced by pcl::io::OrganizedPointCloudCompression< PointT >::encodePointCloud(), and pcl::io::OrganizedPointCloudCompression< PointT >::encodeRawDisparityMapWithColorImage().

◆ load() [1/4]

PCL_EXPORTS int pcl::io::load ( const std::string &  file_name,
pcl::PCLPointCloud2 blob 
)

#include <pcl/io/auto_io.h>

Load a file into a PointCloud2 according to extension.

Parameters
[in]file_namethe name of the file to load
[out]blobthe resultant pcl::PointCloud2 blob

◆ load() [2/4]

template<typename PointT >
int pcl::io::load ( const std::string &  file_name,
pcl::PointCloud< PointT > &  cloud 
)

#include <pcl/io/auto_io.h>

Load a file into a template PointCloud type according to extension.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud

Definition at line 55 of file auto_io.hpp.

References pcl::io::loadIFSFile(), pcl::io::loadOBJFile(), pcl::io::loadPCDFile(), and pcl::io::loadPLYFile().

◆ load() [3/4]

PCL_EXPORTS int pcl::io::load ( const std::string &  file_name,
pcl::PolygonMesh mesh 
)

#include <pcl/io/auto_io.h>

Load a file into a PolygonMesh according to extension.

Parameters
[in]file_namethe name of the file to load
[out]meshthe resultant pcl::PolygonMesh

◆ load() [4/4]

PCL_EXPORTS int pcl::io::load ( const std::string &  file_name,
pcl::TextureMesh mesh 
)

#include <pcl/io/auto_io.h>

Load a file into a TextureMesh according to extension.

Parameters
[in]file_namethe name of the file to load
[out]meshthe resultant pcl::TextureMesh

◆ loadIFSFile() [1/3]

int pcl::io::loadIFSFile ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud 
)
inline

#include <pcl/io/ifs_io.h>

Load an IFS file into a PCLPointCloud2 blob type.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud
Returns
0 on success < 0 on error

Definition at line 190 of file ifs_io.h.

References pcl::IFSReader::read().

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

◆ loadIFSFile() [2/3]

template<typename PointT >
int pcl::io::loadIFSFile ( const std::string &  file_name,
pcl::PointCloud< PointT > &  cloud 
)
inline

#include <pcl/io/ifs_io.h>

Load any IFS file into a templated PointCloud type.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud
Returns
0 on success < 0 on error

Definition at line 205 of file ifs_io.h.

References pcl::IFSReader::read().

◆ loadIFSFile() [3/3]

int pcl::io::loadIFSFile ( const std::string &  file_name,
pcl::PolygonMesh mesh 
)
inline

#include <pcl/io/ifs_io.h>

Load any IFS file into a PolygonMesh type.

Parameters
[in]file_namethe name of the file to load
[out]meshthe resultant mesh
Returns
0 on success < 0 on error

Definition at line 219 of file ifs_io.h.

References pcl::IFSReader::read().

◆ loadOBJFile() [1/5]

int pcl::io::loadOBJFile ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud 
)
inline

#include <pcl/io/obj_io.h>

Load an OBJ file into a PCLPointCloud2 blob type.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud
Returns
0 on success < 0 on error

Definition at line 277 of file obj_io.h.

References pcl::OBJReader::read().

◆ loadOBJFile() [2/5]

int pcl::io::loadOBJFile ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud,
Eigen::Vector4f &  origin,
Eigen::Quaternionf &  orientation 
)
inline

#include <pcl/io/obj_io.h>

Load any OBJ file into a templated PointCloud type.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud
[out]originthe sensor acquisition origin, null
[out]orientationthe sensor acquisition orientation, identity

Definition at line 261 of file obj_io.h.

References pcl::OBJReader::read().

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

◆ loadOBJFile() [3/5]

template<typename PointT >
int pcl::io::loadOBJFile ( const std::string &  file_name,
pcl::PointCloud< PointT > &  cloud 
)
inline

#include <pcl/io/obj_io.h>

Load any OBJ file into a templated PointCloud type.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud

Definition at line 289 of file obj_io.h.

References pcl::OBJReader::read().

◆ loadOBJFile() [4/5]

int pcl::io::loadOBJFile ( const std::string &  file_name,
pcl::PolygonMesh mesh 
)
inline

#include <pcl/io/obj_io.h>

Load any OBJ file into a PolygonMesh type.

Parameters
[in]file_namethe name of the file to load
[out]meshthe resultant mesh
Returns
0 on success < 0 on error

Definition at line 303 of file obj_io.h.

References pcl::OBJReader::read().

◆ loadOBJFile() [5/5]

int pcl::io::loadOBJFile ( const std::string &  file_name,
pcl::TextureMesh mesh 
)
inline

#include <pcl/io/obj_io.h>

Load any OBJ file into a TextureMesh type.

Parameters
[in]file_namethe name of the file to load
[out]meshthe resultant mesh
Returns
0 on success < 0 on error

Definition at line 317 of file obj_io.h.

References pcl::OBJReader::read().

◆ loadPCDFile() [1/3]

int pcl::io::loadPCDFile ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud 
)
inline

#include <pcl/io/pcd_io.h>

Load a PCD v.6 file into a templated PointCloud type.

Any PCD files > v.6 will generate a warning as a pcl/PCLPointCloud2 message cannot hold the sensor origin.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud

Definition at line 633 of file pcd_io.h.

References pcl::PCDReader::read().

Referenced by pcl::io::load(), ObjectRecognition::populateDatabase(), and pcl::outofcore::OutofcoreOctreeDiskContainer< PointT >::read().

◆ loadPCDFile() [2/3]

int pcl::io::loadPCDFile ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud,
Eigen::Vector4f &  origin,
Eigen::Quaternionf &  orientation 
)
inline

#include <pcl/io/pcd_io.h>

Load any PCD file into a templated PointCloud type.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud
[out]originthe sensor acquisition origin (only for > PCD_V7 - null if not present)
[out]orientationthe sensor acquisition orientation (only for > PCD_V7 - identity if not present)

Definition at line 648 of file pcd_io.h.

References pcl::PCDReader::read().

◆ loadPCDFile() [3/3]

template<typename PointT >
int pcl::io::loadPCDFile ( const std::string &  file_name,
pcl::PointCloud< PointT > &  cloud 
)
inline

#include <pcl/io/pcd_io.h>

Load any PCD file into a templated PointCloud type.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud

Definition at line 662 of file pcd_io.h.

References pcl::PCDReader::read().

◆ loadPLYFile() [1/4]

int pcl::io::loadPLYFile ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud 
)
inline

#include <pcl/io/ply_io.h>

Load a PLY v.6 file into a PCLPointCloud2 type.

Any PLY files containing sensor data will generate a warning as a pcl/PCLPointCloud2 message cannot hold the sensor origin.

Parameters
[in]file_namethe name of the file to load
[in]cloudthe resultant templated point cloud

Definition at line 745 of file ply_io.h.

References pcl::PLYReader::read().

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

◆ loadPLYFile() [2/4]

int pcl::io::loadPLYFile ( const std::string &  file_name,
pcl::PCLPointCloud2 cloud,
Eigen::Vector4f &  origin,
Eigen::Quaternionf &  orientation 
)
inline

#include <pcl/io/ply_io.h>

Load any PLY file into a PCLPointCloud2 type.

Parameters
[in]file_namethe name of the file to load
[out]cloudthe resultant templated point cloud
[out]originthe sensor acquisition origin (only for > PLY_V7 - null if not present)
[out]orientationthe sensor acquisition orientation if available, identity if not present

Definition at line 760 of file ply_io.h.

References pcl::PLYReader::read().

◆ loadPLYFile() [3/4]

template<typename PointT >
int pcl::io::loadPLYFile ( const std::string &  file_name,
pcl::PointCloud< PointT > &  cloud 
)
inline

#include <pcl/io/ply_io.h>

Load any PLY file into a templated PointCloud type.

Parameters
[in]file_namethe name of the file to load
[in]cloudthe resultant templated point cloud

Definition at line 774 of file ply_io.h.

References pcl::PLYReader::read().

◆ loadPLYFile() [4/4]

int pcl::io::loadPLYFile ( const std::string &  file_name,
pcl::PolygonMesh mesh 
)
inline

#include <pcl/io/ply_io.h>

Load a PLY file into a PolygonMesh type.

Any PLY files containing sensor data will generate a warning as a pcl/PolygonMesh message cannot hold the sensor origin.

Parameters
[in]file_namethe name of the file to load
[in]meshthe resultant polygon mesh

Definition at line 790 of file ply_io.h.

References pcl::PLYReader::read().

◆ loadPolygonFile()

PCL_EXPORTS int pcl::io::loadPolygonFile ( const std::string &  file_name,
pcl::PolygonMesh mesh 
)

#include <pcl/io/vtk_lib_io.h>

Load a PolygonMesh object given an input file name, based on the file extension.

Parameters
[in]file_namethe name of the file containing the polygon data
[out]meshthe object that we want to load the data in
Returns
Number of points in the point cloud of the mesh.

◆ loadPolygonFileOBJ() [1/2]

PCL_EXPORTS int pcl::io::loadPolygonFileOBJ ( const std::string &  file_name,
pcl::PolygonMesh mesh 
)

#include <pcl/io/vtk_lib_io.h>

Load an OBJ file into a PolygonMesh object.

Parameters
[in]file_namethe name of the file that contains the data
[out]meshthe object that we want to load the data in
Returns
Number of points in the point cloud of the mesh.

◆ loadPolygonFileOBJ() [2/2]

PCL_EXPORTS int pcl::io::loadPolygonFileOBJ ( const std::string &  file_name,
pcl::TextureMesh mesh 
)

#include <pcl/io/vtk_lib_io.h>

Load an OBJ file into a TextureMesh object.

Note
In addition to the loadPolygonFileOBJ (const std::string, pcl::PolygonMesh&) method, this method also loads the uv-coordinates from the file. It does not load the material information.
Parameters
[in]file_namethe name of the file that contains the data
[out]meshthe object that we want to load the data in
Returns
Number of points in the point cloud of the mesh.

◆ loadPolygonFilePLY()

PCL_EXPORTS int pcl::io::loadPolygonFilePLY ( const std::string &  file_name,
pcl::PolygonMesh mesh 
)

#include <pcl/io/vtk_lib_io.h>

Load a PLY file into a PolygonMesh object.

Parameters
[in]file_namethe name of the file that contains the data
[out]meshthe object that we want to load the data in
Returns
Number of points in the point cloud of the mesh.

◆ loadPolygonFileSTL()

PCL_EXPORTS int pcl::io::loadPolygonFileSTL ( const std::string &  file_name,
pcl::PolygonMesh mesh 
)

#include <pcl/io/vtk_lib_io.h>

Load an STL file into a PolygonMesh object.

Parameters
[in]file_namethe name of the file that contains the data
[out]meshthe object that we want to load the data in
Returns
Number of points in the point cloud of the mesh.

◆ loadPolygonFileVTK()

PCL_EXPORTS int pcl::io::loadPolygonFileVTK ( const std::string &  file_name,
pcl::PolygonMesh mesh 
)

#include <pcl/io/vtk_lib_io.h>

Load a VTK file into a PolygonMesh object.

Parameters
[in]file_namethe name of the file that contains the data
[out]meshthe object that we want to load the data in
Returns
Number of points in the point cloud of the mesh.

◆ pointCloudTovtkPolyData() [1/2]

PCL_EXPORTS void pcl::io::pointCloudTovtkPolyData ( const pcl::PCLPointCloud2Ptr cloud,
vtkSmartPointer< vtkPolyData > &  poly_data 
)

#include <pcl/io/vtk_lib_io.h>

Convert a PCLPointCloud2 object to a VTK PolyData object.

Parameters
[in]cloudthe input PCLPointCloud2Ptr object
[out]poly_datathe resultant VTK PolyData object

◆ pointCloudTovtkPolyData() [2/2]

template<typename PointT >
void pcl::io::pointCloudTovtkPolyData ( const pcl::PointCloud< PointT > &  cloud,
vtkPolyData *const  polydata 
)

#include <pcl/io/vtk_lib_io.h>

Convert a pcl::PointCloud object to a VTK PolyData one.

Parameters
[in]cloudthe input pcl::PointCloud object
[out]polydatathe resultant VTK PolyData object

Definition at line 286 of file vtk_lib_io.hpp.

References pcl::PointCloud< PointT >::is_dense, and pcl::PointCloud< PointT >::size().

◆ pointCloudTovtkStructuredGrid()

template<typename PointT >
void pcl::io::pointCloudTovtkStructuredGrid ( const pcl::PointCloud< PointT > &  cloud,
vtkStructuredGrid *const  structured_grid 
)

#include <pcl/io/vtk_lib_io.h>

Convert a pcl::PointCloud object to a VTK StructuredGrid one.

Parameters
[in]cloudthe input pcl::PointCloud object
[out]structured_gridthe resultant VTK StructuredGrid object

Definition at line 394 of file vtk_lib_io.hpp.

References pcl::PointCloud< PointT >::height, pcl::isFinite(), and pcl::PointCloud< PointT >::width.

◆ save() [1/4]

PCL_EXPORTS int pcl::io::save ( const std::string &  file_name,
const pcl::PCLPointCloud2 blob,
unsigned  precision = 5 
)

#include <pcl/io/auto_io.h>

Save point cloud data to a binary file when available else to ASCII.

Parameters
[in]file_namethe output file name
[in]blobthe point cloud data message
[in]precisionfloat precision when saving to ASCII files

Referenced by pcl::RSDEstimation< PointInT, PointNT, PointOutT >::setSaveHistograms().

◆ save() [2/4]

template<typename PointT >
int pcl::io::save ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud 
)

#include <pcl/io/auto_io.h>

Save point cloud to a binary file when available else to ASCII.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud

Definition at line 77 of file auto_io.hpp.

References pcl::io::saveIFSFile(), pcl::io::savePCDFile(), and pcl::io::savePLYFile().

◆ save() [3/4]

PCL_EXPORTS int pcl::io::save ( const std::string &  file_name,
const pcl::PolygonMesh mesh,
unsigned  precision = 5 
)

#include <pcl/io/auto_io.h>

Saves a PolygonMesh to a binary file when available else to ASCII.

Parameters
[in]file_namethe name of the file to write to disk
[in]meshthe polygonal mesh to save
[in]precisionfloat precision when saving to ASCII files

◆ save() [4/4]

PCL_EXPORTS int pcl::io::save ( const std::string &  file_name,
const pcl::TextureMesh tex_mesh,
unsigned  precision = 5 
)

#include <pcl/io/auto_io.h>

Saves a TextureMesh to a binary file when available else to ASCII.

Parameters
[in]file_namethe name of the file to write to disk
[in]tex_meshthe texture mesh to save
[in]precisionfloat precision when saving to ASCII files

◆ saveCharPNGFile()

PCL_EXPORTS void pcl::io::saveCharPNGFile ( const std::string &  file_name,
const unsigned char *  mono_image,
int  width,
int  height,
int  channels 
)

#include <pcl/io/png_io.h>

Saves 8-bit encoded image to PNG file.

Parameters
[in]file_namethe name of the file to write to disk
[in]mono_imageimage grayscale data
[in]widthimage width
[in]heightimage height
[in]channelsnumber of channels

◆ saveIFSFile() [1/2]

int pcl::io::saveIFSFile ( const std::string &  file_name,
const pcl::PCLPointCloud2 cloud 
)
inline

#include <pcl/io/ifs_io.h>

Save point cloud data to an IFS file containing 3D points.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message
Returns
0 on success < 0 on error

Definition at line 234 of file ifs_io.h.

References pcl::IFSWriter::write().

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

◆ saveIFSFile() [2/2]

template<typename PointT >
int pcl::io::saveIFSFile ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud 
)

#include <pcl/io/ifs_io.h>

Save point cloud data to an IFS file containing 3D points.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud
Returns
0 on success < 0 on error

Definition at line 248 of file ifs_io.h.

References pcl::IFSWriter::write().

◆ saveOBJFile() [1/2]

PCL_EXPORTS int pcl::io::saveOBJFile ( const std::string &  file_name,
const pcl::PolygonMesh mesh,
unsigned  precision = 5 
)

#include <pcl/io/obj_io.h>

Saves a PolygonMesh in ascii OBJ format.

Parameters
[in]file_namethe name of the file to write to disk
[in]meshthe polygonal mesh to save
[in]precisionthe output ASCII precision default 5

◆ saveOBJFile() [2/2]

PCL_EXPORTS int pcl::io::saveOBJFile ( const std::string &  file_name,
const pcl::TextureMesh tex_mesh,
unsigned  precision = 5 
)

#include <pcl/io/obj_io.h>

Saves a TextureMesh in ascii OBJ format.

Parameters
[in]file_namethe name of the file to write to disk
[in]tex_meshthe texture mesh to save
[in]precisionthe output ASCII precision
Returns
0 on success, else a negative number

◆ savePCDFile() [1/3]

int pcl::io::savePCDFile ( 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_mode = false 
)
inline

#include <pcl/io/pcd_io.h>

Save point cloud data to a PCD 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]binary_modetrue for binary mode, false (default) for ASCII

Caution: PointCloud structures containing an RGB field have traditionally used packed float values to store RGB data. Storing a float as ASCII can introduce variations to the smallest bits, and thus significantly alter the data. This is a known issue, and the fix involves switching RGB data to be stored as a packed integer in future versions of PCL.

Definition at line 684 of file pcd_io.h.

References pcl::PCDWriter::write().

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

◆ savePCDFile() [2/3]

template<typename PointT >
int pcl::io::savePCDFile ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud,
bool  binary_mode = false 
)
inline

#include <pcl/io/pcd_io.h>

Templated version for saving point cloud data to a PCD file containing a specific given cloud format.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message
[in]binary_modetrue for binary mode, false (default) for ASCII

Caution: PointCloud structures containing an RGB field have traditionally used packed float values to store RGB data. Storing a float as ASCII can introduce variations to the smallest bits, and thus significantly alter the data. This is a known issue, and the fix involves switching RGB data to be stored as a packed integer in future versions of PCL.

Definition at line 708 of file pcd_io.h.

References pcl::PCDWriter::write().

◆ savePCDFile() [3/3]

template<typename PointT >
int pcl::io::savePCDFile ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud,
const pcl::Indices indices,
const bool  binary_mode = false 
)

#include <pcl/io/pcd_io.h>

Templated version for saving point cloud data to a PCD file containing a specific given cloud format.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message
[in]indicesthe set of indices to save
[in]binary_modetrue for binary mode, false (default) for ASCII

Caution: PointCloud structures containing an RGB field have traditionally used packed float values to store RGB data. Storing a float as ASCII can introduce variations to the smallest bits, and thus significantly alter the data. This is a known issue, and the fix involves switching RGB data to be stored as a packed integer in future versions of PCL.

Definition at line 771 of file pcd_io.h.

References pcl::PCDWriter::write().

◆ savePCDFileASCII()

template<typename PointT >
int pcl::io::savePCDFileASCII ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud 
)
inline

#include <pcl/io/pcd_io.h>

Templated version for saving point cloud data to a PCD file containing a specific given cloud format.

 This version is to retain backwards compatibility.
Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message

Caution: PointCloud structures containing an RGB field have traditionally used packed float values to store RGB data. Storing a float as ASCII can introduce variations to the smallest bits, and thus significantly alter the data. This is a known issue, and the fix involves switching RGB data to be stored as a packed integer in future versions of PCL.

Definition at line 731 of file pcd_io.h.

References pcl::PCDWriter::write().

◆ savePCDFileBinary()

template<typename PointT >
int pcl::io::savePCDFileBinary ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud 
)
inline

#include <pcl/io/pcd_io.h>

Templated version for saving point cloud data to a PCD file containing a specific given cloud format.

The resulting file will be an uncompressed binary.

 This version is to retain backwards compatibility.
Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message

Definition at line 747 of file pcd_io.h.

References pcl::PCDWriter::write().

◆ savePCDFileBinaryCompressed()

template<typename PointT >
int pcl::io::savePCDFileBinaryCompressed ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud 
)
inline

#include <pcl/io/pcd_io.h>

Templated version for saving point cloud data to a PCD file containing a specific given cloud format.

This method will write a compressed binary file.

 This version is to retain backwards compatibility.
Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message

Definition at line 792 of file pcd_io.h.

References pcl::PCDWriter::writeBinaryCompressed().

◆ savePLYFile() [1/4]

int pcl::io::savePLYFile ( const std::string &  file_name,
const pcl::PCLPointCloud2 cloud,
const Eigen::Vector4f &  origin = Eigen::Vector4f::Zero (),
const Eigen::Quaternionf &  orientation = Eigen::Quaternionf::Identity (),
bool  binary_mode = false,
bool  use_camera = true 
)
inline

#include <pcl/io/ply_io.h>

Save point cloud data to a PLY file containing n-D points.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message
[in]originthe sensor data acquisition origin (translation)
[in]orientationthe sensor data acquisition origin (rotation)
[in]binary_modetrue for binary mode, false (default) for ASCII
[in]use_camera

Definition at line 806 of file ply_io.h.

References pcl::PLYWriter::write().

Referenced by pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::getMeshesFromTSDFVector(), and pcl::io::save().

◆ savePLYFile() [2/4]

template<typename PointT >
int pcl::io::savePLYFile ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud,
bool  binary_mode = false 
)
inline

#include <pcl/io/ply_io.h>

Templated version for saving point cloud data to a PLY file containing a specific given cloud format.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message
[in]binary_modetrue for binary mode, false (default) for ASCII

Definition at line 823 of file ply_io.h.

References pcl::PLYWriter::write().

◆ savePLYFile() [3/4]

template<typename PointT >
int pcl::io::savePLYFile ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud,
const pcl::Indices indices,
bool  binary_mode = false 
)

#include <pcl/io/ply_io.h>

Templated version for saving point cloud data to a PLY file containing a specific given cloud format.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message
[in]indicesthe set of indices to save
[in]binary_modetrue for binary mode, false (default) for ASCII

Definition at line 862 of file ply_io.h.

References pcl::copyPointCloud(), and pcl::PLYWriter::write().

◆ savePLYFile() [4/4]

PCL_EXPORTS int pcl::io::savePLYFile ( const std::string &  file_name,
const pcl::PolygonMesh mesh,
unsigned  precision = 5 
)

#include <pcl/io/ply_io.h>

Saves a PolygonMesh in ascii PLY format.

Parameters
[in]file_namethe name of the file to write to disk
[in]meshthe polygonal mesh to save
[in]precisionthe output ASCII precision default 5

◆ savePLYFileASCII()

template<typename PointT >
int pcl::io::savePLYFileASCII ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud 
)
inline

#include <pcl/io/ply_io.h>

Templated version for saving point cloud data to a PLY file containing a specific given cloud format.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message

Definition at line 836 of file ply_io.h.

References pcl::PLYWriter::write().

◆ savePLYFileBinary() [1/2]

template<typename PointT >
int pcl::io::savePLYFileBinary ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud 
)
inline

#include <pcl/io/ply_io.h>

Templated version for saving point cloud data to a PLY file containing a specific given cloud format.

Parameters
[in]file_namethe output file name
[in]cloudthe point cloud data message

Definition at line 848 of file ply_io.h.

References pcl::PLYWriter::write().

◆ savePLYFileBinary() [2/2]

PCL_EXPORTS int pcl::io::savePLYFileBinary ( const std::string &  file_name,
const pcl::PolygonMesh mesh 
)

#include <pcl/io/ply_io.h>

Saves a PolygonMesh in binary PLY format.

Parameters
[in]file_namethe name of the file to write to disk
[in]meshthe polygonal mesh to save

◆ savePNGFile() [1/4]

PCL_EXPORTS void pcl::io::savePNGFile ( const std::string &  file_name,
const pcl::PCLImage image 
)

#include <pcl/io/png_io.h>

Saves a PCLImage (formerly ROS sensor_msgs::Image) to PNG file.

Parameters
[in]file_namethe name of the file to write to disk
[in]imageimage to save
Note
Currently only "rgb8", "mono8", and "mono16" image encodings are supported.

◆ savePNGFile() [2/4]

template<typename PointT >
void pcl::io::savePNGFile ( const std::string &  file_name,
const pcl::PointCloud< PointT > &  cloud,
const std::string &  field_name 
)

#include <pcl/io/png_io.h>

Saves the data from the specified field of the point cloud as image to PNG file.

Parameters
[in]file_namethe name of the file to write to disk
[in]cloudpoint cloud to save
[in]field_namethe name of the field to extract data from

Definition at line 116 of file png_io.h.

References pcl::io::savePNGFile().

◆ savePNGFile() [3/4]

PCL_EXPORTS void pcl::io::savePNGFile ( const std::string &  file_name,
const pcl::PointCloud< unsigned char > &  cloud 
)

#include <pcl/io/png_io.h>

Saves 8-bit grayscale cloud as image to PNG file.

Parameters
[in]file_namethe name of the file to write to disk
[in]cloudpoint cloud to save

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

◆ savePNGFile() [4/4]

PCL_EXPORTS void pcl::io::savePNGFile ( const std::string &  file_name,
const pcl::PointCloud< unsigned short > &  cloud 
)

#include <pcl/io/png_io.h>

Saves 16-bit grayscale cloud as image to PNG file.

Parameters
[in]file_namethe name of the file to write to disk
[in]cloudpoint cloud to save

◆ savePolygonFile()

PCL_EXPORTS bool pcl::io::savePolygonFile ( const std::string &  file_name,
const pcl::PolygonMesh mesh,
const bool  binary_format = true 
)

#include <pcl/io/vtk_lib_io.h>

Save a PolygonMesh object given an input file name, based on the file extension.

Parameters
[in]file_namethe name of the file to save the data to
[in]meshthe object that contains the data
[in]binary_formatif true, exported file is in binary format
Returns
True if successful, false otherwise

◆ savePolygonFilePLY()

PCL_EXPORTS bool pcl::io::savePolygonFilePLY ( const std::string &  file_name,
const pcl::PolygonMesh mesh,
const bool  binary_format = true 
)

#include <pcl/io/vtk_lib_io.h>

Save a PolygonMesh object into a PLY file.

Parameters
[in]file_namethe name of the file to save the data to
[in]meshthe object that contains the data
[in]binary_formatif true, exported file is in binary format
Returns
True if successful, false otherwise

◆ savePolygonFileSTL()

PCL_EXPORTS bool pcl::io::savePolygonFileSTL ( const std::string &  file_name,
const pcl::PolygonMesh mesh,
const bool  binary_format = true 
)

#include <pcl/io/vtk_lib_io.h>

Save a PolygonMesh object into an STL file.

Parameters
[in]file_namethe name of the file to save the data to
[in]meshthe object that contains the data
[in]binary_formatif true, exported file is in binary format
Returns
True if successful, false otherwise

◆ savePolygonFileVTK()

PCL_EXPORTS bool pcl::io::savePolygonFileVTK ( const std::string &  file_name,
const pcl::PolygonMesh mesh,
const bool  binary_format = true 
)

#include <pcl/io/vtk_lib_io.h>

Save a PolygonMesh object into a VTK file.

Parameters
[in]file_namethe name of the file to save the data to
[in]meshthe object that contains the data
[in]binary_formatif true, exported file is in binary format
Returns
True if successful, false otherwise

◆ saveRangeImagePlanarFilePNG()

PCL_EXPORTS void pcl::io::saveRangeImagePlanarFilePNG ( const std::string &  file_name,
const pcl::RangeImagePlanar range_image 
)

#include <pcl/io/vtk_lib_io.h>

Write a RangeImagePlanar object to a PNG file.

Parameters
[in]file_namethe name of the file to save the data to
[in]range_imagethe object that contains the data

◆ saveRgbPNGFile()

PCL_EXPORTS void pcl::io::saveRgbPNGFile ( const std::string &  file_name,
const unsigned char *  rgb_image,
int  width,
int  height 
)

#include <pcl/io/png_io.h>

Saves 8-bit encoded RGB image to PNG file.

Parameters
[in]file_namethe name of the file to write to disk
[in]rgb_imageimage rgb data
[in]widthimage width
[in]heightimage height

◆ saveShortPNGFile()

PCL_EXPORTS void pcl::io::saveShortPNGFile ( const std::string &  file_name,
const unsigned short *  short_image,
int  width,
int  height,
int  channels 
)

#include <pcl/io/png_io.h>

Saves 16-bit encoded image to PNG file.

Parameters
[in]file_namethe name of the file to write to disk
[in]short_imageimage short data
[in]widthimage width
[in]heightimage height
[in]channelsnumber of channels

◆ saveVTKFile() [1/2]

PCL_EXPORTS int pcl::io::saveVTKFile ( const std::string &  file_name,
const pcl::PCLPointCloud2 cloud,
unsigned  precision = 5 
)

#include <pcl/io/vtk_io.h>

Saves a PointCloud in ascii VTK format.

Parameters
[in]file_namethe name of the file to write to disk
[in]cloudthe point cloud to save
[in]precisionthe output ASCII precision

◆ saveVTKFile() [2/2]

PCL_EXPORTS int pcl::io::saveVTKFile ( const std::string &  file_name,
const pcl::PolygonMesh triangles,
unsigned  precision = 5 
)

#include <pcl/io/vtk_io.h>

Saves a PolygonMesh in ascii VTK format.

Parameters
[in]file_namethe name of the file to write to disk
[in]trianglesthe polygonal mesh to save
[in]precisionthe output ASCII precision

◆ vtkPolyDataToPointCloud()

template<typename PointT >
void pcl::io::vtkPolyDataToPointCloud ( vtkPolyData *const  polydata,
pcl::PointCloud< PointT > &  cloud 
)

#include <pcl/io/vtk_lib_io.h>

Convert a VTK PolyData object to a pcl::PointCloud one.

Parameters
[in]polydatathe input VTK PolyData object
[out]cloudthe resultant pcl::PointCloud object

Definition at line 71 of file vtk_lib_io.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::resize(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.

◆ vtkStructuredGridToPointCloud()

template<typename PointT >
void pcl::io::vtkStructuredGridToPointCloud ( vtkStructuredGrid *const  structured_grid,
pcl::PointCloud< PointT > &  cloud 
)

#include <pcl/io/vtk_lib_io.h>

Convert a VTK StructuredGrid object to a pcl::PointCloud one.

Parameters
[in]structured_gridthe input VTK StructuredGrid object
[out]cloudthe resultant pcl::PointCloud object

Definition at line 160 of file vtk_lib_io.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.