Package net.imglib2.mesh.alg
Class EllipsoidFitter
- java.lang.Object
-
- net.imglib2.mesh.alg.EllipsoidFitter
-
public class EllipsoidFitter extends Object
Fit an ellipsoid to the convex-Hull of a 3D mesh.Adapted from Yury Petrov's Ellipsoid Fit MATLAB function and KalebKE ellipsoidfit.
- Author:
- Jean-Yves Tinevez
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEllipsoidFitter.EllipsoidThe results of fitting an ellipsoid to a mesh or a collection of points.
-
Constructor Summary
Constructors Constructor Description EllipsoidFitter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EllipsoidFitter.Ellipsoidfit(Iterable<? extends RealLocalizable> points, int nPoints)Fit an ellipsoid to a collection of 3D points.static EllipsoidFitter.Ellipsoidfit(Mesh mesh)Fit an ellipsoid to the convex-Hull of a 3D mesh.static EllipsoidFitter.EllipsoidfitOnConvexHull(Mesh mesh)Fit an ellipsoid to a 3D mesh, assuming it is the convex-Hull.
-
-
-
Method Detail
-
fit
public static final EllipsoidFitter.Ellipsoid fit(Mesh mesh)
Fit an ellipsoid to the convex-Hull of a 3D mesh.- Parameters:
mesh- the mesh to fit.- Returns:
- the fit results.
-
fitOnConvexHull
public static final EllipsoidFitter.Ellipsoid fitOnConvexHull(Mesh mesh)
Fit an ellipsoid to a 3D mesh, assuming it is the convex-Hull.- Parameters:
mesh- the convex-Hull of the mesh to fit.- Returns:
- the fit results.
-
fit
public static EllipsoidFitter.Ellipsoid fit(Iterable<? extends RealLocalizable> points, int nPoints)
Fit an ellipsoid to a collection of 3D points.- Parameters:
points- an iterable over the points to fit.nPoints- the number of points to include in the fit. The fit will consider at most the first nPoints of the iterable, or all the points in the iterable, whatever comes first.- Returns:
- the fit results.
-
-