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

Filtering of VDB volumes. More...

#include <Filter.h>

Public Types

typedef GridT GridType
 
typedef GridType::TreeType TreeType
 
typedef TreeType::LeafNodeType LeafType
 
typedef LeafType::ValueType ValueType
 
typedef tree::LeafManager
< TreeType
LeafManagerType
 
typedef LeafManagerType::LeafRange RangeType
 
typedef LeafManagerType::BufferType BufferType
 

Public Member Functions

 Filter (GridT &grid, InterruptT *interrupt=NULL)
 
void mean (int width=1, int iterations=1, bool serial=false)
 One iteration of a fast separable mean-value (i.e. box) filter. More...
 
void gaussian (int width=1, int iterations=1, bool serial=false)
 One iteration of a fast separable gaussian filter. More...
 
void median (int width=1, int iterations=1, bool serial=false)
 One iteration of a median-value filter. More...
 
void offset (float offset, bool serial=false)
 
void operator() (const RangeType &range) const
 Used internally by tbb::parallel_for() More...
 

Detailed Description

template<typename GridT, typename InterruptT = util::NullInterrupter>
class openvdb::v1_2_0::tools::Filter< GridT, InterruptT >

Filtering of VDB volumes.

Note
Only the values in the grid are changed, not its topology!

Member Typedef Documentation

typedef GridT GridType
typedef TreeType::LeafNodeType LeafType
typedef GridType::TreeType TreeType
typedef LeafType::ValueType ValueType

Constructor & Destructor Documentation

Filter ( GridT &  grid,
InterruptT *  interrupt = NULL 
)
inline

Constructor

Parameters
gridGrid to be filtered.
interruptOptional interrupter.

Member Function Documentation

void gaussian ( int  width = 1,
int  iterations = 1,
bool  serial = false 
)
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%!
Parameters
widthThe width of the mean-value filter is 2*width+1 voxels.
iterationsNumer of times the mean-value filter is applied.
serialFalse if multi-threading is enabled.
void mean ( int  width = 1,
int  iterations = 1,
bool  serial = false 
)
inline

One iteration of a fast separable mean-value (i.e. box) filter.

Parameters
widthThe width of the mean-value filter is 2*width+1 voxels.
iterationsNumber of times the mean-value filter is applied.
serialFalse if multi-threading is enabled.
void median ( int  width = 1,
int  iterations = 1,
bool  serial = false 
)
inline

One iteration of a median-value filter.

Note
This filter is not separable and is hence relatively slow!
Parameters
widthThe width of the mean-value filter is 2*width+1 voxels.
iterationsNumer of times the mean-value filter is applied.
serialFalse if multi-threading is enabled.
void offset ( float  offset,
bool  serial = false 
)
inline

Offsets (i.e. adds) a constant value to all active voxels.

Parameters
offsetOffset in world units
serialFalse if multi-threading is enabled.
void operator() ( const RangeType range) const
inline

Used internally by tbb::parallel_for()

Parameters
rangeRange of LeafNodes over which to multi-thread.
Warning
Never call this method directly!

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