IO.h
Go to the documentation of this file.
1 // kate: replace-tabs off; indent-width 4; indent-mode normal
2 // vim: ts=4:sw=4:noexpandtab
3 /*
4 
5 Copyright (c) 2010--2012,
6 François Pomerleau and Stephane Magnenat, ASL, ETHZ, Switzerland
7 You can contact the authors at <f dot pomerleau at gmail dot com> and
8 <stephane at magnenat dot net>
9 
10 All rights reserved.
11 
12 Redistribution and use in source and binary forms, with or without
13 modification, are permitted provided that the following conditions are met:
14  * Redistributions of source code must retain the above copyright
15  notice, this list of conditions and the following disclaimer.
16  * Redistributions in binary form must reproduce the above copyright
17  notice, this list of conditions and the following disclaimer in the
18  documentation and/or other materials provided with the distribution.
19  * Neither the name of the <organization> nor the
20  names of its contributors may be used to endorse or promote products
21  derived from this software without specific prior written permission.
22 
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 DISCLAIMED. IN NO EVENT SHALL ETH-ASL BE LIABLE FOR ANY
27 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 
34  */
35 
36 #ifndef __POINTMATCHER_IO_H
37 #define __POINTMATCHER_IO_H
38 
39 #include "PointMatcher.h"
40 
42 template<typename T>
44 {
45  typedef typename PointMatcher<T>::Vector Vector;
46  typedef typename PointMatcher<T>::Matrix Matrix;
53 
55  typedef std::pair<int, std::string >LabelAssociationPair;
56 
59  typedef std::map<std::string, LabelAssociationPair > SublabelAssociationMap;
60 
61  static std::string getColLabel(const Label& label, const int row);
62 
65  {
70  };
71 
74  {
78 
81  };
82 
84  typedef std::vector<SupportedLabel> SupportedLabels;
85 
88  {
90  unsigned int matrixRowId;
92 
94  //TODO: move that to .cpp
96  {
97  init(name);
98  };
99 
101  {
102  init("");
103  };
104 
105  private:
107  {
108  this->name = name;
109  this->matrixRowId = 0;
110  this->matrixType = UNSUPPORTED;
111  };
112  };
113 
118  {
119  // This table can be read as:
120  // (internalName, externalName, type)
121  const static SupportedLabels labels = {
122  {"x", "x", FEATURE},
123  {"y", "y", FEATURE},
124  {"z", "z", FEATURE},
125  {"pad", "pad", FEATURE},
126  //{"internalName", "externalName", FEATURE},
127  {"normals", "nx", DESCRIPTOR},
128  {"normals", "ny", DESCRIPTOR},
129  {"normals", "nz", DESCRIPTOR},
130  {"normals", "normal_x", DESCRIPTOR},
131  {"normals", "normal_y", DESCRIPTOR},
132  {"normals", "normal_z", DESCRIPTOR},
133  {"observationDirections", "observationDirections0", DESCRIPTOR},
134  {"observationDirections", "observationDirections1", DESCRIPTOR},
135  {"observationDirections", "observationDirections2", DESCRIPTOR},
136  {"color", "red", DESCRIPTOR},
137  {"color", "green", DESCRIPTOR},
138  {"color", "blue", DESCRIPTOR},
139  {"color", "alpha", DESCRIPTOR},
140  {"eigValues", "eigValues0", DESCRIPTOR},
141  {"eigValues", "eigValues1", DESCRIPTOR},
142  {"eigValues", "eigValues2", DESCRIPTOR},
143  {"eigVectors", "eigVectors0X", DESCRIPTOR},
144  {"eigVectors", "eigVectors0Y", DESCRIPTOR},
145  {"eigVectors", "eigVectors0Z", DESCRIPTOR},
146  {"eigVectors", "eigVectors1X", DESCRIPTOR},
147  {"eigVectors", "eigVectors1Y", DESCRIPTOR},
148  {"eigVectors", "eigVectors1Z", DESCRIPTOR},
149  {"eigVectors", "eigVectors2X", DESCRIPTOR},
150  {"eigVectors", "eigVectors2Y", DESCRIPTOR},
151  {"eigVectors", "eigVectors2Z", DESCRIPTOR},
152  {"intensity", "intensity", DESCRIPTOR},
153  //{"internalName", "externalName", DESCRIPTOR},
154  {"time", "time", TIME}
155  //{"internalName", "externalName", TIME}
156  };
157 
158  return labels;
159  }
160 
163  {
165 
166  public:
168  void add(const std::string internalName);
169 
171  void add(const std::string internalName, const unsigned int dim);
172 
173 
175  Labels getLabels() const;
176  };
177 
178 
180  //static PMPropTypes getPMType(const std::string& externalName); //! Return the type of information specific to a DataPoints based on a sulabel name
181 
182  // CSV
183  static DataPoints loadCSV(const std::string& fileName);
184  static DataPoints loadCSV(std::istream& is);
185 
186  static void saveCSV(const DataPoints& data, const std::string& fileName, unsigned precision);
187  static void saveCSV(const DataPoints& data, std::ostream& os);
188 
189  // VTK
192  {
195  };
196 
198  struct SplitTime
199  {
202  Eigen::Matrix<unsigned int, Eigen::Dynamic, Eigen::Dynamic> high32;
205  Eigen::Matrix<unsigned int, Eigen::Dynamic, Eigen::Dynamic> low32;
206 
208  SplitTime(): isHigh32Found(false), isLow32Found(false){};
209 
210  };
211 
212  static DataPoints loadVTK(const std::string& fileName);
213  static DataPoints loadVTK(std::istream& is);
214 
215  static void saveVTK(const DataPoints& data, const std::string& fileName, bool binary = false, unsigned precision = 7);
216 
217  // PLY
218  static DataPoints loadPLY(const std::string& fileName);
219  static DataPoints loadPLY(std::istream& is);
220 
221  static void savePLY(const DataPoints& data, const std::string& fileName, bool binary, unsigned precision);
222 
223  // PCD
224  static DataPoints loadPCD(const std::string& fileName);
225  static DataPoints loadPCD(std::istream& is);
226 
227  static void savePCD(const DataPoints& data, const std::string& fileName, unsigned precision);
228 
230  struct FileInfo
231  {
232  typedef Eigen::Matrix<T, 3, 1> Vector3;
233 
240 
242  };
243 
245  struct FileInfoVector: public std::vector<FileInfo>
246  {
247  FileInfoVector();
248  FileInfoVector(const std::string& fileName, std::string dataPath = "", std::string configPath = "");
249 
250  protected:
251  std::string localToGlobalFileName(const std::string& path, const std::string& fileName);
252  bool findTransform(const PointMatcherSupport::CsvElements& data, const std::string& prefix, unsigned dim);
253  TransformationParameters getTransform(const PointMatcherSupport::CsvElements& data, const std::string& prefix, unsigned dim, unsigned line);
254  };
255 
257  struct CsvDescriptor {
259  unsigned start_col;
260  unsigned span;
261  };
262 
264  static bool plyPropTypeValid (const std::string& type);
265 
267  struct PLYProperty
268  {
269  enum class PLYPropertyType : uint8_t
270  {
271  INVALID,
272  INT8,
273  UINT8,
274  INT16,
275  UINT16,
276  INT32,
277  UINT32,
278  FLOAT32,
279  FLOAT64
280  };
281 
282  //PLY information:
286  unsigned pos;
287  bool is_list;
288 
289  //PointMatcher information:
291  int pmRowID;
292 
293  PLYProperty() { }
294 
295  // regular property
296  PLYProperty(const std::string& type, const std::string& name, const unsigned pos);
297 
298  // list property
299  PLYProperty(const std::string& idx_type, const std::string& type, const std::string& name, const unsigned pos);
300 
301  bool operator==(const PLYProperty& other) const;
303  {
304  if (s == "int8" || s == "char") return PLYPropertyType::INT8;
305  else if (s == "uint8" || s == "uchar") return PLYPropertyType::UINT8;
306  else if (s == "int16" || s == "short") return PLYPropertyType::INT16;
307  else if (s == "uint16" || s == "ushort") return PLYPropertyType::UINT16;
308  else if (s == "int32" || s == "int") return PLYPropertyType::INT32;
309  else if (s == "uint32" || s == "uint") return PLYPropertyType::UINT32;
310  else if (s == "float32" || s == "float") return PLYPropertyType::FLOAT32;
311  else if (s == "float64" || s == "double") return PLYPropertyType::FLOAT64;
313  }
314  };
315 
318  typedef std::map<std::string, std::vector<PLYProperty> > PLYDescPropMap;
319 
321  typedef std::vector<PLYProperty> PLYProperties;
322 
324  typedef typename PLYProperties::iterator it_PLYProp;
325 
328  {
329  public:
331  unsigned num;
332  unsigned total_props;
333  unsigned offset;
335  unsigned nbFeatures;
336  unsigned nbDescriptors;
337 
338 
340 
348  PLYElement(const std::string& name, const unsigned num, const unsigned offset) :
350 
351  //bool supportsProperty(const PLYProperty& prop) const; //!< Returns true if property pro is supported by element
352 
353  bool operator==(const PLYElement& other) const;
354 
355  };
356 
357 
359  class PLYVertex : public PLYElement
360  {
361  public:
363 
369  PLYVertex(const unsigned num, const unsigned offset) : PLYElement("vertex", num, offset) {}
370 
371  };
372 
375  {
377  {
380  };
381 
382  static ElementTypes getElementType(const std::string& elem_name);
383  public:
384  bool elementSupported(const std::string& elem_name);
385  static PLYElement* createElement(const std::string& elem_name, const int elem_num, const unsigned offset);
386  };
387 
389  struct PCDproperty
390  {
392  unsigned int size;
393  char type;
394  unsigned int count;
395 
396  //PointMatcher information:
398  int pmRowID;
399 
402  {
403  field = "";
404  size = 0;
405  type = '-';
406  count = 1;
408  pmRowID = -1;
409  };
410  };
411 
413  struct PCDheader
414  {
416  std::vector<PCDproperty> properties;
417  unsigned int width;
418  unsigned int height;
419  Eigen::Matrix<T, 7, 1> viewPoint;
420  unsigned int nbPoints;
422 
424  {
425  version = "-";
426  width = 0;
427  height = 0;
428  viewPoint = Eigen::Matrix<T, 7, 1>::Zero();
429  nbPoints = 0;
430  dataType = "-";
431  };
432  };
433 };
434 
435 
436 #endif // __POINTMATCHER_IO_H
PointMatcherIO::PCDproperty::size
unsigned int size
Size of the property in bytes.
Definition: IO.h:392
PointMatcherIO
IO Functions and classes that are dependant on scalar type are defined in this templatized class.
Definition: IO.h:43
PointMatcherIO::PLYProperty::PLYPropertyType::INVALID
@ INVALID
PointMatcherIO::PCDheader::nbPoints
unsigned int nbPoints
number of points, same as width*height
Definition: IO.h:420
PointMatcherIO::CsvDescriptor::name
std::string name
name of descriptor
Definition: IO.h:258
PointMatcherIO::PLYDescPropMap
std::map< std::string, std::vector< PLYProperty > > PLYDescPropMap
Definition: IO.h:318
PointMatcherIO::GenericInputHeader
Helper structure designed to parse file headers.
Definition: IO.h:87
PointMatcherIO::PLYProperty::idx_type
std::string idx_type
for list properties, type of number of elements
Definition: IO.h:285
PointMatcherIO::LabelAssociationPair
std::pair< int, std::string > LabelAssociationPair
Pair feature column, feature name.
Definition: IO.h:55
PointMatcherIO::PLYVertex
Implementation of PLY vertex element.
Definition: IO.h:359
PointMatcherIO::UNSUPPORTED
@ UNSUPPORTED
Definition: IO.h:69
PointMatcherIO::SplitTime::high32
Eigen::Matrix< unsigned int, Eigen::Dynamic, Eigen::Dynamic > high32
Matrix containing file data representing the high 32 bits.
Definition: IO.h:203
PointMatcherIO::GenericInputHeader::GenericInputHeader
GenericInputHeader(const std::string name)
Constructor.
Definition: IO.h:95
PointMatcherIO::PLYProperty::pos
unsigned pos
index of the property in element
Definition: IO.h:286
PointMatcherIO::PLYProperty::is_list
bool is_list
member is true of property is a list
Definition: IO.h:287
PointMatcherIO::PLYElement::PLYElement
PLYElement(const std::string &name, const unsigned num, const unsigned offset)
PLY Element constructor.
Definition: IO.h:348
PointMatcherIO::loadVTK
static DataPoints loadVTK(const std::string &fileName)
Load point cloud from a file as VTK.
Definition: pointmatcher/IO.cpp:904
PointMatcherIO::Labels
PointMatcher< T >::DataPoints::Labels Labels
alias
Definition: IO.h:52
PointMatcherIO::PLYElement::name
std::string name
name identifying the PLY element
Definition: IO.h:330
PointMatcherIO::PLYProperty::PLYPropertyType::FLOAT64
@ FLOAT64
PointMatcherIO::PCDheader::height
unsigned int height
height of sensor matrix
Definition: IO.h:418
PointMatcherIO::LabelGenerator::getLabels
Labels getLabels() const
Return the vector of labels used to build a DataPoints.
Definition: pointmatcher/IO.cpp:442
PointMatcherIO::savePLY
static void savePLY(const DataPoints &data, const std::string &fileName, bool binary, unsigned precision)
save datapoints to PLY point cloud format
Definition: pointmatcher/IO.cpp:1722
PointMatcherIO::UNSTRUCTURED_GRID
@ UNSTRUCTURED_GRID
Definition: IO.h:194
PointMatcherIO::FEATURE
@ FEATURE
Definition: IO.h:66
PointMatcherIO::PCDheader::version
std::string version
Version of the PCD file used.
Definition: IO.h:415
PointMatcherIO::GenericInputHeader::name
std::string name
name found in the file
Definition: IO.h:89
PointMatcher::DataPoints::Labels
A vector of Label.
Definition: PointMatcher.h:229
PointMatcherIO::PCDheader
All information contained in the header of a PCD file.
Definition: IO.h:413
PointMatcherIO::DESCRIPTOR
@ DESCRIPTOR
Definition: IO.h:67
PointMatcherIO::FileInfoVector::getTransform
TransformationParameters getTransform(const PointMatcherSupport::CsvElements &data, const std::string &prefix, unsigned dim, unsigned line)
Return the transformation named prefix from data.
Definition: pointmatcher/IO.cpp:320
PointMatcherIO::PCDproperty::pmType
PMPropTypes pmType
type of information in PointMatcher
Definition: IO.h:397
PointMatcherIO::PCDproperty::type
char type
Type: I: signed, U: unsigned, F: float.
Definition: IO.h:393
PointMatcherSupport::CsvElements
std::map< std::string, std::vector< std::string > > CsvElements
Data from a CSV file.
Definition: PointMatcher.h:125
PointMatcherIO::FileInfo::groundTruthTransformation
TransformationParameters groundTruthTransformation
matrix of the ground-truth transform
Definition: IO.h:238
PointMatcherIO::SupportedLabel::externalName
std::string externalName
name used in external format
Definition: IO.h:76
PointMatcherIO::FileInfo::readingFileName
std::string readingFileName
file name of the reading point cloud
Definition: IO.h:234
PointMatcherIO::PLYElement::num
unsigned num
number of occurences of the element
Definition: IO.h:331
PointMatcherIO::PCDheader::properties
std::vector< PCDproperty > properties
vector of properties
Definition: IO.h:416
PointMatcherIO::SplitTime
Storage for time loaded separatly.
Definition: IO.h:198
PointMatcherIO::FileInfo::gravity
Vector3 gravity
gravity vector
Definition: IO.h:239
PointMatcherIO::PLYProperty
Interface for PLY property.
Definition: IO.h:267
PointMatcherIO::PLYElementF::createElement
static PLYElement * createElement(const std::string &elem_name, const int elem_num, const unsigned offset)
factory function, build element defined by name with elem_num elements
Definition: pointmatcher/IO.cpp:1915
PointMatcherIO::PLYProperty::operator==
bool operator==(const PLYProperty &other) const
list prop ctor
Definition: pointmatcher/IO.cpp:1958
PointMatcherIO::SupportedLabel::SupportedLabel
SupportedLabel(const std::string &internalName, const std::string &externalName, const PMPropTypes &type)
Constructor.
Definition: pointmatcher/IO.cpp:403
PointMatcherIO::CsvDescriptor::span
unsigned span
number of columns spanned by descriptor
Definition: IO.h:260
PointMatcherIO::FileInfo::referenceFileName
std::string referenceFileName
file name of the reference point cloud
Definition: IO.h:235
PointMatcherIO::SplitTime::SplitTime
SplitTime()
Constructor.
Definition: IO.h:208
PointMatcherIO::PCDheader::width
unsigned int width
width of sensor matrix
Definition: IO.h:417
PointMatcherIO::PLYElement
Interface for all PLY elements.
Definition: IO.h:327
PointMatcher::DataPoints
A point cloud.
Definition: PointMatcher.h:207
PointMatcherIO::FileInfoVector::FileInfoVector
FileInfoVector()
Definition: pointmatcher/IO.cpp:178
PointMatcherIO::PLYElementF::VERTEX
@ VERTEX
Definition: IO.h:378
PointMatcherIO::SupportedVTKDataTypes
SupportedVTKDataTypes
Enumeration of legacy VTK data types that can be parsed.
Definition: IO.h:191
PointMatcherIO::TIME
@ TIME
Definition: IO.h:68
testing::internal::string
::std::string string
Definition: gtest.h:1979
PointMatcherIO::PLYElementF::elementSupported
bool elementSupported(const std::string &elem_name)
returns true if element named elem_name is supported by this parser
Definition: pointmatcher/IO.cpp:1908
PointMatcherIO::PLYProperty::pmRowID
int pmRowID
row id used in a DataPoints
Definition: IO.h:291
PointMatcherIO::PLYProperty::PLYPropertyType::FLOAT32
@ FLOAT32
PointMatcherIO::FileInfoVector::findTransform
bool findTransform(const PointMatcherSupport::CsvElements &data, const std::string &prefix, unsigned dim)
Return whether there is a valid transformation named prefix in data.
Definition: pointmatcher/IO.cpp:303
PointMatcherIO::SupportedLabel::type
PMPropTypes type
type of information in PointMatcher
Definition: IO.h:77
PointMatcherIO::PLYProperty::PLYPropertyType::UINT16
@ UINT16
PointMatcherIO::SplitTime::isHigh32Found
bool isHigh32Found
was the high 32bits found in the file
Definition: IO.h:200
PointMatcherIO::CsvDescriptor::start_col
unsigned start_col
column number at which descriptor starts
Definition: IO.h:259
PointMatcherIO::PLYProperty::PLYPropertyType::INT16
@ INT16
PointMatcherIO::PCDproperty::PCDproperty
PCDproperty()
Empty constructor.
Definition: IO.h:401
PointMatcherIO::PCDproperty::field
std::string field
Name of the property.
Definition: IO.h:391
PointMatcher::Int64Matrix
Eigen::Matrix< std::int64_t, Eigen::Dynamic, Eigen::Dynamic > Int64Matrix
A dense signed 64-bits matrix.
Definition: PointMatcher.h:173
PointMatcherIO::PLYProperty::PLYProperty
PLYProperty(const std::string &type, const std::string &name, const unsigned pos)
@(brief) Regular PLY property constructor
Definition: pointmatcher/IO.cpp:1831
PointMatcherIO::loadCSV
static DataPoints loadCSV(const std::string &fileName)
Associate an external name to a DataPoints type of information.
Definition: pointmatcher/IO.cpp:393
PointMatcherIO::Vector
PointMatcher< T >::Vector Vector
alias
Definition: IO.h:45
PointMatcherIO::loadPLY
static DataPoints loadPLY(const std::string &fileName)
Load polygon file format (ply) file.
Definition: pointmatcher/IO.cpp:1282
PointMatcherIO::PLYProperty::name
std::string name
name of PLY property
Definition: IO.h:283
PointMatcherIO::Parameters
PointMatcher< T >::Matrix Parameters
alias
Definition: IO.h:50
PointMatcherIO::SupportedLabels
std::vector< SupportedLabel > SupportedLabels
Vector of supported labels in PointMatcher and their external names.
Definition: IO.h:84
PointMatcherIO::it_PLYProp
PLYProperties::iterator it_PLYProp
Iterator for a vector of PLY properties.
Definition: IO.h:324
PointMatcherIO::SupportedLabel::internalName
std::string internalName
name used in PointMatcher
Definition: IO.h:75
PointMatcherIO::FileInfo::configFileName
std::string configFileName
file name of the yaml configuration
Definition: IO.h:236
PointMatcherIO::GenericInputHeader::init
void init(std::string name)
Definition: IO.h:106
PointMatcherIO::PLYProperty::type
PLYPropertyType type
type of PLY property
Definition: IO.h:284
PointMatcherIO::PLYElementF::UNSUPPORTED
@ UNSUPPORTED
Definition: IO.h:379
PointMatcherIO::PMPropTypes
PMPropTypes
Type of information in a DataPoints. Each type is stored in its own dense matrix.
Definition: IO.h:64
PointMatcherIO::PLYProperty::PLYPropertyType::INT8
@ INT8
icp.data
data
Definition: icp.py:50
PointMatcherIO::PLYElement::operator==
bool operator==(const PLYElement &other) const
comparison operator for elements
Definition: pointmatcher/IO.cpp:1951
PointMatcher::Matrix
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dense matrix over ScalarType.
Definition: PointMatcher.h:169
PointMatcherIO::FileInfoVector
A vector of file info, to be used in batch processing.
Definition: IO.h:245
PointMatcherIO::FileInfoVector::localToGlobalFileName
std::string localToGlobalFileName(const std::string &path, const std::string &fileName)
Join parentPath and fileName and return the result as a global path.
Definition: pointmatcher/IO.cpp:289
PointMatcherIO::PLYProperty::PLYPropertyType::UINT32
@ UINT32
PointMatcherIO::PLYElement::properties
PLYProperties properties
all properties found in the header
Definition: IO.h:334
PointMatcherIO::PLYProperty::PLYPropertyType::INT32
@ INT32
PointMatcherIO::PLYProperty::PLYPropertyType::UINT8
@ UINT8
PointMatcherIO::Matrix
PointMatcher< T >::Matrix Matrix
alias
Definition: IO.h:46
PointMatcherIO::SupportedLabel
Structure containing all information required to map external information to PointMatcher internal re...
Definition: IO.h:73
PointMatcherIO::LabelGenerator::add
void add(const std::string internalName)
add a name to the vector of labels. If already there, will increament the dimension.
Definition: pointmatcher/IO.cpp:413
PointMatcherIO::saveCSV
static void saveCSV(const DataPoints &data, const std::string &fileName, unsigned precision)
Save point cloud to a file as CSV.
Definition: pointmatcher/IO.cpp:829
PointMatcherIO::PLYElement::nbDescriptors
unsigned nbDescriptors
number of valid descriptors found in the header
Definition: IO.h:336
dataPath
std::string dataPath
Definition: utest.cpp:43
PointMatcherIO::PLYProperties
std::vector< PLYProperty > PLYProperties
Vector of properties specific to PLY files.
Definition: IO.h:321
PointMatcherIO::getColLabel
static std::string getColLabel(const Label &label, const int row)
convert a descriptor label to an appropriate sub-label
Definition: pointmatcher/IO.cpp:454
PointMatcher::Vector
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
A vector over ScalarType.
Definition: PointMatcher.h:161
PointMatcherIO::GenericInputHeader::matrixType
PMPropTypes matrixType
in which matrix the information will be loaded
Definition: IO.h:91
PointMatcherIO::POLYDATA
@ POLYDATA
Definition: IO.h:193
PointMatcherIO::TransformationParameters
PointMatcher< T >::TransformationParameters TransformationParameters
alias
Definition: IO.h:49
PointMatcherIO::PCDheader::PCDheader
PCDheader()
Definition: IO.h:423
PointMatcherIO::PCDheader::viewPoint
Eigen::Matrix< T, 7, 1 > viewPoint
not used
Definition: IO.h:419
PointMatcherIO::Int64Matrix
PointMatcher< T >::Int64Matrix Int64Matrix
alias
Definition: IO.h:47
PointMatcherIO::getSupportedExternalLabels
static const SupportedLabels & getSupportedExternalLabels()
Definition: IO.h:117
PointMatcherIO::CsvDescriptor
A structure to hold information about descriptors contained in a CSV file.
Definition: IO.h:257
PointMatcherIO::Label
PointMatcher< T >::DataPoints::Label Label
alias
Definition: IO.h:51
PointMatcherIO::PLYElement::total_props
unsigned total_props
total number of properties in PLY element
Definition: IO.h:332
PointMatcherIO::FileInfo::initialTransformation
TransformationParameters initialTransformation
matrix of initial estimate transform
Definition: IO.h:237
PointMatcherIO::FileInfo
Information to exploit a reading from a file using this library. Fields might be left blank if unused...
Definition: IO.h:230
icp_advance_api.dim
dim
Definition: icp_advance_api.py:152
PointMatcherIO::SplitTime::isLow32Found
bool isLow32Found
Definition: IO.h:201
PointMatcherIO::savePCD
static void savePCD(const DataPoints &data, const std::string &fileName, unsigned precision)
save datapoints to PCD point cloud format
Definition: pointmatcher/IO.cpp:2377
PointMatcherIO::SplitTime::low32
Eigen::Matrix< unsigned int, Eigen::Dynamic, Eigen::Dynamic > low32
Matrix containing file data representing the low 32 bits.
Definition: IO.h:205
PointMatcherIO::PLYElement::nbFeatures
unsigned nbFeatures
number of valid features found in the header
Definition: IO.h:335
PointMatcherIO::PCDproperty::pmRowID
int pmRowID
row id used in a DataPoints
Definition: IO.h:398
PointMatcherIO::saveVTK
static void saveVTK(const DataPoints &data, const std::string &fileName, bool binary=false, unsigned precision=7)
Save point cloud to a file as VTK.
Definition: pointmatcher/IO.cpp:1255
PointMatcherIO::LabelGenerator::labels
Labels labels
vector of labels used to cumulat information
Definition: IO.h:164
PointMatcherIO::PLYProperty::PLYPropertyType
PLYPropertyType
Definition: IO.h:269
PointMatcherIO::PLYElementF
Factory for PLY elements.
Definition: IO.h:374
PointMatcherIO::PLYVertex::PLYVertex
PLYVertex(const unsigned num, const unsigned offset)
Constructor.
Definition: IO.h:369
PointMatcherIO::PLYElementF::getElementType
static ElementTypes getElementType(const std::string &elem_name)
Definition: pointmatcher/IO.cpp:1892
PointMatcherIO::GenericInputHeader::matrixRowId
unsigned int matrixRowId
on which row the information will be loaded
Definition: IO.h:90
PointMatcherIO::SublabelAssociationMap
std::map< std::string, LabelAssociationPair > SublabelAssociationMap
Definition: IO.h:59
PointMatcherIO::PCDproperty
Information for a PCD property.
Definition: IO.h:389
PointMatcherIO::PLYElementF::ElementTypes
ElementTypes
Definition: IO.h:376
PointMatcher.h
public interface
PointMatcherIO::PLYProperty::get_type_from_string
PLYPropertyType get_type_from_string(const std::string &s)
compare with other property
Definition: IO.h:302
PointMatcherIO::PCDproperty::count
unsigned int count
number of dimension
Definition: IO.h:394
PointMatcherIO::FileInfo::FileInfo
FileInfo(const std::string &readingPath="", const std::string &referencePath="", const std::string &configFileName="", const TransformationParameters &initialTransformation=TransformationParameters(), const TransformationParameters &groundTruthTransformation=TransformationParameters(), const Vector &gravity=Vector3::Zero())
Constructor, leave fields blank if unused.
Definition: pointmatcher/IO.cpp:164
PointMatcherIO::PLYElement::offset
unsigned offset
line at which data starts
Definition: IO.h:333
PointMatcherIO::PCDheader::dataType
std::string dataType
ascii or binary
Definition: IO.h:421
PointMatcherIO::FileInfo::Vector3
Eigen::Matrix< T, 3, 1 > Vector3
alias
Definition: IO.h:232
PointMatcherIO::plyPropTypeValid
static bool plyPropTypeValid(const std::string &type)
Check that property defined by type is a valid PLY type note: type must be lowercase.
Definition: pointmatcher/IO.cpp:1926
PointMatcherIO::DataPoints
PointMatcher< T >::DataPoints DataPoints
alias
Definition: IO.h:48
PointMatcherIO::GenericInputHeader::GenericInputHeader
GenericInputHeader()
Definition: IO.h:100
PointMatcherIO::loadPCD
static DataPoints loadPCD(const std::string &fileName)
PointMatcher::TransformationParameters
Matrix TransformationParameters
A matrix holding the parameters a transformation.
Definition: PointMatcher.h:182
PointMatcherIO::PLYProperty::pmType
PMPropTypes pmType
type of information in PointMatcher
Definition: IO.h:290
PointMatcher::DataPoints::Label
The name for a certain number of dim.
Definition: PointMatcher.h:221
PointMatcherIO::LabelGenerator
Generate a vector of Labels by checking for collision is the same name is reused.
Definition: IO.h:162


libpointmatcher
Author(s):
autogenerated on Sun Dec 22 2024 03:21:53