| Volume Cartographer 2.28.0
    | 
Write an ITKMesh to a PLY file. More...
#include <vc/core/io/PLYWriter.hpp>
| Public Member Functions | |
| PLYWriter ()=default | |
| Default constructor. | |
| PLYWriter (filesystem::path outputPath, ITKMesh::Pointer mesh) | |
| Constructor with output path and input mesh. | |
| PLYWriter (filesystem::path outputPath, ITKMesh::Pointer mesh, cv::Mat texture) | |
| Constructor with output path and textured mesh information. | |
| void | setPath (const filesystem::path &path) | 
| Set the output path.  More... | |
| void | setMesh (ITKMesh::Pointer mesh) | 
| Set the input mesh. | |
| void | setUVMap (UVMap::Pointer uvMap) | 
| Set the input UV Map. | |
| void | setTexture (cv::Mat texture) | 
| Set texture image. | |
| void | setVertexColors (const std::vector< std::uint16_t > &c) | 
| Set per-vertex color information. | |
| void | write () | 
| Write the PLY to disk.  More... | |
| Private Member Functions | |
| void | write_header_ () | 
| Write the PLY header. | |
| void | write_vertices_ () | 
| Write the PLY vertices.  More... | |
| void | write_faces_ () | 
| Write the PLY faces.  More... | |
| Private Attributes | |
| filesystem::path | outputPath_ | 
| std::ofstream | outputMesh_ | 
| ITKMesh::Pointer | mesh_ | 
| UVMap::Pointer | uvMap_ | 
| cv::Mat | texture_ | 
| std::vector< std::uint16_t > | vcolors_ | 
Write an ITKMesh to a PLY file.
Writes both textured and untextured meshes in ASCII PLY format. Texture information is automatically written if the volcart::Texture has images and if the UV map is set and is not empty.
Assumes that vertices have vertex normal information.
Definition at line 31 of file PLYWriter.hpp.
| void volcart::io::PLYWriter::setPath | ( | const filesystem::path & | path | ) | 
Set the output path.
write() and validate() will fail if path does not have an expected file extension (.ply/.PLY).
| void volcart::io::PLYWriter::write | ( | ) | 
Write the PLY to disk.
If UV Map is not empty, automatically writes per-vertex texture information.
| volcart::IOException | 
| 
 | private | 
Write the PLY faces.
Lines are formatted:
[n vertices in face] v1 v2 ... vn 
| 
 | private | 
Write the PLY vertices.
Lines are formatted:
x y z nx ny nz 
| 
 | private | 
Input mesh
Definition at line 85 of file PLYWriter.hpp.
| 
 | private | 
Output file stream
Definition at line 83 of file PLYWriter.hpp.
| 
 | private | 
Output file path
Definition at line 81 of file PLYWriter.hpp.
| 
 | private | 
Input texture image
Definition at line 89 of file PLYWriter.hpp.
| 
 | private | 
Input UV map
Definition at line 87 of file PLYWriter.hpp.
| 
 | private | 
Vertex colors
Definition at line 91 of file PLYWriter.hpp.