PLYIO.hpp
Go to the documentation of this file.
1 
41 #ifndef __PLY_IO_H__
42 #define __PLY_IO_H__
43 
44 #include "lvr2/io/BaseIO.hpp"
45 
46 #include <rply.h>
47 #include <stdint.h>
48 #include <cstdio>
49 #include <vector>
50 
51 #include <locale.h>
52 
53 namespace lvr2
54 {
55 
104 class PLYIO : public BaseIO
105 {
106  public:
111  {
112  setlocale (LC_ALL, "C");
113  m_model.reset();
114  }
115 
116  ~PLYIO() {}
117 
118 
127  void save( string filename );
128 
129  void save(ModelPtr model, string filename)
130  {
131  m_model = model;
132  save(filename);
133  }
134 
135 
150  ModelPtr read( string filename, bool readColor, bool readConfidence = true,
151  bool readIntensity = true, bool readNormals = true,
152  bool readFaces = true, bool readPanoramaCoords = true );
153 
154 
162  ModelPtr read( string filename );
163 
164 
165  private:
166 
167 
172  static int readVertexCb( p_ply_argument argument );
173 
174 
179  static int readColorCb( p_ply_argument argument );
180 
181 
186  static int readFaceCb( p_ply_argument argument );
187 
188 
193  static int readPanoramaCoordCB( p_ply_argument argument );
194 
195 };
196 
197 } // namespace lvr2
198 
199 #endif
lvr2::PLYIO::readPanoramaCoordCB
static int readPanoramaCoordCB(p_ply_argument argument)
Callback for read panorama coords.
Definition: PLYIO.cpp:971
t_ply_argument_
Definition: rply.c:98
lvr2::PLYIO::read
ModelPtr read(string filename, bool readColor, bool readConfidence=true, bool readIntensity=true, bool readNormals=true, bool readFaces=true, bool readPanoramaCoords=true)
Read specified PLY file.
Definition: PLYIO.cpp:419
lvr2::PLYIO::readColorCb
static int readColorCb(p_ply_argument argument)
Callback for read color information.
Definition: PLYIO.cpp:935
lvr2::PLYIO::~PLYIO
~PLYIO()
Definition: PLYIO.hpp:116
rply.h
scripts.normalize_multiple.filename
filename
Definition: normalize_multiple.py:60
lvr2::PLYIO::save
void save(ModelPtr model, string filename)
Definition: PLYIO.hpp:129
lvr2::PLYIO::readVertexCb
static int readVertexCb(p_ply_argument argument)
Callback for read vertices.
Definition: PLYIO.cpp:924
lvr2::BaseIO::m_model
ModelPtr m_model
Definition: BaseIO.hpp:104
lvr2::PLYIO
A class for input and output to ply files.
Definition: PLYIO.hpp:104
BaseIO.hpp
Base interface for all I/O related classes.
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::ModelPtr
std::shared_ptr< Model > ModelPtr
Definition: Model.hpp:80
lvr2::PLYIO::save
void save(string filename)
Save PLY with previously specified data.
Definition: PLYIO.cpp:57
lvr2::PLYIO::PLYIO
PLYIO()
Constructor.
Definition: PLYIO.hpp:110
lvr2::PLYIO::readFaceCb
static int readFaceCb(p_ply_argument argument)
Callback for read faces.
Definition: PLYIO.cpp:947
lvr2::BaseIO
Interface specification for low-level io. All read elements are stored in linear arrays.
Definition: BaseIO.hpp:57


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24