OpenVDB
2.3.0
|
Filtering (e.g. diffusion) of narrow-band level sets. An optional scalar field can be used to produce a (smooth) alpha mask for the filtering. More...
#include <LevelSetFilter.h>
Inherits LevelSetTracker< GridT, InterruptT >.
Public Types | |
typedef LevelSetTracker< GridT, InterruptT > | BaseType |
typedef GridT | GridType |
typedef MaskT | MaskType |
typedef GridType::TreeType | TreeType |
typedef TreeType::ValueType | ValueType |
typedef MaskType::ValueType | AlphaType |
typedef tree::LeafManager < TreeType >::LeafRange | RangeType |
typedef TreeType::LeafNodeType | LeafType |
typedef tree::LeafManager < TreeType > | LeafManagerType |
typedef LeafManagerType::LeafRange | LeafRange |
typedef LeafManagerType::BufferType | BufferType |
Public Member Functions | |
BOOST_STATIC_ASSERT (boost::is_floating_point< AlphaType >::value) | |
LevelSetFilter (GridType &grid, InterruptT *interrupt=NULL) | |
Main constructor from a grid. More... | |
LevelSetFilter (const LevelSetFilter &other) | |
Shallow copy constructor called by tbb::parallel_for() threads during filtering. More... | |
virtual | ~LevelSetFilter () |
Destructor. More... | |
void | operator() (const RangeType &range) const |
Used internally by tbb::parallel_for(). More... | |
AlphaType | minMask () const |
Return the minimum value of the mask to be used for the derivation of a smooth alpha value. More... | |
AlphaType | maxMask () const |
Return the maximum value of the mask to be used for the derivation of a smooth alpha value. More... | |
void | setMaskRange (AlphaType min, AlphaType max) |
Define the range for the (optional) scalar mask. More... | |
bool | isMaskInverted () const |
Return true if the mask is inverted, i.e. min->max in the original mask maps to 1->0 in the inverted alpha mask. More... | |
void | invertMask (bool invert=true) |
Invert the optional mask, i.e. min->max in the original mask maps to 1->0 in the inverted alpha mask. More... | |
void | meanCurvature (const MaskType *mask=NULL) |
One iteration of mean-curvature flow of the level set. More... | |
void | laplacian (const MaskType *mask=NULL) |
One iteration of laplacian flow of the level set. More... | |
void | gaussian (int width=1, const MaskType *mask=NULL) |
One iteration of a fast separable gaussian filter. More... | |
void | offset (ValueType offset, const MaskType *mask=NULL) |
Offset the level set by the specified (world) distance. More... | |
void | median (int width=1, const MaskType *mask=NULL) |
One iteration of median-value flow of the level set. More... | |
void | mean (int width=1, const MaskType *mask=NULL) |
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 GridType & | grid () const |
LeafManagerType & | leafs () |
const LeafManagerType & | leafs () const |
void | operator() (const RangeType &r) const |
Public functor called by tbb::parallel_for() More... | |
Filtering (e.g. diffusion) of narrow-band level sets. An optional scalar field can be used to produce a (smooth) alpha mask for the filtering.
typedef MaskType::ValueType AlphaType |
typedef LevelSetTracker<GridT, InterruptT> BaseType |
|
inherited |
typedef GridT GridType |
|
inherited |
|
inherited |
|
inherited |
typedef MaskT MaskType |
typedef tree::LeafManager<TreeType>::LeafRange RangeType |
typedef GridType::TreeType TreeType |
typedef TreeType::ValueType ValueType |
|
inline |
Main constructor from a grid.
grid | The level set to be filtered. |
interrupt | Optional interrupter. |
|
inline |
Shallow copy constructor called by tbb::parallel_for() threads during filtering.
other | The other LevelSetFilter from which to copy. |
|
inlinevirtual |
Destructor.
BOOST_STATIC_ASSERT | ( | boost::is_floating_point< AlphaType >::value | ) |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
One iteration of a fast separable gaussian filter.
width | Width of the gaussian kernel in voxel units. |
mask | Optional alpha mask. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Invert the optional mask, i.e. min->max in the original mask maps to 1->0 in the inverted alpha mask.
|
inline |
Return true if the mask is inverted, i.e. min->max in the original mask maps to 1->0 in the inverted alpha mask.
|
inline |
One iteration of laplacian flow of the level set.
mask | Optional alpha mask. |
|
inlineinherited |
|
inlineinherited |
|
inline |
Return the maximum value of the mask to be used for the derivation of a smooth alpha value.
|
inline |
One iteration of mean-value flow of the level set.
width | Width of the mean-value kernel in voxel units. |
mask | Optional alpha mask. |
|
inline |
One iteration of mean-curvature flow of the level set.
mask | Optional alpha mask. |
|
inline |
One iteration of median-value flow of the level set.
width | Width of the median-value kernel in voxel units. |
mask | Optional alpha mask. |
|
inline |
Return the minimum value of the mask to be used for the derivation of a smooth alpha value.
|
inlineinherited |
Iterative normalization, i.e. solving the Eikonal equation.
Offset the level set by the specified (world) distance.
offset | Value of the offset. |
mask | Optional alpha mask. |
|
inline |
Used internally by tbb::parallel_for().
range | The range over which to perform multi-threading. |
|
inlineinherited |
Public functor called by tbb::parallel_for()
|
inlineinherited |
Remove voxels that are outside the narrow band. (substep of track)
|
inlineinherited |
Set the grain-size used for multi-threading.
Define the range for the (optional) scalar mask.
min | Minimum value of the range. |
max | Maximum value of the range. |
Mask values outside the range maps to alpha values of respectfully zero and one, and values inside the range maps smoothly to 0->1 (unless of course the mask is inverted).
ValueError | if min is not smaller then max. |
|
inlineinherited |
Set the number of normalizations performed per track or normalize call.
|
inlineinherited |
Set the spatial finite difference scheme.
|
inlineinherited |
Set the spatial finite difference scheme.
|
inlineinherited |
|
inlineinherited |
Track the level set interface, i.e. rebuild and normalize the narrow band of the level set.
|
inlineinherited |