Class SymmetryVisitorRobust
java.lang.Object
cz.fidentis.analyst.engines.symmetry.SymmetryVisitor
cz.fidentis.analyst.engines.symmetry.impl.SymmetryVisitorRobust
- All Implemented Interfaces:
MeshVisitor
- Direct Known Subclasses:
SymmetryVisitorRobustMesh
A robust implementation of symmetry plane estimation.
The code is based based on the
... paper.
This estimator works with point clouds (does not require manifold triangle mesh).
It has the following properties:
- Wendland’s similarity functions is used to get the best candidate planes.
- No additional weights are used.
- The computation is accelerated by using a Uniform Grid for pruning candidate planes and using two-level downsampling: radical downsampling for the generation of candidate planes (cca. 100 points seems to be optimal) and less radical (cca. 1000 points) downsampling for the selection of the best candidate(s).
- Best results are achieved with Uniform Grid sampling with 100 and 1000 points (for the two phases).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A helper class that copies input mesh point and moves them so that the given centroid is in the space origin. -
Constructor Summary
ConstructorsConstructorDescriptionSymmetryVisitorRobust
(PointSamplingConfig samplingStrategy1, PointSamplingConfig samplingStrategy2) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Calculates the symmetry plane.void
dispose()
Dispose all disposable resources this visitor was using.protected Set
<CandidatePlaneRobust> generateCandidates
(List<MeshPoint> meshSamples, javax.vecmath.Point3d centroid) Copies mesh samples, moves them to the space origin, and then computes candidate planes.Returns a symmetry plane.protected void
measureSymmetry
(List<MeshPoint> meshSamples, javax.vecmath.Point3d centroid, Set<CandidatePlaneRobust> candidates) Copies mesh samples, moves them to the space origin, and then measures the quality of candidate planes.void
visitMeshFacet
(MeshFacet facet) The inspection method to be implemented by specific visitors.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.data.mesh.MeshVisitor
isThreadSafe
-
Constructor Details
-
SymmetryVisitorRobust
public SymmetryVisitorRobust(PointSamplingConfig samplingStrategy1, PointSamplingConfig samplingStrategy2) Constructor.- Parameters:
samplingStrategy1
- Downsampling strategy for finding candidate planes. Must not benull
UseNoSumpling
strategy to avoid downsampling.samplingStrategy2
- Downsampling strategy for finding the best candidate. Must not benull
UseNoSumpling
strategy to avoid downsampling.
-
-
Method Details
-
getSymmetryPlane
Description copied from class:SymmetryVisitor
Returns a symmetry plane.- Specified by:
getSymmetryPlane
in classSymmetryVisitor
- Returns:
- a symmetry plane or
null
-
visitMeshFacet
Description copied from interface:MeshVisitor
The inspection method to be implemented by specific visitors.- Parameters:
facet
- Mesh facet to be visited.
-
dispose
public void dispose()Description copied from interface:MeshVisitor
Dispose all disposable resources this visitor was using. Distances can still be retrieved after calling this method. Subclasses should override this method if they need to dispose something. -
calculateSymmetryPlane
protected void calculateSymmetryPlane()Calculates the symmetry plane. -
generateCandidates
protected Set<CandidatePlaneRobust> generateCandidates(List<MeshPoint> meshSamples, javax.vecmath.Point3d centroid) Copies mesh samples, moves them to the space origin, and then computes candidate planes.- Parameters:
meshSamples
- Downsampled meshcentroid
- Centroid of the downsampled mesh- Returns:
- Candidate planes
-
measureSymmetry
protected void measureSymmetry(List<MeshPoint> meshSamples, javax.vecmath.Point3d centroid, Set<CandidatePlaneRobust> candidates) Copies mesh samples, moves them to the space origin, and then measures the quality of candidate planes. The results are stored in the candidate planes.- Parameters:
meshSamples
- Downsampled meshcentroid
- Centroid of the downsampled meshcandidates
- Candidate planes
-