Volume Cartographer 2.27.0
CalculateNormals.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <iostream>
6
7#include <opencv2/core.hpp>
8
10
11namespace volcart::meshing
12{
26{
27public:
28 //** @name Constructors */
30 CalculateNormals() = default;
31
35 explicit CalculateNormals(const ITKMesh::Pointer& mesh);
37
38 //** @name Input/Output */
40
44 void setMesh(const ITKMesh::Pointer& mesh);
45
49 ITKMesh::Pointer getMesh() const { return output_; }
51
55 ITKMesh::Pointer compute();
56
57private:
65
73
75 ITKMesh::Pointer input_;
76
78 ITKMesh::Pointer output_;
79
81 std::vector<cv::Vec3d> vertexNormals_;
82};
83} // namespace volcart::meshing
Calculate vertex normals for ITK Meshes.
void assign_to_mesh_()
Assign the summed normals to the output mesh.
std::vector< cv::Vec3d > vertexNormals_
ITKMesh::Pointer compute()
Compute vertex normals for the mesh.
CalculateNormals(const ITKMesh::Pointer &mesh)
ITKMesh::Pointer getMesh() const
Get the output mesh with computed normals.
void compute_normals_()
Compute normals for each vertex.
void setMesh(const ITKMesh::Pointer &mesh)
Set the input mesh.
Mesh generation and modification library.