15 #ifndef niftkMeshSmoother_h
16 #define niftkMeshSmoother_h
18 #include <mitkLogMacros.h>
26 #include "niftkCoreExports.h"
37 using std::setiosflags;
47 using std::numeric_limits;
162 void GenerateVertexAndTriangleNormals(
void);
164 void ReOrientFaces(
void);
167 bool LoadFromBinarySTL(
const char *
const file_name,
const bool generate_normals =
true,
const size_t buffer_width = 65536);
170 void SetMaxExtent(
float max_extent);
173 void RescaleMesh(
double scale_value);
176 void TaubinSmooth(
const float lambda,
const float mu,
const size_t steps);
178 void FixCracks(
void);
190 void LaplaceSmooth(
const float scale);
192 void CurvatureNormalSmooth(
const float scale);
194 void InverseEdgeLengthSmooth(
const float scale);
197 void GenerateVertexNormals(
void);
199 void GenerateTriangleNormals(
void);
201 void RegenerateVertexAndTriangleNormalsIfExists(
void);
204 template<
typename T>
void EliminateVectorDuplicates(std::vector<T> &
v);
206 bool MergeVertexPair(
const size_t keeper,
const size_t goner);
209 int m_SmoothingMethod;
212 std::vector<BasicVec3D> m_VertexNormals;
213 std::vector<BasicVec3D> m_TriangleNormals;
float GetCoordZ()
Get Z coordinate of the vertex.
Definition: niftkBasicVertex.h:135
ordered_indexed_edge(const BasicVertex &a, const BasicVertex &b)
Definition: niftkMeshSmoother.h:102
GLenum GLenum GLenum GLenum GLenum scale
Definition: glew.h:12017
int GetIndex() const
Get index of the current vertex.
Definition: niftkBasicVertex.h:215
float GetCoordX()
Get X coordinate of the vertex.
Definition: niftkBasicVertex.h:131
Utility class for storing an ordered pair of vertex indices.
Definition: niftkMeshSmoother.h:60
BasicVec3D centre_point
Definition: niftkMeshSmoother.h:136
bool operator<(const ordered_indexed_edge &right) const
Definition: niftkMeshSmoother.h:120
GLuint const GLfloat * val
Definition: glew.h:2691
bool GetFlipNormals(void)
Get the flip normals flag.
Definition: niftkMeshSmoother.h:186
Utility class for storing an ordered edge.
Definition: niftkMeshSmoother.h:99
void SetZ(float z)
Sets the Z coordinate of the vector.
Definition: niftkBasicVec3D.h:123
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
Definition: glew.h:1363
float GetCoordY()
Get Y coordinate of the vertex.
Definition: niftkBasicVertex.h:133
void SetX(float x)
Sets the X coordinate of the vector.
Definition: niftkBasicVec3D.h:113
GLdouble GLdouble GLdouble b
Definition: glew.h:7885
void SetY(float y)
Sets the Y coordinate of the vector.
Definition: niftkBasicVec3D.h:118
vcl_size_t id
Definition: niftkMeshSmoother.h:137
const GLdouble * v
Definition: glew.h:1375
vcl_size_t indices[2]
Definition: niftkMeshSmoother.h:135
GLboolean GLboolean GLboolean GLboolean a
Definition: glew.h:8272
vcl_size_t indices[2]
Definition: niftkMeshSmoother.h:92
bool operator<(const ordered_size_t_pair &right) const
Definition: niftkMeshSmoother.h:77
ordered_size_t_pair(const vcl_size_t &a, const vcl_size_t &b)
Definition: niftkMeshSmoother.h:63
void SetFlipNormals(bool val)
Set the flip normals flag.
Definition: niftkMeshSmoother.h:184
Simple vertex implementation that is used in the Surface Extraction and surface smoothing and decimat...
Definition: niftkBasicVertex.h:77
void SetSmoothingMethod(int val)
Select smoothing method. 0- Classic Laplacian, 1 - Inverse Edge Length, 2 - Curvature Normal...
Definition: niftkMeshSmoother.h:181
This class implements various mesh smoothing algorithms and it can be used to (re)compute surface and...
Definition: niftkMeshSmoother.h:147
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: glew.h:1237
Container class for passing around data structures containing a mesh.
Definition: niftkCMC33.h:61
Simple 3D Vector implementation that is used in the Surface Extraction and surface smoothing and deci...
Definition: niftkBasicVec3D.h:30
Definition: niftkExceptionObject.h:21
GLclampf f
Definition: glew.h:3136