OpenVDB
12.0.0
|
Performs multi-threaded interface tracking of narrow band level sets. More...
#include <openvdb/tools/LevelSetTracker.h>
Inherited by LevelSetFilter< GridT, MaskT, InterruptT >.
Classes | |
struct | State |
Lightweight struct that stores the state of the LevelSetTracker. More... | |
Public Types | |
using | TrimMode = lstrack::TrimMode |
using | GridType = GridT |
using | TreeType = typename GridT::TreeType |
using | LeafType = typename TreeType::LeafNodeType |
using | ValueType = typename TreeType::ValueType |
using | LeafManagerType = typename tree::LeafManager< TreeType > |
using | LeafRange = typename LeafManagerType::LeafRange |
using | BufferType = typename LeafManagerType::BufferType |
using | MaskTreeType = typename TreeType::template ValueConverter< ValueMask >::Type |
Public Member Functions | |
LevelSetTracker (GridT &grid, InterruptT *interrupt=nullptr) | |
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 () |
Set voxels that are outside the narrow band to the background value (if trimming is enabled) and prune the grid. 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 recommended 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 s) |
Set the spatial finite difference scheme. More... | |
math::TemporalIntegrationScheme | getTemporalScheme () const |
void | setTemporalScheme (math::TemporalIntegrationScheme s) |
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... | |
TrimMode | trimming () const |
Return the trimming mode for voxels outside the narrow band. More... | |
void | setTrimming (TrimMode mode) |
Specify whether to trim voxels outside the narrow band prior to pruning. 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) |
Performs multi-threaded interface tracking of narrow band level sets.
using BufferType = typename LeafManagerType::BufferType |
using GridType = GridT |
using LeafManagerType = typename tree::LeafManager<TreeType> |
using LeafRange = typename LeafManagerType::LeafRange |
using LeafType = typename TreeType::LeafNodeType |
using MaskTreeType = typename TreeType::template ValueConverter<ValueMask>::Type |
using TreeType = typename GridT::TreeType |
using TrimMode = lstrack::TrimMode |
using ValueType = typename TreeType::ValueType |
LevelSetTracker | ( | GridT & | grid, |
InterruptT * | interrupt = nullptr |
||
) |
Main constructor.
RuntimeError | if the grid is not a level set |
|
inlinevirtual |
|
inline |
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 recommended for most level set applications).
|
inline |
void erode | ( | int | iterations = 1 | ) |
Erodes the width of the narrow-band and update the background values.
ValueError | if iterations is larger than the current half-width. |
|
inline |
|
inline |
Return the half width of the narrow band in floating-point voxel units.
|
inline |
|
inline |
|
inline |
Return the state of the tracker (see struct defined above)
|
inline |
|
inline |
|
inline |
|
inline |
void normalize | ( | const MaskType * | mask | ) |
Iterative normalization, i.e. solving the Eikonal equation.
|
inline |
Iterative normalization, i.e. solving the Eikonal equation.
void normalize | ( | const MaskT * | mask | ) |
void 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.
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.
|
inline |
Set the grain-size used for multi-threading.
|
inline |
Set the number of normalizations performed per track or normalize call.
|
inline |
Set the spatial finite difference scheme.
|
inline |
Set the state of the tracker (see struct defined above)
|
inline |
Set the spatial finite difference scheme.
|
inline |
|
inline |
void track | ( | ) |
Track the level set interface, i.e. rebuild and normalize the narrow band of the level set.
|
inline |
Return the trimming mode for voxels outside the narrow band.
Trimming is enabled by default and is applied automatically prior to pruning.
|
inline |