Computes an estimate of the volume/area where two level sets differ. The volume is calculated by iterating through the bounding box of the two level sets and comparing the cell values. The grid delta is used as the unit of volume. Custom increment values can be set for specific x, y and z ranges, allowing to count certain areas multiple times or skip them. Optionally, a passed mesh can be filled with the volume information, allowing for visualization of the differences. The code is intended for 2D and 3D level sets.
More...
#include <lsCompareVolume.hpp>
|
| | CompareVolume () |
| | CompareVolume (SmartPointer< Domain< T, D > > passedLevelSetTarget, SmartPointer< Domain< T, D > > passedLevelSetSample) |
| void | setLevelSetTarget (SmartPointer< Domain< T, D > > passedLevelSet) |
| | Sets the target level set.
|
| void | setLevelSetSample (SmartPointer< Domain< T, D > > passedLevelSet) |
| | Sets the sample level set.
|
| void | setDefaultIncrement (unsigned short int increment) |
| | Set default increment value.
|
| void | setXRangeAndIncrement (hrleIndexType minXRange, hrleIndexType maxXRange, unsigned short int Xincrement) |
| | Sets the x-range and custom increment value.
|
| void | setYRangeAndIncrement (hrleIndexType minYRange, hrleIndexType maxYRange, unsigned short int Yincrement) |
| | Sets the y-range and custom increment value.
|
| void | setZRangeAndIncrement (hrleIndexType minZRange, hrleIndexType maxZRange, unsigned short int Zincrement) |
| | Sets the z-range and custom increment value.
|
| void | setOutputMesh (SmartPointer< Mesh< T > > passedMesh) |
| | Set the output mesh where difference areas will be stored for visualization. Each cell in the mesh will have a cell data: 0: Areas where both level sets are inside 1: Areas where only one level set is inside (mismatched areas).
|
| double | getVolumeMismatch () const |
| | Returns the computed volume/area mismatch.
|
| double | getAreaMismatch () const |
| | Alias for getVolumeMismatch for 2D compatibility.
|
| double | getCustomVolumeMismatch () const |
| | Returns the computed volume/area mismatch, with custom increments applied.
|
| double | getCustomAreaMismatch () const |
| | Alias for getCustomVolumeMismatch for 2D compatibility.
|
| unsigned long int | getCellCount () const |
| | Returns the number of cells where the level sets differ.
|
| unsigned long int | getCustomCellCount () const |
| | Returns the number of cells where the level sets differ, with custom increments applied.
|
| void | apply () |
| | Computes the volume/area difference between the two level sets.
|
template<class
T, int D = 3>
class viennals::CompareVolume< T, D >
Computes an estimate of the volume/area where two level sets differ. The volume is calculated by iterating through the bounding box of the two level sets and comparing the cell values. The grid delta is used as the unit of volume. Custom increment values can be set for specific x, y and z ranges, allowing to count certain areas multiple times or skip them. Optionally, a passed mesh can be filled with the volume information, allowing for visualization of the differences. The code is intended for 2D and 3D level sets.
◆ CompareVolume() [1/2]
template<class
T, int D = 3>
◆ CompareVolume() [2/2]
template<class
T, int D = 3>
◆ apply()
template<class
T, int D = 3>
Computes the volume/area difference between the two level sets.
◆ getAreaMismatch()
template<class
T, int D = 3>
Alias for getVolumeMismatch for 2D compatibility.
◆ getCellCount()
template<class
T, int D = 3>
Returns the number of cells where the level sets differ.
◆ getCustomAreaMismatch()
template<class
T, int D = 3>
Alias for getCustomVolumeMismatch for 2D compatibility.
◆ getCustomCellCount()
template<class
T, int D = 3>
Returns the number of cells where the level sets differ, with custom increments applied.
◆ getCustomVolumeMismatch()
template<class
T, int D = 3>
Returns the computed volume/area mismatch, with custom increments applied.
◆ getVolumeMismatch()
template<class
T, int D = 3>
Returns the computed volume/area mismatch.
◆ setDefaultIncrement()
template<class
T, int D = 3>
Set default increment value.
◆ setLevelSetSample()
template<class
T, int D = 3>
Sets the sample level set.
◆ setLevelSetTarget()
template<class
T, int D = 3>
Sets the target level set.
◆ setOutputMesh()
template<class
T, int D = 3>
Set the output mesh where difference areas will be stored for visualization. Each cell in the mesh will have a cell data: 0: Areas where both level sets are inside 1: Areas where only one level set is inside (mismatched areas).
◆ setXRangeAndIncrement()
template<class
T, int D = 3>
| void viennals::CompareVolume< T, D >::setXRangeAndIncrement |
( |
hrleIndexType | minXRange, |
|
|
hrleIndexType | maxXRange, |
|
|
unsigned short int | Xincrement ) |
|
inline |
Sets the x-range and custom increment value.
◆ setYRangeAndIncrement()
template<class
T, int D = 3>
| void viennals::CompareVolume< T, D >::setYRangeAndIncrement |
( |
hrleIndexType | minYRange, |
|
|
hrleIndexType | maxYRange, |
|
|
unsigned short int | Yincrement ) |
|
inline |
Sets the y-range and custom increment value.
◆ setZRangeAndIncrement()
template<class
T, int D = 3>
| void viennals::CompareVolume< T, D >::setZRangeAndIncrement |
( |
hrleIndexType | minZRange, |
|
|
hrleIndexType | maxZRange, |
|
|
unsigned short int | Zincrement ) |
|
inline |
Sets the z-range and custom increment value.
The documentation for this class was generated from the following file: