|
ViennaLS
|
Calculate Chamfer distance between two level sets by comparing their zero-level-set surfaces. The Chamfer distance is a bidirectional metric that measures the average nearest-neighbor distance between two point sets. More...
#include <lsCompareChamfer.hpp>
Public Member Functions | |
| CompareChamfer () | |
| CompareChamfer (SmartPointer< Domain< T, D > > passedLevelSetTarget, SmartPointer< Domain< T, D > > passedLevelSetSample) | |
| void | setLevelSetTarget (SmartPointer< Domain< T, D > > passedLevelSet) |
| Set the target level set. | |
| void | setLevelSetSample (SmartPointer< Domain< T, D > > passedLevelSet) |
| Set the sample level set. | |
| void | setOutputMeshTarget (SmartPointer< Mesh< T > > passedMesh) |
| Set output mesh for target surface points with distance data. | |
| void | setOutputMeshSample (SmartPointer< Mesh< T > > passedMesh) |
| Set output mesh for sample surface points with distance data. | |
| void | apply () |
| Apply the Chamfer distance calculation. | |
| T | getForwardDistance () const |
| Get the forward distance (average distance from target to sample). | |
| T | getBackwardDistance () const |
| Get the backward distance (average distance from sample to target). | |
| T | getChamferDistance () const |
| Get the Chamfer distance (average of forward and backward). | |
| T | getRMSChamferDistance () const |
| Get the RMS Chamfer distance. | |
| T | getMaxDistance () const |
| Get the maximum nearest-neighbor distance. | |
| unsigned | getNumTargetPoints () const |
| Get the number of target surface points. | |
| unsigned | getNumSamplePoints () const |
| Get the number of sample surface points. | |
Calculate Chamfer distance between two level sets by comparing their zero-level-set surfaces. The Chamfer distance is a bidirectional metric that measures the average nearest-neighbor distance between two point sets.
This class extracts the surface representations of both level sets and computes:
The code is currently intended for 2D level sets only, where surfaces are represented as line segments.
Both level sets must have a width of at least 2 to extract surfaces. If not, they will be automatically expanded.
Note for the future: lsToDiskMesh could be used instead of lsToSurfaceMesh, which is probably more efficient but slightly less accurate.
|
inline |
|
inline |
|
inline |
Apply the Chamfer distance calculation.
|
inline |
Get the backward distance (average distance from sample to target).
|
inline |
Get the Chamfer distance (average of forward and backward).
|
inline |
Get the forward distance (average distance from target to sample).
|
inline |
Get the maximum nearest-neighbor distance.
|
inline |
Get the number of sample surface points.
|
inline |
Get the number of target surface points.
|
inline |
Get the RMS Chamfer distance.
|
inline |
Set the sample level set.
|
inline |
Set the target level set.
|
inline |
Set output mesh for sample surface points with distance data.
|
inline |
Set output mesh for target surface points with distance data.