Volume Cartographer
2.27.0
vc
core
io
MeshIO.hpp
1
#pragma once
2
3
#include <optional>
4
#include <string>
5
6
#include <opencv2/core.hpp>
7
8
#include "
vc/core/filesystem.hpp
"
9
#include "
vc/core/types/ITKMesh.hpp
"
10
#include "
vc/core/types/UVMap.hpp
"
11
12
namespace
volcart
13
{
14
16
struct
MeshReaderResult
{
18
ITKMesh::Pointer
mesh
;
20
UVMap::Pointer
uv
;
22
cv::Mat
texture
;
23
};
24
33
auto
ReadMesh
(
const
filesystem::path& path) ->
MeshReaderResult
;
34
36
struct
MeshWriterOpts
{
37
std::string imgFmt{
"tif"
};
38
};
39
52
void
WriteMesh
(
53
const
filesystem::path& path,
54
const
ITKMesh::Pointer& mesh,
55
const
UVMap::Pointer
& uv =
nullptr
,
56
const
cv::Mat& texture = cv::Mat(),
57
const
MeshWriterOpts
& opts = {});
58
}
// namespace volcart
ITKMesh.hpp
UVMap.hpp
volcart::UVMap::Pointer
std::shared_ptr< UVMap > Pointer
Definition:
UVMap.hpp:55
filesystem.hpp
volcart
Volume Cartographer library
volcart::WriteMesh
void WriteMesh(const filesystem::path &path, const ITKMesh::Pointer &mesh, const UVMap::Pointer &uv=nullptr, const cv::Mat &texture=cv::Mat(), const MeshWriterOpts &opts={})
Write a mesh to a file.
volcart::ReadMesh
auto ReadMesh(const filesystem::path &path) -> MeshReaderResult
Read a mesh from a file.
volcart::MeshReaderResult
Result for ReadMesh.
Definition:
MeshIO.hpp:16
volcart::MeshReaderResult::mesh
ITKMesh::Pointer mesh
Definition:
MeshIO.hpp:18
volcart::MeshReaderResult::texture
cv::Mat texture
Definition:
MeshIO.hpp:22
volcart::MeshReaderResult::uv
UVMap::Pointer uv
Definition:
MeshIO.hpp:20
volcart::MeshWriterOpts
General options for WriteMesh.
Definition:
MeshIO.hpp:36
Generated by
1.9.4