Volume Cartographer 2.27.0
AngleBasedFlattening.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <cstddef>
6#include <memory>
7
8#include <opencv2/core.hpp>
9
13
14namespace volcart::texturing
15{
30{
31public:
33 static const std::size_t DEFAULT_ITERATIONS{10};
34
36 using Pointer = std::shared_ptr<AngleBasedFlattening>;
37
41
43 explicit AngleBasedFlattening(const ITKMesh::Pointer& m);
44
46 template <typename... Args>
47 static auto New(Args... args) -> Pointer
48 {
49 return std::make_shared<AngleBasedFlattening>(
50 std::forward<Args>(args)...);
51 }
52
54 ~AngleBasedFlattening() override = default;
64 void setUseABF(bool a);
65
67 [[nodiscard]] auto useABF() const -> bool;
68
70 void setABFMaxIterations(std::size_t i);
71
73 [[nodiscard]] auto abfMaxIterations() const -> std::size_t;
78 auto compute() -> ITKMesh::Pointer override;
81private:
83 bool useABF_{true};
86};
87} // namespace volcart::texturing
void setUseABF(bool a)
Whether to perform Angle-based flattening computation.
auto useABF() const -> bool
Whether Angle-based flattening is performed.
auto compute() -> ITKMesh::Pointer override
Compute the parameterization.
std::shared_ptr< AngleBasedFlattening > Pointer
void setABFMaxIterations(std::size_t i)
The max number of ABF minimization iterations.
static auto New(Args... args) -> Pointer
AngleBasedFlattening(const ITKMesh::Pointer &m)
Construct and set the input mesh.
AngleBasedFlattening()=default
Default constructor.
auto abfMaxIterations() const -> std::size_t
The max number of ABF minimization iterations.
Texturing and parameterization algorithms and utilities library.
itk::Mesh< ITKPixel, 3, ITKMeshTraits > ITKMesh
Definition: ITKMesh.hpp:22