Package net.imglib2.mesh.alg
Class TaubinSmoothing
- java.lang.Object
-
- net.imglib2.mesh.alg.TaubinSmoothing
-
public class TaubinSmoothing extends Object
Taubin's mesh smoothing algorithm.Adapted by the Javascript code of mykolalysenko, MIT license. https://github.com/mikolalysenko/taubin-smooth/blob/master/smooth.js
- Author:
- Jean-Yves Tinevez
- See Also:
- Taubin, G. “Curve and Surface Smoothing without Shrinkage.” In Proceedings of IEEE International Conference on Computer Vision, 852–57, 1995.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTaubinSmoothing.TaubinWeightTypeThe weight to use when accumlating contribution for neighborhood edges in Taubin smoothing.
-
Constructor Summary
Constructors Constructor Description TaubinSmoothing()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferMeshsmooth(Mesh mesh)Smooth the specified mesh using the Taubin smoothing algorithm, with default parameters.static BufferMeshsmooth(Mesh mesh, int iters, double passBand)Smooth the specified mesh using the Taubin smoothing algorithm, using cotangent weights.static BufferMeshsmooth(Mesh mesh, int iters, double lambda, double mu, TaubinSmoothing.TaubinWeightType weightType)Smooth the specified mesh using the Taubin smoothing algorithm.
-
-
-
Method Detail
-
smooth
public static final BufferMesh smooth(Mesh mesh)
Smooth the specified mesh using the Taubin smoothing algorithm, with default parameters.- Parameters:
mesh- the mesh to smooth.- Returns:
- a new smoothed mesh.
-
smooth
public static final BufferMesh smooth(Mesh mesh, int iters, double passBand)
Smooth the specified mesh using the Taubin smoothing algorithm, using cotangent weights.- Parameters:
mesh- the mesh to smooth.iters- the number of iterations to apply. Typical values: 10.passBand- the spatial frequency to use for smoothing. For instance 0.1.- Returns:
- a new smoothed mesh.
-
smooth
public static final BufferMesh smooth(Mesh mesh, int iters, double lambda, double mu, TaubinSmoothing.TaubinWeightType weightType)
Smooth the specified mesh using the Taubin smoothing algorithm.- Parameters:
mesh- the mesh to smooth.iters- the number of iterations to apply. Typical values: 10.lambda- the value of the lambda step in Taubin smoothing. Positive, typical values are around 0.5;mu- the value of the mu step in Taubin smoothing. Negative, typical values are around -0.5.weightType- the type of weights to use when summing contribution from neighbor edges.- Returns:
- a new smoothed mesh.
-
-