NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | List of all members
niftk::MeshSmoother Class Reference

This class implements various mesh smoothing algorithms and it can be used to (re)compute surface and vertex normals of a BasicMesh structure. More...

Public Member Functions

 MeshSmoother ()
 Default constructor. More...
 
virtual ~MeshSmoother ()
 Destructor. More...
 
void Clear (void)
 Clear all internally stored data. More...
 
void InitWithExternalData (MeshData *data)
 Initialize the mesh smoother over a previously defined set of vertices and triangles. More...
 
void GenerateVertexAndTriangleNormals (void)
 Computes vertex and triangle normals over the whole mesh. More...
 
void ReOrientFaces (void)
 Re-orient triangle faces (CCW to CW) More...
 
bool LoadFromBinarySTL (const char *const file_name, const bool generate_normals=true, const vcl_size_t buffer_width=65536)
 Utility function to load stl for testing and verification. More...
 
void SetMaxExtent (float max_extent)
 Determines the current maximum extent of the mesh and re-scales all coordinates according to the new value. More...
 
void RescaleMesh (double scale_value)
 Re-scales all coordinates according to the scale parameter. More...
 
void TaubinSmooth (const float lambda, const float mu, const vcl_size_t steps)
 Implements Taubin's mesh smoothing algorithm. See: Geometric Signal Processing on Polygonal Meshes by G. Taubin. More...
 
void FixCracks (void)
 Implements algorihtm for fixing cracks in a mesh (happens with standard marchin cubes) More...
 
void SetSmoothingMethod (int val)
 Select smoothing method. 0- Classic Laplacian, 1 - Inverse Edge Length, 2 - Curvature Normal. More...
 
void SetFlipNormals (bool val)
 Set the flip normals flag. More...
 
bool GetFlipNormals (void)
 Get the flip normals flag. More...
 

Detailed Description

This class implements various mesh smoothing algorithms and it can be used to (re)compute surface and vertex normals of a BasicMesh structure.

Constructor & Destructor Documentation

niftk::MeshSmoother::MeshSmoother ( )

Default constructor.

niftk::MeshSmoother::~MeshSmoother ( )
virtual

Destructor.

Member Function Documentation

void niftk::MeshSmoother::Clear ( void  )

Clear all internally stored data.

void niftk::MeshSmoother::FixCracks ( void  )

Implements algorihtm for fixing cracks in a mesh (happens with standard marchin cubes)

void niftk::MeshSmoother::GenerateVertexAndTriangleNormals ( void  )

Computes vertex and triangle normals over the whole mesh.

bool niftk::MeshSmoother::GetFlipNormals ( void  )
inline

Get the flip normals flag.

void niftk::MeshSmoother::InitWithExternalData ( MeshData data)

Initialize the mesh smoother over a previously defined set of vertices and triangles.

bool niftk::MeshSmoother::LoadFromBinarySTL ( const char *const  file_name,
const bool  generate_normals = true,
const vcl_size_t  buffer_width = 65536 
)

Utility function to load stl for testing and verification.

void niftk::MeshSmoother::ReOrientFaces ( void  )

Re-orient triangle faces (CCW to CW)

void niftk::MeshSmoother::RescaleMesh ( double  scale_value)

Re-scales all coordinates according to the scale parameter.

void niftk::MeshSmoother::SetFlipNormals ( bool  val)
inline

Set the flip normals flag.

void niftk::MeshSmoother::SetMaxExtent ( float  max_extent)

Determines the current maximum extent of the mesh and re-scales all coordinates according to the new value.

void niftk::MeshSmoother::SetSmoothingMethod ( int  val)
inline

Select smoothing method. 0- Classic Laplacian, 1 - Inverse Edge Length, 2 - Curvature Normal.

void niftk::MeshSmoother::TaubinSmooth ( const float  lambda,
const float  mu,
const vcl_size_t  steps 
)

Implements Taubin's mesh smoothing algorithm. See: Geometric Signal Processing on Polygonal Meshes by G. Taubin.


The documentation for this class was generated from the following files: