IO Functions and classes that are dependant on scalar type are defined in this templatized class. More...
#include <IO.h>
Classes | |
struct | CsvDescriptor |
A structure to hold information about descriptors contained in a CSV file. More... | |
struct | FileInfo |
Information to exploit a reading from a file using this library. Fields might be left blank if unused. More... | |
struct | FileInfoVector |
A vector of file info, to be used in batch processing. More... | |
class | LabelGenerator |
Generate a vector of Labels by checking for collision is the same name is reused. More... | |
class | PLYElement |
Interface for all PLY elements. More... | |
class | PLYElementF |
Factory for PLY elements. More... | |
struct | PLYProperty |
Interface for PLY property. More... | |
class | PLYVertex |
Implementation of PLY vertex element. More... | |
struct | SupportedLabel |
Structure containing all information required to map external information to PointMatcher internal representation. More... | |
Public Types | |
typedef PointMatcher< T > ::DataPoints | DataPoints |
alias | |
typedef PLYProperties::iterator | it_PLYProp |
Iterator for a vector of PLY properties. | |
typedef PointMatcher< T > ::DataPoints::Label | Label |
alias | |
typedef std::pair< int, std::string > | LabelAssociationPair |
Pair feature column, feature name. | |
typedef PointMatcher< T > ::DataPoints::Labels | Labels |
alias | |
typedef PointMatcher< T >::Matrix | Matrix |
alias | |
typedef PointMatcher< T >::Matrix | Parameters |
alias | |
typedef std::map< std::string, std::vector< PLYProperty > > | PLYDescPropMap |
typedef std::vector< PLYProperty > | PLYProperties |
Vector of properties specific to PLY files. | |
enum | PMPropTypes { FEATURE, DESCRIPTOR, UNSUPPORTED } |
Type of information in a DataPoints. Each type is stored in its own dense matrix. More... | |
typedef std::map< std::string, LabelAssociationPair > | SublabelAssociationMap |
typedef std::vector < SupportedLabel > | SupportedLabels |
Vector of supported labels in PointMatcher and their external names. | |
enum | SupportedVTKDataTypes { POLYDATA, UNSTRUCTURED_GRID } |
Enumeration of legacy VTK data types that can be parsed. More... | |
typedef PointMatcher< T > ::TransformationParameters | TransformationParameters |
alias | |
typedef PointMatcher< T >::Vector | Vector |
alias | |
Static Public Member Functions | |
static bool | descSublabelRegistered (const std::string &externalName) |
returns true if a particular descriptor dim label is registered (ie nx, red...) | |
static bool | featSublabelRegistered (const std::string &externalName) |
returns true if a particular feature dim label is registered (ie x, y...) | |
static std::string | getColLabel (const Label &label, const int row) |
convert a descriptor label to an appropriate sub-label | |
static SublabelAssociationMap | getDescAssocationMap () |
map to store association between common 1d descriptor labels and their PM label and span dimension | |
static LabelAssociationPair | getDescAssociationPair (const std::string &externalName) |
get PM descriptor label associated with sublabel | |
static SublabelAssociationMap | getFeatAssocationMap () |
map to store association between common 1d feature labels and their PM label and span dimension | |
static LabelAssociationPair | getFeatAssociationPair (const std::string &externalName) |
get PM feature label associated with sublabel | |
static PMPropTypes | getPMType (const std::string &externalName) |
Associate an external name to a DataPoints type of information. | |
static SupportedLabels | getSupportedExternalLabels () |
static DataPoints | loadCSV (const std::string &fileName) |
Return the type of information specific to a DataPoints based on a sulabel name. | |
static DataPoints | loadCSV (std::istream &is) |
Load comma separated values (csv) file. | |
static DataPoints | loadPCD (const std::string &fileName) |
static DataPoints | loadPCD (std::istream &is) |
Load PCD file. | |
static DataPoints | loadPLY (const std::string &fileName) |
Load polygon file format (ply) file. | |
static DataPoints | loadPLY (std::istream &is) |
Load polygon file format (PLY) file. | |
static DataPoints | loadVTK (const std::string &fileName) |
Load point cloud from a file as VTK. | |
static DataPoints | loadVTK (std::istream &is) |
Load point cloud from a stream as VTK. | |
static bool | plyPropTypeValid (const std::string &type) |
Check that property defined by type is a valid PLY type note: type must be lowercase. | |
static std::istream & | safeGetLine (std::istream &os, std::string &line) |
Replaces getline for handling windows style CR/LF line endings. | |
static void | saveCSV (const DataPoints &data, const std::string &fileName) |
Save point cloud to a file as CSV. | |
static void | saveCSV (const DataPoints &data, std::ostream &os) |
Save point cloud to a stream as CSV. | |
static void | savePCD (const DataPoints &data, const std::string &fileName) |
save datapoints to PCD point cloud format | |
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) |
Save point cloud to a file as VTK. |
IO Functions and classes that are dependant on scalar type are defined in this templatized class.
typedef PointMatcher<T>::DataPoints PointMatcherIO< T >::DataPoints |
typedef PLYProperties::iterator PointMatcherIO< T >::it_PLYProp |
typedef PointMatcher<T>::DataPoints::Label PointMatcherIO< T >::Label |
typedef std::pair<int, std::string > PointMatcherIO< T >::LabelAssociationPair |
typedef PointMatcher<T>::DataPoints::Labels PointMatcherIO< T >::Labels |
typedef PointMatcher<T>::Matrix PointMatcherIO< T >::Matrix |
typedef PointMatcher<T>::Matrix PointMatcherIO< T >::Parameters |
typedef std::map<std::string, std::vector<PLYProperty> > PointMatcherIO< T >::PLYDescPropMap |
typedef std::vector<PLYProperty> PointMatcherIO< T >::PLYProperties |
typedef std::map<std::string, LabelAssociationPair > PointMatcherIO< T >::SublabelAssociationMap |
typedef std::vector<SupportedLabel> PointMatcherIO< T >::SupportedLabels |
Vector of supported labels in PointMatcher and their external names.
typedef PointMatcher<T>::TransformationParameters PointMatcherIO< T >::TransformationParameters |
typedef PointMatcher<T>::Vector PointMatcherIO< T >::Vector |
enum PointMatcherIO::PMPropTypes |
enum PointMatcherIO::SupportedVTKDataTypes |
bool PointMatcherIO< T >::descSublabelRegistered | ( | const std::string & | externalName | ) | [static] |
returns true if a particular descriptor dim label is registered (ie nx, red...)
Definition at line 470 of file pointmatcher/IO.cpp.
bool PointMatcherIO< T >::featSublabelRegistered | ( | const std::string & | externalName | ) | [static] |
returns true if a particular feature dim label is registered (ie x, y...)
Definition at line 464 of file pointmatcher/IO.cpp.
std::string PointMatcherIO< T >::getColLabel | ( | const Label & | label, |
const int | row | ||
) | [static] |
convert a descriptor label to an appropriate sub-label
Definition at line 535 of file pointmatcher/IO.cpp.
PointMatcherIO< T >::SublabelAssociationMap PointMatcherIO< T >::getDescAssocationMap | ( | ) | [static] |
map to store association between common 1d descriptor labels and their PM label and span dimension
Definition at line 429 of file pointmatcher/IO.cpp.
PointMatcherIO< T >::LabelAssociationPair PointMatcherIO< T >::getDescAssociationPair | ( | const std::string & | externalName | ) | [static] |
get PM descriptor label associated with sublabel
Definition at line 482 of file pointmatcher/IO.cpp.
PointMatcherIO< T >::SublabelAssociationMap PointMatcherIO< T >::getFeatAssocationMap | ( | ) | [static] |
map to store association between common 1d feature labels and their PM label and span dimension
Definition at line 418 of file pointmatcher/IO.cpp.
PointMatcherIO< T >::LabelAssociationPair PointMatcherIO< T >::getFeatAssociationPair | ( | const std::string & | externalName | ) | [static] |
get PM feature label associated with sublabel
Definition at line 476 of file pointmatcher/IO.cpp.
PointMatcherIO< T >::PMPropTypes PointMatcherIO< T >::getPMType | ( | const std::string & | externalName | ) | [static] |
Associate an external name to a DataPoints type of information.
Definition at line 488 of file pointmatcher/IO.cpp.
static SupportedLabels PointMatcherIO< T >::getSupportedExternalLabels | ( | ) | [inline, static] |
Vector containing the mapping of all external names to PointMatcher representation. The order is important (i.e., nx before ny). This can also be used to remap 1D descriptor name to a better one.
template PointMatcher< double >::DataPoints PointMatcherIO< T >::loadCSV | ( | const std::string & | fileName | ) | [static] |
Return the type of information specific to a DataPoints based on a sulabel name.
Load comma separated values (csv) file.
fileName | a string containing the path and the file name |
This loader has 3 behaviors since there is no official standard for csv files. A 2D or 3D point cloud will be created automatically if:
Otherwise, the user is asked to enter column id manually which might block automatic processing.
Definition at line 400 of file pointmatcher/IO.cpp.
PointMatcher< T >::DataPoints PointMatcherIO< T >::loadCSV | ( | std::istream & | is | ) | [static] |
Load comma separated values (csv) file.
Definition at line 601 of file pointmatcher/IO.cpp.
static DataPoints PointMatcherIO< T >::loadPCD | ( | const std::string & | fileName | ) | [static] |
PointMatcherIO< T >::DataPoints PointMatcherIO< T >::loadPCD | ( | std::istream & | is | ) | [static] |
PointMatcherIO< T >::DataPoints PointMatcherIO< T >::loadPLY | ( | const std::string & | fileName | ) | [static] |
Load polygon file format (ply) file.
fileName | a string containing the path and the file name |
Note: that the PLY does not define a standard for point clouds Warning: Binary PLY files are not supported, only ASCII Only PLY files with elements named "vertex" are supported "vertex" should have 2 or 3 properties names "x", "y", "z" to define features.
Definition at line 1246 of file pointmatcher/IO.cpp.
PointMatcherIO< T >::DataPoints PointMatcherIO< T >::loadPLY | ( | std::istream & | is | ) | [static] |
Load polygon file format (PLY) file.
Definition at line 1262 of file pointmatcher/IO.cpp.
template PointMatcherIO< double >::DataPoints PointMatcherIO< T >::loadVTK | ( | const std::string & | fileName | ) | [static] |
Load point cloud from a file as VTK.
Definition at line 962 of file pointmatcher/IO.cpp.
PointMatcher< T >::DataPoints PointMatcherIO< T >::loadVTK | ( | std::istream & | is | ) | [static] |
Load point cloud from a stream as VTK.
Definition at line 972 of file pointmatcher/IO.cpp.
bool PointMatcherIO< T >::plyPropTypeValid | ( | const std::string & | type | ) | [static] |
Check that property defined by type is a valid PLY type note: type must be lowercase.
Definition at line 1758 of file pointmatcher/IO.cpp.
istream & PointMatcherIO< T >::safeGetLine | ( | std::istream & | os, |
std::string & | line | ||
) | [static] |
Replaces getline for handling windows style CR/LF line endings.
Definition at line 2208 of file pointmatcher/IO.cpp.
template void PointMatcherIO< T >::saveCSV | ( | const DataPoints & | data, |
const std::string & | fileName | ||
) | [static] |
Save point cloud to a file as CSV.
Definition at line 888 of file pointmatcher/IO.cpp.
void PointMatcherIO< T >::saveCSV | ( | const DataPoints & | data, |
std::ostream & | os | ||
) | [static] |
Save point cloud to a stream as CSV.
Definition at line 898 of file pointmatcher/IO.cpp.
template void PointMatcherIO< T >::savePCD | ( | const DataPoints & | data, |
const std::string & | fileName | ||
) | [static] |
save datapoints to PCD point cloud format
Definition at line 2112 of file pointmatcher/IO.cpp.
template void PointMatcherIO< T >::savePLY | ( | const DataPoints & | data, |
const std::string & | fileName | ||
) | [static] |
save datapoints to PLY point cloud format
Definition at line 1574 of file pointmatcher/IO.cpp.
template void PointMatcherIO< T >::saveVTK | ( | const DataPoints & | data, |
const std::string & | fileName | ||
) | [static] |
Save point cloud to a file as VTK.
Definition at line 1221 of file pointmatcher/IO.cpp.