Go to the documentation of this file.
36 #ifndef __POINTMATCHER_IO_H
37 #define __POINTMATCHER_IO_H
109 this->matrixRowId = 0;
133 {
"observationDirections",
"observationDirections0",
DESCRIPTOR},
134 {
"observationDirections",
"observationDirections1",
DESCRIPTOR},
135 {
"observationDirections",
"observationDirections2",
DESCRIPTOR},
154 {
"time",
"time",
TIME}
202 Eigen::Matrix<unsigned int, Eigen::Dynamic, Eigen::Dynamic>
high32;
205 Eigen::Matrix<unsigned int, Eigen::Dynamic, Eigen::Dynamic>
low32;
403 viewPoint = Eigen::Matrix<T, 7, 1>::Zero();
411 #endif // __POINTMATCHER_IO_H
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.
std::string name
name of descriptor
std::map< std::string, std::vector< PLYProperty > > PLYDescPropMap
std::string idx_type
for list properties, type of number of elements
std::pair< int, std::string > LabelAssociationPair
Pair feature column, feature name.
Implementation of PLY vertex element.
Eigen::Matrix< unsigned int, Eigen::Dynamic, Eigen::Dynamic > high32
Matrix containing file data representing the high 32 bits.
unsigned pos
index of the property in element
bool is_list
member is true of property is a list
PLYElement(const std::string &name, const unsigned num, const unsigned offset)
PLY Element constructor.
static DataPoints loadVTK(const std::string &fileName)
Load point cloud from a file as VTK.
PointMatcher< T >::DataPoints::Labels Labels
alias
std::string name
name identifying the PLY element
Labels getLabels() const
Return the vector of labels used to build a DataPoints.
TransformationParameters getTransform(const PointMatcherSupport::CsvElements &data, const std::string &prefix, unsigned dim, unsigned line)
Return the transformation named prefix from data.
PMPropTypes pmType
type of information in PointMatcher
char type
Type: I: signed, U: unsigned, F: float.
std::map< std::string, std::vector< std::string > > CsvElements
Data from a CSV file.
TransformationParameters groundTruthTransformation
matrix of the ground-truth transform
std::string externalName
name used in external format
std::string readingFileName
file name of the reading point cloud
unsigned num
number of occurences of the element
Storage for time loaded separatly.
Vector3 gravity
gravity vector
static void savePLY(const DataPoints &data, const std::string &fileName, unsigned precision)
save datapoints to PLY point cloud format
Interface for PLY property.
bool operator==(const PLYProperty &other) const
list prop ctor
SupportedLabel(const std::string &internalName, const std::string &externalName, const PMPropTypes &type)
Constructor.
unsigned span
number of columns spanned by descriptor
std::string referenceFileName
file name of the reference point cloud
Interface for all PLY elements.
std::string type
type of PLY property
SupportedVTKDataTypes
Enumeration of legacy VTK data types that can be parsed.
int pmRowID
row id used in a DataPoints
bool findTransform(const PointMatcherSupport::CsvElements &data, const std::string &prefix, unsigned dim)
Return whether there is a valid transformation named prefix in data.
PMPropTypes type
type of information in PointMatcher
bool isHigh32Found
was the high 32bits found in the file
unsigned start_col
column number at which descriptor starts
PCDproperty()
Empty constructor.
std::string field
Name of the property.
Eigen::Matrix< std::int64_t, Eigen::Dynamic, Eigen::Dynamic > Int64Matrix
A dense signed 64-bits matrix.
PLYProperty(const std::string &type, const std::string &name, const unsigned pos)
@(brief) Regular PLY property constructor
static DataPoints loadCSV(const std::string &fileName)
Associate an external name to a DataPoints type of information.
PointMatcher< T >::Vector Vector
alias
static DataPoints loadPLY(const std::string &fileName)
Load polygon file format (ply) file.
std::string name
name of PLY property
PointMatcher< T >::Matrix Parameters
alias
std::vector< SupportedLabel > SupportedLabels
Vector of supported labels in PointMatcher and their external names.
PLYProperties::iterator it_PLYProp
Iterator for a vector of PLY properties.
std::string internalName
name used in PointMatcher
std::string configFileName
file name of the yaml configuration
PMPropTypes
Type of information in a DataPoints. Each type is stored in its own dense matrix.
bool operator==(const PLYElement &other) const
comparison operator for elements
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dense matrix over ScalarType.
A vector of file info, to be used in batch processing.
std::string localToGlobalFileName(const std::string &path, const std::string &fileName)
Join parentPath and fileName and return the result as a global path.
PLYProperties properties
all properties found in the header
PointMatcher< T >::Matrix Matrix
alias
Structure containing all information required to map external information to PointMatcher internal re...
void add(const std::string internalName)
add a name to the vector of labels. If already there, will increament the dimension.
static void saveCSV(const DataPoints &data, const std::string &fileName, unsigned precision)
Save point cloud to a file as CSV.
unsigned nbDescriptors
number of valid descriptors found in the header
std::vector< PLYProperty > PLYProperties
Vector of properties specific to PLY files.
static std::string getColLabel(const Label &label, const int row)
convert a descriptor label to an appropriate sub-label
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
A vector over ScalarType.
PointMatcher< T >::TransformationParameters TransformationParameters
alias
PointMatcher< T >::Int64Matrix Int64Matrix
alias
static const SupportedLabels & getSupportedExternalLabels()
A structure to hold information about descriptors contained in a CSV file.
PointMatcher< T >::DataPoints::Label Label
alias
unsigned total_props
total number of properties in PLY element
TransformationParameters initialTransformation
matrix of initial estimate transform
Information to exploit a reading from a file using this library. Fields might be left blank if unused...
static void savePCD(const DataPoints &data, const std::string &fileName, unsigned precision)
save datapoints to PCD point cloud format
Eigen::Matrix< unsigned int, Eigen::Dynamic, Eigen::Dynamic > low32
Matrix containing file data representing the low 32 bits.
unsigned nbFeatures
number of valid features found in the header
int pmRowID
row id used in a DataPoints
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
static void saveVTK(const DataPoints &data, const std::string &fileName, bool binary=false, unsigned precision=7)
Save point cloud to a file as VTK.
Labels labels
vector of labels used to cumulat information
Factory for PLY elements.
PLYVertex(const unsigned num, const unsigned offset)
Constructor.
static ElementTypes getElementType(const std::string &elem_name)
std::map< std::string, LabelAssociationPair > SublabelAssociationMap
Information for a PCD property.
bool elementSupported(const std::string &elem_name)
returns true if element named elem_name is supported by this parser
unsigned int count
number of dimension
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.
unsigned offset
line at which data starts
Eigen::Matrix< T, 3, 1 > Vector3
alias
static bool plyPropTypeValid(const std::string &type)
Check that property defined by type is a valid PLY type note: type must be lowercase.
PointMatcher< T >::DataPoints DataPoints
alias
static DataPoints loadPCD(const std::string &fileName)
Matrix TransformationParameters
A matrix holding the parameters a transformation.
PMPropTypes pmType
type of information in PointMatcher
The name for a certain number of dim.
Generate a vector of Labels by checking for collision is the same name is reused.