36 #ifndef __POINTMATCHER_IO_H 37 #define __POINTMATCHER_IO_H 109 this->matrixRowId = 0;
121 const static SupportedLabels labels = {
133 {
"observationDirections",
"observationDirections0",
DESCRIPTOR},
134 {
"observationDirections",
"observationDirections1",
DESCRIPTOR},
135 {
"observationDirections",
"observationDirections2",
DESCRIPTOR},
154 {
"time",
"time",
TIME}
175 Labels getLabels()
const;
184 static DataPoints
loadCSV(std::istream& is);
187 static void saveCSV(
const DataPoints&
data, std::ostream& os);
202 Eigen::Matrix<unsigned int, Eigen::Dynamic, Eigen::Dynamic> high32;
205 Eigen::Matrix<unsigned int, Eigen::Dynamic, Eigen::Dynamic>
low32;
208 SplitTime(): isHigh32Found(false), isLow32Found(false){};
213 static DataPoints
loadVTK(std::istream& is);
219 static DataPoints
loadPLY(std::istream& is);
225 static DataPoints
loadPCD(std::istream& is);
324 name(name), num(num), total_props(0), offset(offset), nbFeatures(0), nbDescriptors(0) {}
359 bool elementSupported(
const std::string& elem_name);
360 static PLYElement* createElement(
const std::string& elem_name,
const int elem_num,
const unsigned offset);
403 viewPoint = Eigen::Matrix<T, 7, 1>::Zero();
411 #endif // __POINTMATCHER_IO_H
int pmRowID
row id used in a DataPoints
TransformationParameters initialTransformation
matrix of initial estimate transform
bool is_list
member is true of property is a list
unsigned int size
Size of the property in bytes.
IO Functions and classes that are dependant on scalar type are defined in this templatized class...
unsigned int count
number of dimension
static DataPoints loadPCD(const std::string &fileName)
unsigned pos
index of the property in element
unsigned span
number of columns spanned by descriptor
std::string referenceFileName
file name of the reference point cloud
std::string readingFileName
file name of the reading point cloud
std::string name
name of descriptor
std::vector< SupportedLabel > SupportedLabels
Vector of supported labels in PointMatcher and their external names.
PointMatcher< T >::DataPoints::Labels Labels
alias
std::string configFileName
file name of the yaml configuration
std::string type
type of PLY property
Factory for PLY elements.
PLYElement(const std::string &name, const unsigned num, const unsigned offset)
PLY Element constructor.
static bool plyPropTypeValid(const std::string &type)
Check that property defined by type is a valid PLY type note: type must be lowercase.
static void savePLY(const DataPoints &data, const std::string &fileName)
save datapoints to PLY point cloud format
static void saveVTK(const DataPoints &data, const std::string &fileName, bool binary=false)
Save point cloud to a file as VTK.
std::string name
name identifying the PLY element
std::string name
name of PLY property
bool isHigh32Found
was the high 32bits found in the file
The name for a certain number of dim.
std::string field
Name of the property.
static DataPoints loadCSV(const std::string &fileName)
Associate an external name to a DataPoints type of information.
PointMatcher< T >::TransformationParameters TransformationParameters
alias
std::map< std::string, std::vector< std::string > > CsvElements
Data from a CSV file.
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dense matrix over ScalarType.
PointMatcher< T >::Vector Vector
alias
PLYProperty()
Default constructor. If used member values must be filled later.
static DataPoints loadPLY(const std::string &fileName)
Load polygon file format (ply) file.
static const SupportedLabels & getSupportedExternalLabels()
PMPropTypes pmType
type of information in PointMatcher
PointMatcher< T >::DataPoints::Label Label
alias
unsigned num
number of occurences of the element
PLYVertex(const unsigned num, const unsigned offset)
Constructor.
PLYProperties properties
all properties found in the header
Eigen::Matrix< T, 3, 1 > Vector3
alias
static void saveCSV(const DataPoints &data, const std::string &fileName)
Save point cloud to a file as CSV.
Information for a PCD property.
PMPropTypes type
type of information in PointMatcher
PMPropTypes pmType
type of information in PointMatcher
PointMatcher< T >::Matrix Matrix
alias
Labels labels
vector of labels used to cumulat information
Eigen::Matrix< unsigned int, Eigen::Dynamic, Eigen::Dynamic > low32
Matrix containing file data representing the low 32 bits.
std::string idx_type
for list properties, type of number of elements
bool operator==(const GTEST_10_TUPLE_(T)&t, const GTEST_10_TUPLE_(U)&u)
static void savePCD(const DataPoints &data, const std::string &fileName)
save datapoints to PCD point cloud format
unsigned start_col
column number at which descriptor starts
PointMatcher< T >::Int64Matrix Int64Matrix
alias
A structure to hold information about descriptors contained in a CSV file.
Eigen::Matrix< std::int64_t, Eigen::Dynamic, Eigen::Dynamic > Int64Matrix
A dense signed 64-bits matrix.
Information to exploit a reading from a file using this library. Fields might be left blank if unused...
PointMatcher< T >::Matrix Parameters
alias
unsigned total_props
total number of properties in PLY element
SupportedVTKDataTypes
Enumeration of legacy VTK data types that can be parsed.
unsigned nbDescriptors
number of valid descriptors found in the header
Storage for time loaded separatly.
unsigned nbFeatures
number of valid features found in the header
TransformationParameters groundTruthTransformation
matrix of the ground-truth transform
char type
Type: I: signed, U: unsigned, F: float.
std::pair< int, std::string > LabelAssociationPair
Pair feature column, feature name.
std::map< std::string, LabelAssociationPair > SublabelAssociationMap
static std::string getColLabel(const Label &label, const int row)
convert a descriptor label to an appropriate sub-label
Structure containing all information required to map external information to PointMatcher internal re...
A vector of file info, to be used in batch processing.
Generate a vector of Labels by checking for collision is the same name is reused. ...
Interface for PLY property.
PLYProperties::iterator it_PLYProp
Iterator for a vector of PLY properties.
PointMatcher< T >::DataPoints DataPoints
alias
int pmRowID
row id used in a DataPoints
PMPropTypes
Type of information in a DataPoints. Each type is stored in its own dense matrix. ...
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
A vector over ScalarType.
PCDproperty()
Empty constructor.
std::string internalName
name used in PointMatcher
Vector3 gravity
gravity vector
std::map< std::string, std::vector< PLYProperty > > PLYDescPropMap
Implementation of PLY vertex element.
Interface for all PLY elements.
std::string externalName
name used in external format
Matrix TransformationParameters
A matrix holding the parameters a transformation.
std::vector< PLYProperty > PLYProperties
Vector of properties specific to PLY files.
unsigned offset
line at which data starts
static DataPoints loadVTK(const std::string &fileName)
Load point cloud from a file as VTK.
SupportedLabel(const std::string &internalName, const std::string &externalName, const PMPropTypes &type)
Constructor.