OpenVDB: LevelSetTracker< GridT, InterruptT > Class Template Reference

OpenVDB 3.1.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | List of all members
LevelSetTracker< GridT, InterruptT > Class Template Reference

Performs multi-threaded interface tracking of narrow band level sets. More...

`#include <LevelSetTracker.h>`

Inherited by LevelSetFilter< GridT, MaskT, InterruptT >.

## Classes
struct | State
| Lightweight struct that stores the state of the LevelSetTracker. More...

## Public Types
typedef GridT | GridType
typedef GridT::TreeType | TreeType
typedef TreeType::LeafNodeType | LeafType
typedef TreeType::ValueType | ValueType
typedef tree::LeafManager< TreeType > | LeafManagerType
typedef LeafManagerType::LeafRange | LeafRange
typedef LeafManagerType::BufferType | BufferType
typedef TreeType::template ValueConverter< bool >::Type | BoolMaskType

## Public Member Functions
| BOOST_STATIC_ASSERT (boost::is_floating_point< ValueType >::value)
| LevelSetTracker (GridT &grid, InterruptT *interrupt=NULL)
| Main constructor. More...
virtual | ~LevelSetTracker ()
template<typename MaskType >
void | normalize (const MaskType *mask)
| Iterative normalization, i.e. solving the Eikonal equation. More...
void | normalize ()
| Iterative normalization, i.e. solving the Eikonal equation. More...
void | track ()
| Track the level set interface, i.e. rebuild and normalize the narrow band of the level set. More...
void | prune ()
| Remove voxels that are outside the narrow band. (substep of track) More...
void | dilate (int iterations=1)
| Fast but approximate dilation of the narrow band - one layer at a time. Normally we recommend using the resize method below which internally calls dilate (or erode) with the correct number of iterations to achieve the desired half voxel width of the narrow band (3 is recomended for most level set applications). More...
void | erode (int iterations=1)
| Erodes the width of the narrow-band and update the background values. More...
bool | resize (Index halfWidth=static_cast< Index >(LEVEL_SET_HALF_WIDTH))
| Resize the width of the narrow band, i.e. perform dilation and renormalization or erosion as required. More...
ValueType | getHalfWidth () const
| Return the half width of the narrow band in floating-point voxel units. More...
State | getState () const
| Return the state of the tracker (see struct defined above) More...
void | setState (const State &s)
| Set the state of the tracker (see struct defined above) 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 GridType & | grid () const
LeafManagerType & | leafs ()
const LeafManagerType & | leafs () const
template<typename MaskT >
void | normalize (const MaskT *mask)

## Detailed Description

### template<typename GridT, typename InterruptT = util::NullInterrupter>
class openvdb::v3_1_0::tools::LevelSetTracker< GridT, InterruptT >

Performs multi-threaded interface tracking of narrow band level sets.

## Member Typedef Documentation

typedef TreeType::template ValueConverter<bool>::Type BoolMaskType

typedef LeafManagerType::BufferType BufferType

typedef GridT GridType

typedef tree::LeafManager<TreeType> LeafManagerType

typedef LeafManagerType::LeafRange LeafRange

typedef TreeType::LeafNodeType LeafType

typedef GridT::TreeType TreeType

typedef TreeType::ValueType ValueType

## Constructor & Destructor Documentation

LevelSetTracker | ( | GridT & | grid,
|  | InterruptT * | interrupt = `NULL`
| ) |  |

Main constructor.

Exceptions

  RuntimeError | if the grid is not a level set

virtual ~LevelSetTracker | ( |  | ) |
| inlinevirtual

## Member Function Documentation

BOOST_STATIC_ASSERT | ( | boost::is_floating_point< ValueType >::value |  | ) |

bool checkInterrupter | ( |  | ) |
| inline

Returns
  false if the process was interrupted

void dilate | ( | int | iterations = `1` | ) |
| inline

Fast but approximate dilation of the narrow band - one layer at a time. Normally we recommend using the resize method below which internally calls dilate (or erode) with the correct number of iterations to achieve the desired half voxel width of the narrow band (3 is recomended for most level set applications).

Note
  Since many level set applications perform interface-tracking, which in turn rebuilds the narrow-band accurately, this dilate method can often be used with a single iterations of low-order re-normalization. This effectively allows very narrow bands to be created from points or polygons (e.g. with a half voxel width of 1), followed by a fast but approximate dilation (typically with a half voxel width of 3). This can be significantly faster than generating the final width of the narrow band from points or polygons.

void endInterrupter | ( |  | ) |
| inline

void erode | ( | int | iterations = `1` | ) |
| inline

Erodes the width of the narrow-band and update the background values.

Exceptions

  ValueError | if iterations is larger than the current half-width.

int getGrainSize | ( |  | ) | const
| inline

Returns
  the grain-size used for multi-threading

ValueType getHalfWidth | ( |  | ) | const
| inline

Return the half width of the narrow band in floating-point voxel units.

int getNormCount | ( |  | ) | const
| inline

Returns
  The number of normalizations performed per track or normalize call.

math::BiasedGradientScheme getSpatialScheme | ( |  | ) | const
| inline

Returns
  the spatial finite difference scheme

State getState | ( |  | ) | const
| inline

Return the state of the tracker (see struct defined above)

math::TemporalIntegrationScheme getTemporalScheme | ( |  | ) | const
| inline

Returns
  the temporal integration scheme

const GridType& grid | ( |  | ) | const
| inline

LeafManagerType& leafs | ( |  | ) |
| inline

const LeafManagerType& leafs | ( |  | ) | const
| inline

void normalize | ( | const MaskType * | mask | ) |

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

Note
  The mask it optional and by default it is ignored.

void normalize | ( |  | ) |
| inline

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

void normalize | ( | const MaskT * | mask | ) |
| inline

void prune | ( |  | ) |
| inline

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

bool resize | ( | Index | halfWidth = `static_cast<Index>(LEVEL_SET_HALF_WIDTH)` | ) |
| inline

Resize the width of the narrow band, i.e. perform dilation and renormalization or erosion as required.

void setGrainSize | ( | int | grainsize | ) |
| inline

Set the grain-size used for multi-threading.

Note
  A grainsize of 0 or less disables multi-threading!

void setNormCount | ( | int | n | ) |
| inline

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

void setSpatialScheme | ( | math::BiasedGradientScheme | scheme | ) |
| inline

Set the spatial finite difference scheme.

void setState | ( | const State & | s | ) |
| inline

Set the state of the tracker (see struct defined above)

void setTemporalScheme | ( | math::TemporalIntegrationScheme | scheme | ) |
| inline

Set the spatial finite difference scheme.

void startInterrupter | ( | const char * | msg | ) |
| inline

void track | ( |  | ) |
| inline

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

ValueType voxelSize | ( |  | ) | const
| inline

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

- LevelSetTracker.h