41 #include <pcl/io/file_io.h>
42 #include <pcl/PCLPointField.h>
43 #include <pcl/common/io.h>
44 #include <pcl/common/utils.h>
84 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
85 int &file_version,
int &data_type,
unsigned int &data_idx,
const int offset = 0)
override ;
102 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
int &file_version,
103 const int offset = 0)
override;
107 template<
typename Po
intT>
108 void setInputFields ();
131 std::string sep_chars_{
", \n\r\t"};
132 std::string extension_{
".txt"};
134 std::string name_{
"AsciiReader"};
155 #include <pcl/io/impl/ascii_io.hpp>
Ascii Point Cloud Reader.
int parse(const std::string &token, const pcl::PCLPointField &field, std::uint8_t *data_target)
Parses token based on field type.
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=0) override
Read a point cloud data header from a FILE file.
void setInputFields(const std::vector< pcl::PCLPointField > &fields)
Set the ascii file point fields using a list of fields.
std::vector< pcl::PCLPointField > fields_
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.
void setExtension(const std::string &ext)
Set the extension of the ascii point file type.
void setSepChars(const std::string &chars)
Set the Separating characters for the ascii point fields 2.
std::uint32_t typeSize(int type)
Returns the size in bytes of a point field type.
Point Cloud Data (FILE) file format reader interface.
virtual int read(const std::string &file_name, pcl::PCLPointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &file_version, const int offset=0)=0
Read a point cloud data from a FILE file and store it into a pcl/PCLPointCloud2.
Defines all the PCL and non-PCL macros used.