Volume Cartographer 2.27.0
|
Read a PLY file to an ITKMesh. More...
#include <vc/core/io/PLYReader.hpp>
Private Member Functions | |
void | create_mesh_ () |
Construct outMesh_ from the temporary vertices and faces. | |
void | parse_header_ () |
Parse the PLY header. More... | |
void | read_faces_ () |
Fill the temporary face list with parsed face information. | |
void | read_points_ () |
Fill the temporary vertex list with parsed vertex information. | |
Private Attributes | |
filesystem::path | inputPath_ |
std::ifstream | plyFile_ |
ITKMesh::Pointer | outMesh_ |
std::string | line_ |
std::vector< SimpleMesh::Cell > | faceList_ |
std::vector< SimpleMesh::Vertex > | pointList_ |
std::vector< std::string > | elementsList_ |
int | numVertices_ |
int | numFaces_ |
std::vector< int > | skippedLine_ |
std::map< std::string, int > | properties_ |
bool | hasLeadingChar_ = true |
bool | hasPointNorm_ = false |
Read a PLY file to an ITKMesh.
Only supports vertices, vertex normals, and faces.
Definition at line 26 of file PLYReader.hpp.
|
private |
Parse the PLY header.
The header defines the expected layout for the body of the PLY file, including the count for each element (e.g. vertices, faces, etc). This information is stored in elementsList_ and used when reading in faces and vertices.
|
private |
List of elements parsed from the header
Definition at line 64 of file PLYReader.hpp.
|
private |
Temporary face list
Definition at line 60 of file PLYReader.hpp.
|
private |
Tracks if there is a leading character in front of each face line. This character tells how many vertices are in that face.
Definition at line 78 of file PLYReader.hpp.
|
private |
Track if there are vertex normals
Definition at line 81 of file PLYReader.hpp.
|
private |
Input file path
Definition at line 52 of file PLYReader.hpp.
|
private |
Line currently being parsed
Definition at line 58 of file PLYReader.hpp.
|
private |
Number of faces expected in the parsed mesh
Definition at line 68 of file PLYReader.hpp.
|
private |
Number of vertices expected in the parsed mesh
Definition at line 66 of file PLYReader.hpp.
|
private |
Output mesh
Definition at line 56 of file PLYReader.hpp.
|
private |
Input file stream
Definition at line 54 of file PLYReader.hpp.
|
private |
Temporary vertex list
Definition at line 62 of file PLYReader.hpp.
|
private |
Maps positions in a string to a particular attribute
Definition at line 72 of file PLYReader.hpp.
|
private |
Number of lines used by the elements we can't handle
Definition at line 70 of file PLYReader.hpp.