OpenVDB  1.1.0
Public Types | Public Member Functions | Protected Attributes | List of all members
LevelSetFilter< GridT, InterruptT > Class Template Reference

Filtering (i.e. diffusion) of narrow-band level sets. More...

#include <LevelSetFilter.h>

Inherits LevelSetTracker< GridT, InterruptT >.

Public Types

typedef boost::shared_ptr
< LevelSetFilter
Ptr
 
typedef LevelSetTracker< GridT,
InterruptT > 
BaseType
 
typedef GridT GridType
 
typedef GridType::TreeType TreeType
 
typedef TreeType::LeafNodeType LeafType
 
typedef LeafType::ValueType ValueType
 
typedef tree::LeafManager
< TreeType
LeafManagerType
 
typedef LeafManagerType::RangeType RangeType
 
typedef LeafManagerType::BufferType BufferType
 

Public Member Functions

 LevelSetFilter (GridType &grid, InterruptT *interrupt=NULL)
 Main constructor. More...
 
 LevelSetFilter (const LevelSetFilter &other)
 Shallow copy constructor called by tbb::parallel_for() threads during filtering. More...
 
virtual ~LevelSetFilter ()
 
void operator() (const RangeType &r) const
 Used internally by tbb::parallel_for() More...
 
void meanCurvature ()
 One iteration of mean-curvature flow of the level set. More...
 
void laplacian ()
 One iteration of laplacian flow of the level set. More...
 
void gaussian (int width=1)
 One iteration of a fast separable gaussian filter. More...
 
void offset (ValueType offset)
 Offset the level set by the specified (world) distance. More...
 
void median (int width=1)
 One iteration of median-value flow of the level set. More...
 
void mean (int width=1)
 One iteration of mean-value flow of the level set. More...
 
 BOOST_STATIC_ASSERT (boost::is_floating_point< ValueType >::value)
 
void normalize ()
 Iterative normalization, i.e. solving the Eikonal equation. More...
 
void track ()
 
void prune ()
 Remove voxels that are outside the narrow band. (substep of track) More...
 
math::BiasedGradientScheme getSpatialScheme () const
 
void setSpatialScheme (math::BiasedGradientScheme scheme)
 Set the spatial finite difference scheme. More...
 
math::TemporalIntegrationScheme getTemporalScheme () const
 
void setTemporalScheme (math::TemporalIntegrationScheme scheme)
 Set the spatial finite difference scheme. More...
 
int getNormCount () const
 
void setNormCount (int n)
 Set the number of normalizations performed per track or normalize call. More...
 
int getGrainSize () const
 
void setGrainSize (int grainsize)
 Set the grain-size used for multi-threading. More...
 
ValueType voxelSize () const
 
void startInterrupter (const char *msg)
 
void endInterrupter ()
 
bool checkInterrupter ()
 
const GridTypegrid () const
 

Protected Attributes

GridTypemGrid
 
LeafManagerTypemLeafs
 
InterruptT * mInterrupter
 
const ValueType mDx
 

Detailed Description

template<typename GridT, typename InterruptT = util::NullInterrupter>
class openvdb::v1_1_0::tools::LevelSetFilter< GridT, InterruptT >

Filtering (i.e. diffusion) of narrow-band level sets.

Note
This class performs propper interface tracking which allows for unrestricted surface deformations

Member Typedef Documentation

typedef LevelSetTracker<GridT, InterruptT> BaseType
typedef GridT GridType
typedef TreeType::LeafNodeType LeafType
typedef boost::shared_ptr<LevelSetFilter> Ptr
typedef GridType::TreeType TreeType
typedef LeafType::ValueType ValueType

Constructor & Destructor Documentation

LevelSetFilter ( GridType grid,
InterruptT *  interrupt = NULL 
)
inline

Main constructor.

LevelSetFilter ( const LevelSetFilter< GridT, InterruptT > &  other)
inline

Shallow copy constructor called by tbb::parallel_for() threads during filtering.

virtual ~LevelSetFilter ( )
inlinevirtual

Member Function Documentation

BOOST_STATIC_ASSERT ( boost::is_floating_point< ValueType >::value  )
inherited
bool checkInterrupter ( )
inlineinherited
Returns
false if the process was interrupted
void endInterrupter ( )
inlineinherited
void gaussian ( int  width = 1)
inline

One iteration of a fast separable gaussian filter.

Note
This is approximated as 4 iterations of a separable mean filter which typically leads an approximation that's better than 95%!
int getGrainSize ( ) const
inlineinherited
Returns
the grain-size used for multi-threading
int getNormCount ( ) const
inlineinherited
Returns
The number of normalizations performed per track or normalize call.
math::BiasedGradientScheme getSpatialScheme ( ) const
inlineinherited
Returns
the spatial finite difference scheme
math::TemporalIntegrationScheme getTemporalScheme ( ) const
inlineinherited
Returns
the temporal integration scheme
const GridType& grid ( ) const
inlineinherited
void laplacian ( )
inline

One iteration of laplacian flow of the level set.

void mean ( int  width = 1)
inline

One iteration of mean-value flow of the level set.

Note
This filter is separable so it's fast!
void meanCurvature ( )
inline

One iteration of mean-curvature flow of the level set.

void median ( int  width = 1)
inline

One iteration of median-value flow of the level set.

Note
This filter is not separable and is hence relatively slow!
void normalize ( )
inlineinherited

Iterative normalization, i.e. solving the Eikonal equation.

void offset ( ValueType  offset)
inline

Offset the level set by the specified (world) distance.

void operator() ( const RangeType r) const
inline

Used internally by tbb::parallel_for()

void prune ( )
inlineinherited

Remove voxels that are outside the narrow band. (substep of track)

void setGrainSize ( int  grainsize)
inlineinherited

Set the grain-size used for multi-threading.

Note
A grainsize of 0 or less disables multi-threading!
void setNormCount ( int  n)
inlineinherited

Set the number of normalizations performed per track or normalize call.

void setSpatialScheme ( math::BiasedGradientScheme  scheme)
inlineinherited

Set the spatial finite difference scheme.

void setTemporalScheme ( math::TemporalIntegrationScheme  scheme)
inlineinherited

Set the spatial finite difference scheme.

void startInterrupter ( const char *  msg)
inlineinherited
void track ( )
inlineinherited

Track the level set interface, i.e. rebuild and normalize the narrow band of the level set.

ValueType voxelSize ( ) const
inlineinherited

Member Data Documentation

const ValueType mDx
protectedinherited
GridType& mGrid
protectedinherited
InterruptT* mInterrupter
protectedinherited
LeafManagerType* mLeafs
protectedinherited

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