Volume Cartographer 2.27.0
OrientNormals.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <opencv2/core.hpp>
6
8
9namespace volcart::meshing
10{
11
23{
24public:
26 enum class ReferenceMode {
27 Centroid,
28 Manual
29 };
30
32 OrientNormals() = default;
33
35 void setMesh(const ITKMesh::Pointer& mesh);
36
38 [[nodiscard]] auto getMesh() const -> ITKMesh::Pointer;
39
47
49 [[nodiscard]] auto referenceMode() const -> ReferenceMode;
50
57 void setReferencePoint(const cv::Vec3d& point);
58
60 [[nodiscard]] auto referencePoint() const -> cv::Vec3d;
61
63 auto compute() -> ITKMesh::Pointer;
64
65private:
67 ITKMesh::Pointer input_;
71 cv::Vec3d refPt_;
73 ITKMesh::Pointer output_;
74};
75} // namespace volcart::meshing
Orient vertex normals towards a reference point.
auto referenceMode() const -> ReferenceMode
Get the current reference mode.
void setMesh(const ITKMesh::Pointer &mesh)
Set the input mesh.
void setReferenceMode(ReferenceMode mode)
Set reference point mode.
auto referencePoint() const -> cv::Vec3d
Get the manually defined reference point.
auto compute() -> ITKMesh::Pointer
Compute vertex normal reorientation.
OrientNormals()=default
Default constructor.
void setReferencePoint(const cv::Vec3d &point)
Set manual reference point.
ReferenceMode
Reference point mode.
@ Centroid
Mesh centroid reference point for convex meshes.
auto getMesh() const -> ITKMesh::Pointer
Get the output mesh with updated normals.
Mesh generation and modification library.
itk::Mesh< ITKPixel, 3, ITKMeshTraits > ITKMesh
Definition: ITKMesh.hpp:22