Classes | Public Types | Static Public Member Functions | List of all members
PointMatcherIO< T > Struct Template Reference

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...
 
struct  GenericInputHeader
 Helper structure designed to parse file headers. More...
 
class  LabelGenerator
 Generate a vector of Labels by checking for collision is the same name is reused. More...
 
struct  PCDheader
 All information contained in the header of a PCD file. More...
 
struct  PCDproperty
 Information for a PCD property. 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  SplitTime
 Storage for time loaded separatly. 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 More...
 
typedef PointMatcher< T >::Int64Matrix Int64Matrix
 alias More...
 
typedef PLYProperties::iterator it_PLYProp
 Iterator for a vector of PLY properties. More...
 
typedef PointMatcher< T >::DataPoints::Label Label
 alias More...
 
typedef std::pair< int, std::string > LabelAssociationPair
 Pair feature column, feature name. More...
 
typedef PointMatcher< T >::DataPoints::Labels Labels
 alias More...
 
typedef PointMatcher< T >::Matrix Matrix
 alias More...
 
typedef PointMatcher< T >::Matrix Parameters
 alias More...
 
typedef std::map< std::string, std::vector< PLYProperty > > PLYDescPropMap
 
typedef std::vector< PLYPropertyPLYProperties
 Vector of properties specific to PLY files. More...
 
enum  PMPropTypes { FEATURE, DESCRIPTOR, TIME, UNSUPPORTED }
 Type of information in a DataPoints. Each type is stored in its own dense matrix. More...
 
typedef std::map< std::string, LabelAssociationPairSublabelAssociationMap
 
typedef std::vector< SupportedLabelSupportedLabels
 Vector of supported labels in PointMatcher and their external names. More...
 
enum  SupportedVTKDataTypes { POLYDATA, UNSTRUCTURED_GRID }
 Enumeration of legacy VTK data types that can be parsed. More...
 
typedef PointMatcher< T >::TransformationParameters TransformationParameters
 alias More...
 
typedef PointMatcher< T >::Vector Vector
 alias More...
 

Static Public Member Functions

static std::string getColLabel (const Label &label, const int row)
 convert a descriptor label to an appropriate sub-label More...
 
static const SupportedLabelsgetSupportedExternalLabels ()
 
static DataPoints loadCSV (const std::string &fileName)
 Associate an external name to a DataPoints type of information. More...
 
static DataPoints loadCSV (std::istream &is)
 Load comma separated values (csv) file. More...
 
static DataPoints loadPCD (const std::string &fileName)
 
static DataPoints loadPCD (std::istream &is)
 Load PCD file. More...
 
static DataPoints loadPLY (const std::string &fileName)
 Load polygon file format (ply) file. More...
 
static DataPoints loadPLY (std::istream &is)
 Load polygon file format (PLY) file. More...
 
static DataPoints loadVTK (const std::string &fileName)
 Load point cloud from a file as VTK. More...
 
static DataPoints loadVTK (std::istream &is)
 Load point cloud from a stream as VTK. More...
 
static bool plyPropTypeValid (const std::string &type)
 Check that property defined by type is a valid PLY type note: type must be lowercase. More...
 
static void saveCSV (const DataPoints &data, const std::string &fileName, unsigned precision)
 Save point cloud to a file as CSV. More...
 
static void saveCSV (const DataPoints &data, std::ostream &os)
 Save point cloud to a stream as CSV. More...
 
static void savePCD (const DataPoints &data, const std::string &fileName, unsigned precision)
 save datapoints to PCD point cloud format More...
 
static void savePLY (const DataPoints &data, const std::string &fileName, unsigned precision)
 save datapoints to PLY point cloud format More...
 
static void saveVTK (const DataPoints &data, const std::string &fileName, bool binary=false, unsigned precision=7)
 Save point cloud to a file as VTK. More...
 

Detailed Description

template<typename T>
struct PointMatcherIO< T >

IO Functions and classes that are dependant on scalar type are defined in this templatized class.

Definition at line 43 of file IO.h.

Member Typedef Documentation

◆ DataPoints

template<typename T >
typedef PointMatcher<T>::DataPoints PointMatcherIO< T >::DataPoints

alias

Definition at line 48 of file IO.h.

◆ Int64Matrix

template<typename T >
typedef PointMatcher<T>::Int64Matrix PointMatcherIO< T >::Int64Matrix

alias

Definition at line 47 of file IO.h.

◆ it_PLYProp

template<typename T >
typedef PLYProperties::iterator PointMatcherIO< T >::it_PLYProp

Iterator for a vector of PLY properties.

Definition at line 299 of file IO.h.

◆ Label

template<typename T >
typedef PointMatcher<T>::DataPoints::Label PointMatcherIO< T >::Label

alias

Definition at line 51 of file IO.h.

◆ LabelAssociationPair

template<typename T >
typedef std::pair<int, std::string > PointMatcherIO< T >::LabelAssociationPair

Pair feature column, feature name.

Definition at line 55 of file IO.h.

◆ Labels

template<typename T >
typedef PointMatcher<T>::DataPoints::Labels PointMatcherIO< T >::Labels

alias

Definition at line 52 of file IO.h.

◆ Matrix

template<typename T >
typedef PointMatcher<T>::Matrix PointMatcherIO< T >::Matrix

alias

Definition at line 46 of file IO.h.

◆ Parameters

template<typename T >
typedef PointMatcher<T>::Matrix PointMatcherIO< T >::Parameters

alias

Definition at line 50 of file IO.h.

◆ PLYDescPropMap

template<typename T >
typedef std::map<std::string, std::vector<PLYProperty> > PointMatcherIO< T >::PLYDescPropMap

Map from a descriptor name to a list PLY property ex: "normals" -> nx, ny ,nz

Definition at line 293 of file IO.h.

◆ PLYProperties

template<typename T >
typedef std::vector<PLYProperty> PointMatcherIO< T >::PLYProperties

Vector of properties specific to PLY files.

Definition at line 296 of file IO.h.

◆ SublabelAssociationMap

template<typename T >
typedef std::map<std::string, LabelAssociationPair > PointMatcherIO< T >::SublabelAssociationMap

Map to associate common descriptor sublabels to PM descriptor matrix row and labels ex: nx, ny, nz are associated with (0,normals) (1,normals) (2,normals) respectively

Definition at line 59 of file IO.h.

◆ SupportedLabels

template<typename T >
typedef std::vector<SupportedLabel> PointMatcherIO< T >::SupportedLabels

Vector of supported labels in PointMatcher and their external names.

Definition at line 84 of file IO.h.

◆ TransformationParameters

alias

Definition at line 49 of file IO.h.

◆ Vector

template<typename T >
typedef PointMatcher<T>::Vector PointMatcherIO< T >::Vector

alias

Definition at line 45 of file IO.h.

Member Enumeration Documentation

◆ PMPropTypes

template<typename T >
enum PointMatcherIO::PMPropTypes

Type of information in a DataPoints. Each type is stored in its own dense matrix.

Enumerator
FEATURE 
DESCRIPTOR 
TIME 
UNSUPPORTED 

Definition at line 64 of file IO.h.

◆ SupportedVTKDataTypes

template<typename T >
enum PointMatcherIO::SupportedVTKDataTypes

Enumeration of legacy VTK data types that can be parsed.

Enumerator
POLYDATA 
UNSTRUCTURED_GRID 

Definition at line 191 of file IO.h.

Member Function Documentation

◆ getColLabel()

template<typename T >
std::string PointMatcherIO< T >::getColLabel ( const Label label,
const int  row 
)
static

convert a descriptor label to an appropriate sub-label

Definition at line 469 of file pointmatcher/IO.cpp.

◆ getSupportedExternalLabels()

template<typename T >
static const SupportedLabels& PointMatcherIO< T >::getSupportedExternalLabels ( )
inlinestatic

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.

Definition at line 117 of file IO.h.

◆ loadCSV() [1/2]

template<typename T >
template PointMatcher< double >::DataPoints PointMatcherIO< T >::loadCSV ( const std::string &  fileName)
static

Associate an external name to a DataPoints type of information.

Load comma separated values (csv) file.

Parameters
fileNamea 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:

  • there is a header with columns named x, y and optionnaly z
  • there are only 2 or 3 columns in the file

Otherwise, the user is asked to enter column id manually which might block automatic processing.

Definition at line 408 of file pointmatcher/IO.cpp.

◆ loadCSV() [2/2]

template<typename T >
PointMatcher< T >::DataPoints PointMatcherIO< T >::loadCSV ( std::istream &  is)
static

Load comma separated values (csv) file.

See also
loadCSV()

Definition at line 535 of file pointmatcher/IO.cpp.

◆ loadPCD() [1/2]

template<typename T >
static DataPoints PointMatcherIO< T >::loadPCD ( const std::string &  fileName)
static

◆ loadPCD() [2/2]

template<typename T >
PointMatcherIO< T >::DataPoints PointMatcherIO< T >::loadPCD ( std::istream &  is)
static

Load PCD file.

See also
loadPCD()

Definition at line 1867 of file pointmatcher/IO.cpp.

◆ loadPLY() [1/2]

template<typename T >
PointMatcherIO< T >::DataPoints PointMatcherIO< T >::loadPLY ( const std::string &  fileName)
static

Load polygon file format (ply) file.

Parameters
fileNamea 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 1289 of file pointmatcher/IO.cpp.

◆ loadPLY() [2/2]

template<typename T >
PointMatcherIO< T >::DataPoints PointMatcherIO< T >::loadPLY ( std::istream &  is)
static

Load polygon file format (PLY) file.

See also
loadPLY()

Definition at line 1305 of file pointmatcher/IO.cpp.

◆ loadVTK() [1/2]

template<typename T >
template PointMatcherIO< double >::DataPoints PointMatcherIO< T >::loadVTK ( const std::string &  fileName)
static

Load point cloud from a file as VTK.

Definition at line 911 of file pointmatcher/IO.cpp.

◆ loadVTK() [2/2]

template<typename T >
PointMatcher< T >::DataPoints PointMatcherIO< T >::loadVTK ( std::istream &  is)
static

Load point cloud from a stream as VTK.

Definition at line 950 of file pointmatcher/IO.cpp.

◆ plyPropTypeValid()

template<typename T >
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 1826 of file pointmatcher/IO.cpp.

◆ saveCSV() [1/2]

template<typename T >
template void PointMatcherIO< T >::saveCSV ( const DataPoints data,
const std::string &  fileName,
unsigned  precision 
)
static

Save point cloud to a file as CSV.

Definition at line 836 of file pointmatcher/IO.cpp.

◆ saveCSV() [2/2]

template<typename T >
void PointMatcherIO< T >::saveCSV ( const DataPoints data,
std::ostream &  os 
)
static

Save point cloud to a stream as CSV.

Definition at line 847 of file pointmatcher/IO.cpp.

◆ savePCD()

template<typename T >
template void PointMatcherIO< T >::savePCD ( const DataPoints data,
const std::string &  fileName,
unsigned  precision 
)
static

save datapoints to PCD point cloud format

Definition at line 2260 of file pointmatcher/IO.cpp.

◆ savePLY()

template<typename T >
template void PointMatcherIO< T >::savePLY ( const DataPoints data,
const std::string &  fileName,
unsigned  precision 
)
static

save datapoints to PLY point cloud format

Definition at line 1655 of file pointmatcher/IO.cpp.

◆ saveVTK()

template<typename T >
template void PointMatcherIO< T >::saveVTK ( const DataPoints data,
const std::string &  fileName,
bool  binary = false,
unsigned  precision = 7 
)
static

Save point cloud to a file as VTK.

Definition at line 1262 of file pointmatcher/IO.cpp.


The documentation for this struct was generated from the following files:


libpointmatcher
Author(s):
autogenerated on Mon Sep 16 2024 02:24:11