NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
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... | |
This class implements various mesh smoothing algorithms and it can be used to (re)compute surface and vertex normals of a BasicMesh structure.
niftk::MeshSmoother::MeshSmoother | ( | ) |
Default constructor.
|
virtual |
Destructor.
Implements algorihtm for fixing cracks in a mesh (happens with standard marchin cubes)
Computes vertex and triangle normals over the whole mesh.
|
inline |
Get the flip normals flag.
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::RescaleMesh | ( | double | scale_value | ) |
Re-scales all coordinates according to the scale parameter.
|
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.
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.