Class SymmetryVisitorPointCloud
java.lang.Object
cz.fidentis.analyst.engines.symmetry.SymmetryVisitor
cz.fidentis.analyst.engines.symmetry.impl.SymmetryVisitorPointCloud
- All Implemented Interfaces:
MeshVisitor
- Direct Known Subclasses:
SymmetryVisitorMesh
A robust implementation of symmetry plane estimation.
The code is based on the
... paper.
This estimator works with point clouds (does not require manifold triangle mesh).
It has the following properties:
- The 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 subsampling: radical subsampling for the generation of candidate planes (cca. 100 points seems to be optimal) and less radical (cca. 1000 points) subsampling 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
ConstructorsConstructorDescriptionSymmetryVisitorPointCloud
(PointSamplingConfig samplingStrategy, int maxSamplesForCandidatePruning) 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
-
SymmetryVisitorPointCloud
public SymmetryVisitorPointCloud(PointSamplingConfig samplingStrategy, int maxSamplesForCandidatePruning) Constructor.- Parameters:
samplingStrategy
- Subsampling strategy for finding candidate planes. Must not benull
UseNoSampling
strategy to avoid subsampling.maxSamplesForCandidatePruning
- Secondary subsampling used for finding the best candidate (pruning of candidates) uses always the Uniform 3D grid. This parameter sets the strength of this subsampling.
-
-
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
- Subsampled meshcentroid
- Centroid of the subsampled 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
- Subsampled meshcentroid
- Centroid of the subsampled meshcandidates
- Candidate planes
-