Performs multi-threaded interface tracking of narrow band level sets.
More...
#include <LevelSetTracker.h>
Inherited by LevelSetFilter< GridT, MaskT, InterruptT >.
template<typename GridT, typename InterruptT = util::NullInterrupter>
class openvdb::v6_0::tools::LevelSetTracker< GridT, InterruptT >
Performs multi-threaded interface tracking of narrow band level sets.
◆ BufferType
using BufferType = typename LeafManagerType::BufferType |
◆ GridType
◆ LeafManagerType
◆ LeafRange
using LeafRange = typename LeafManagerType::LeafRange |
◆ LeafType
using LeafType = typename TreeType::LeafNodeType |
◆ MaskTreeType
◆ TreeType
using TreeType = typename GridT::TreeType |
◆ TrimMode
◆ ValueType
using ValueType = typename TreeType::ValueType |
◆ LevelSetTracker()
Main constructor.
- Exceptions
-
◆ ~LevelSetTracker()
◆ checkInterrupter()
bool checkInterrupter |
( |
| ) |
|
|
inline |
- Returns
- false if the process was interrupted
◆ dilate()
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.
◆ endInterrupter()
◆ erode()
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. |
◆ getGrainSize()
int getGrainSize |
( |
| ) |
const |
|
inline |
- Returns
- the grain-size used for multi-threading
◆ getHalfWidth()
Return the half width of the narrow band in floating-point voxel units.
◆ getNormCount()
int getNormCount |
( |
| ) |
const |
|
inline |
- Returns
- The number of normalizations performed per track or normalize call.
◆ getSpatialScheme()
- Returns
- the spatial finite difference scheme
◆ getState()
Return the state of the tracker (see struct defined above)
◆ getTemporalScheme()
- Returns
- the temporal integration scheme
◆ grid()
◆ leafs() [1/2]
◆ leafs() [2/2]
◆ normalize() [1/3]
void normalize |
( |
const MaskType * |
mask | ) |
|
Iterative normalization, i.e. solving the Eikonal equation.
- Note
- The mask it optional and by default it is ignored.
◆ normalize() [2/3]
Iterative normalization, i.e. solving the Eikonal equation.
◆ normalize() [3/3]
void normalize |
( |
const MaskT * |
mask | ) |
|
|
inline |
◆ prune()
Set voxels that are outside the narrow band to the background value (if trimming is enabled) and prune the grid.
Pruning is done automatically as a step in tracking.
- See also
- setTrimming, trimming
◆ resize()
Resize the width of the narrow band, i.e. perform dilation and renormalization or erosion as required.
◆ setGrainSize()
void setGrainSize |
( |
int |
grainsize | ) |
|
|
inline |
Set the grain-size used for multi-threading.
- Note
- A grainsize of 0 or less disables multi-threading!
◆ setNormCount()
void setNormCount |
( |
int |
n | ) |
|
|
inline |
Set the number of normalizations performed per track or normalize call.
◆ setSpatialScheme()
Set the spatial finite difference scheme.
◆ setState()
void setState |
( |
const State & |
s | ) |
|
|
inline |
Set the state of the tracker (see struct defined above)
◆ setTemporalScheme()
Set the spatial finite difference scheme.
◆ setTrimming()
Specify whether to trim voxels outside the narrow band prior to pruning.
- See also
- trimming, prune
◆ startInterrupter()
void startInterrupter |
( |
const char * |
msg | ) |
|
|
inline |
◆ track()
Track the level set interface, i.e. rebuild and normalize the narrow band of the level set.
◆ trimming()
Return the trimming mode for voxels outside the narrow band.
Trimming is enabled by default and is applied automatically prior to pruning.
- See also
- setTrimming, prune
◆ voxelSize()
The documentation for this class was generated from the following file: