HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT > Class Template Reference

Multi-threaded computation of surface area, volume and average mean-curvature for narrow band level sets. More...

#include <LevelSetMeasure.h>

Public Types

using GridType = GridT
 
using TreeType = typename GridType::TreeType
 
using ValueType = typename TreeType::ValueType
 
using ManagerType = typename tree::LeafManager< const TreeType >
 

Public Member Functions

 LevelSetMeasure (const GridType &grid, InterruptT *interrupt=nullptr)
 Main constructor from a grid. More...
 
void init (const GridType &grid)
 Re-initialize using the specified grid. More...
 
virtual ~LevelSetMeasure ()
 Destructor. More...
 
int getGrainSize () const
 
void setGrainSize (int grainsize)
 Set the grain-size used for multi-threading. More...
 
Real area (bool useWorldUnits=true)
 Compute the surface area of the level set. More...
 
Real volume (bool useWorldUnits=true)
 Compute the volume of the level set surface. More...
 
Real totMeanCurvature (bool useWorldUnits=true)
 Compute the total mean curvature of the level set surface. More...
 
Real totGaussianCurvature (bool useWorldUnits=true)
 Compute the total gaussian curvature of the level set surface. More...
 
Real avgMeanCurvature (bool useWorldUnits=true)
 Compute the average mean curvature of the level set surface. More...
 
Real avgGaussianCurvature (bool useWorldUnits=true)
 Compute the average gaussian curvature of the level set surface. More...
 
int eulerCharacteristic ()
 Compute the Euler characteristic of the level set surface. More...
 
int genus ()
 Compute the genus of the level set surface. More...
 

Detailed Description

template<typename GridT, typename InterruptT = util::NullInterrupter>
class openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >

Multi-threaded computation of surface area, volume and average mean-curvature for narrow band level sets.

To reduce the risk of round-off errors (primarily due to catastrophic cancellation) and guarantee determinism during multi-threading this class is implemented using parallel_for, and delayed reduction of a sorted list.

Definition at line 103 of file LevelSetMeasure.h.

Member Typedef Documentation

template<typename GridT , typename InterruptT = util::NullInterrupter>
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::GridType = GridT

Definition at line 106 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT = util::NullInterrupter>
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::ManagerType = typename tree::LeafManager<const TreeType>

Definition at line 109 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT = util::NullInterrupter>
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::TreeType = typename GridType::TreeType

Definition at line 107 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT = util::NullInterrupter>
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::ValueType = typename TreeType::ValueType

Definition at line 108 of file LevelSetMeasure.h.

Constructor & Destructor Documentation

template<typename GridT , typename InterruptT >
openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::LevelSetMeasure ( const GridType grid,
InterruptT *  interrupt = nullptr 
)
inline

Main constructor from a grid.

Parameters
gridThe level set to be measured.
interruptOptional interrupter.
Exceptions
RuntimeErrorif the grid is not a level set or if it's empty.

Definition at line 254 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT = util::NullInterrupter>
virtual openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::~LevelSetMeasure ( )
inlinevirtual

Destructor.

Definition at line 126 of file LevelSetMeasure.h.

Member Function Documentation

template<typename GridT , typename InterruptT >
Real openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::area ( bool  useWorldUnits = true)
inline

Compute the surface area of the level set.

Parameters
useWorldUnitsSpecifies if the result is in world or voxel units.
Note
Performs internal caching so only the initial call incurs actual computation.

Definition at line 287 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT = util::NullInterrupter>
Real openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::avgGaussianCurvature ( bool  useWorldUnits = true)
inline

Compute the average gaussian curvature of the level set surface.

Parameters
useWorldUnitsSpecifies if the result is in world or voxel units.
Note
Performs internal caching so only the initial call incurs actual computation.

Definition at line 163 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT = util::NullInterrupter>
Real openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::avgMeanCurvature ( bool  useWorldUnits = true)
inline

Compute the average mean curvature of the level set surface.

Parameters
useWorldUnitsSpecifies if the result is in world or voxel units.
Note
Performs internal caching so only the initial call incurs actual computation.

Definition at line 158 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT >
int openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::eulerCharacteristic ( )
inline

Compute the Euler characteristic of the level set surface.

Note
Performs internal caching so only the initial call incurs actual computation.

Definition at line 323 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT = util::NullInterrupter>
int openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::genus ( )
inline

Compute the genus of the level set surface.

Warning
The genus is only well defined for a single connected surface.
Note
Performs internal caching so only the initial call incurs actual computation.

Definition at line 172 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT = util::NullInterrupter>
int openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::getGrainSize ( ) const
inline
Returns
the grain-size used for multi-threading

Definition at line 129 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT >
void openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::init ( const GridType grid)
inline

Re-initialize using the specified grid.

Parameters
gridThe level set to be measured.
Exceptions
RuntimeErrorif the grid is not a level set or if it's empty.

Definition at line 263 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT = util::NullInterrupter>
void openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::setGrainSize ( int  grainsize)
inline

Set the grain-size used for multi-threading.

Note
A grain size of 0 or less disables multi-threading!

Definition at line 133 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT >
Real openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::totGaussianCurvature ( bool  useWorldUnits = true)
inline

Compute the total gaussian curvature of the level set surface.

Parameters
useWorldUnitsSpecifies if the result is in world or voxel units.
Note
Performs internal caching so only the initial call incurs actual computation.

Definition at line 315 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT >
Real openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::totMeanCurvature ( bool  useWorldUnits = true)
inline

Compute the total mean curvature of the level set surface.

Parameters
useWorldUnitsSpecifies if the result is in world or voxel units.
Note
Performs internal caching so only the initial call incurs actual computation.

Definition at line 307 of file LevelSetMeasure.h.

template<typename GridT , typename InterruptT >
Real openvdb::OPENVDB_VERSION_NAME::tools::LevelSetMeasure< GridT, InterruptT >::volume ( bool  useWorldUnits = true)
inline

Compute the volume of the level set surface.

Parameters
useWorldUnitsSpecifies if the result is in world or voxel units.
Note
Performs internal caching so only the initial call incurs actual computation.

Definition at line 297 of file LevelSetMeasure.h.


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