38 #ifndef PCL_IO_ASCII_IO_H_
39 #define PCL_IO_ASCII_IO_H_
41 #include <pcl/io/file_io.h>
42 #include <pcl/PCLPointField.h>
43 #include <pcl/common/io.h>
83 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
84 int &file_version,
int &data_type,
unsigned int &data_idx,
const int offset = 0) ;
101 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
int &file_version,
102 const int offset = 0);
108 setInputFields (
const std::vector<pcl::PCLPointField>& fields);
114 template<
typename Po
intT>
124 setSepChars (
const std::string &chars);
146 parse (
const std::string& token,
const pcl::PCLPointField& field, uint8_t* data_target);
158 template<
typename Po
intT>
void
163 pcl::getFields<PointT> (
fields_);
167 for (std::vector<pcl::PCLPointField>::iterator field_iter =
fields_.begin ();
168 field_iter !=
fields_.end (); field_iter++)
170 if (field_iter->name ==
"_")
171 field_iter =
fields_.erase (field_iter);
172 field_iter->offset = offset;
173 offset +=
typeSize (field_iter->datatype);
177 #endif // PCL_IO_ASCII_IO_H_
Point Cloud Data (FILE) file format reader interface.
std::vector< pcl::PCLPointField > fields_
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.
uint32_t typeSize(int type)
Returns the size in bytes of a point field type.
Ascii Point Cloud Reader.
void setInputFields(const std::vector< pcl::PCLPointField > &fields)
Set the ascii file point fields using a list of fields.
void read(std::istream &stream, Type &value)
Function for reading data from a stream.
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setExtension(const std::string &ext)
Set the extension of the ascii point file type.