ViennaLS
Loading...
Searching...
No Matches
viennals::CompareNarrowBand< T, D > Class Template Reference

Calculate distance measure between two level sets by comparing their SDF values on a narrow band. Returns the sum of squared differences between corresponding grid points. The code is currently itended for 2D level sets only. More...

#include <lsCompareNarrowBand.hpp>

Public Member Functions

 CompareNarrowBand ()
 
 CompareNarrowBand (SmartPointer< Domain< T, D > > passedLevelSetTarget, SmartPointer< Domain< T, D > > passedlevelSetSample)
 
void setLevelSetTarget (SmartPointer< Domain< T, D > > passedLevelSet)
 
void setLevelSetSample (SmartPointer< Domain< T, D > > passedLevelSet)
 
void setXRange (T minXRange, T maxXRange)
 Set the x-coordinate range to restrict the comparison area.
 
void setYRange (T minYRange, T maxYRange)
 Set the y-coordinate range to restrict the comparison area.
 
void clearXRange ()
 Clear the x-range restriction.
 
void clearYRange ()
 Clear the y-range restriction.
 
void setOutputMesh (SmartPointer< Mesh< T > > passedMesh, bool outputMeshSquaredDiffs=true)
 Set the output mesh where difference values will be stored.
 
void setOutputMeshSquaredDifferences (bool value)
 Set whether to output squared differences (true) or absolute differences (false)
 
void apply ()
 Apply the comparison and calculate the sum of squared differences.
 
T getSumSquaredDifferences () const
 Return the sum of squared differences calculated by apply().
 
T getSumDifferences () const
 
unsigned getNumPoints () const
 Return the number of points used in the comparison.
 
T getRMSE () const
 Calculate the root mean square error from previously computed values.
 

Detailed Description

template<class T, int D = 2>
class viennals::CompareNarrowBand< T, D >

Calculate distance measure between two level sets by comparing their SDF values on a narrow band. Returns the sum of squared differences between corresponding grid points. The code is currently itended for 2D level sets only.

Constructor & Destructor Documentation

◆ CompareNarrowBand() [1/2]

template<class T, int D = 2>
viennals::CompareNarrowBand< T, D >::CompareNarrowBand ( )
inline

◆ CompareNarrowBand() [2/2]

template<class T, int D = 2>
viennals::CompareNarrowBand< T, D >::CompareNarrowBand ( SmartPointer< Domain< T, D > > passedLevelSetTarget,
SmartPointer< Domain< T, D > > passedlevelSetSample )
inline

Member Function Documentation

◆ apply()

template<class T, int D = 2>
void viennals::CompareNarrowBand< T, D >::apply ( )
inline

Apply the comparison and calculate the sum of squared differences.

◆ clearXRange()

template<class T, int D = 2>
void viennals::CompareNarrowBand< T, D >::clearXRange ( )
inline

Clear the x-range restriction.

◆ clearYRange()

template<class T, int D = 2>
void viennals::CompareNarrowBand< T, D >::clearYRange ( )
inline

Clear the y-range restriction.

◆ getNumPoints()

template<class T, int D = 2>
unsigned viennals::CompareNarrowBand< T, D >::getNumPoints ( ) const
inline

Return the number of points used in the comparison.

◆ getRMSE()

template<class T, int D = 2>
T viennals::CompareNarrowBand< T, D >::getRMSE ( ) const
inline

Calculate the root mean square error from previously computed values.

◆ getSumDifferences()

template<class T, int D = 2>
T viennals::CompareNarrowBand< T, D >::getSumDifferences ( ) const
inline

◆ getSumSquaredDifferences()

template<class T, int D = 2>
T viennals::CompareNarrowBand< T, D >::getSumSquaredDifferences ( ) const
inline

Return the sum of squared differences calculated by apply().

◆ setLevelSetSample()

template<class T, int D = 2>
void viennals::CompareNarrowBand< T, D >::setLevelSetSample ( SmartPointer< Domain< T, D > > passedLevelSet)
inline

◆ setLevelSetTarget()

template<class T, int D = 2>
void viennals::CompareNarrowBand< T, D >::setLevelSetTarget ( SmartPointer< Domain< T, D > > passedLevelSet)
inline

◆ setOutputMesh()

template<class T, int D = 2>
void viennals::CompareNarrowBand< T, D >::setOutputMesh ( SmartPointer< Mesh< T > > passedMesh,
bool outputMeshSquaredDiffs = true )
inline

Set the output mesh where difference values will be stored.

◆ setOutputMeshSquaredDifferences()

template<class T, int D = 2>
void viennals::CompareNarrowBand< T, D >::setOutputMeshSquaredDifferences ( bool value)
inline

Set whether to output squared differences (true) or absolute differences (false)

◆ setXRange()

template<class T, int D = 2>
void viennals::CompareNarrowBand< T, D >::setXRange ( T minXRange,
T maxXRange )
inline

Set the x-coordinate range to restrict the comparison area.

◆ setYRange()

template<class T, int D = 2>
void viennals::CompareNarrowBand< T, D >::setYRange ( T minYRange,
T maxYRange )
inline

Set the y-coordinate range to restrict the comparison area.


The documentation for this class was generated from the following file: