8#include <opencv2/core.hpp>
39 PLYWriter(filesystem::path outputPath, ITKMesh::Pointer mesh);
43 filesystem::path outputPath, ITKMesh::Pointer mesh, cv::Mat texture);
52 void setPath(
const filesystem::path& path);
std::shared_ptr< UVMap > Pointer
Write an ITKMesh to a PLY file.
PLYWriter(filesystem::path outputPath, ITKMesh::Pointer mesh, cv::Mat texture)
Constructor with output path and textured mesh information.
void write()
Write the PLY to disk.
void setUVMap(UVMap::Pointer uvMap)
Set the input UV Map.
std::ofstream outputMesh_
void write_vertices_()
Write the PLY vertices.
void setMesh(ITKMesh::Pointer mesh)
Set the input mesh.
void setPath(const filesystem::path &path)
Set the output path.
void write_header_()
Write the PLY header.
PLYWriter()=default
Default constructor.
filesystem::path outputPath_
std::vector< std::uint16_t > vcolors_
PLYWriter(filesystem::path outputPath, ITKMesh::Pointer mesh)
Constructor with output path and input mesh.
void write_faces_()
Write the PLY faces.
void setTexture(cv::Mat texture)
Set texture image.
void setVertexColors(const std::vector< std::uint16_t > &c)
Set per-vertex color information.