|
OpenVDB
4.0.2
|
Volume filtering (e.g., diffusion) with optional alpha masking. More...
#include <Filter.h>
Public Types | |
| typedef GridT | GridType |
| typedef MaskT | MaskType |
| typedef GridType::TreeType | TreeType |
| typedef TreeType::LeafNodeType | LeafType |
| typedef GridType::ValueType | ValueType |
| typedef MaskType::ValueType | AlphaType |
| typedef tree::LeafManager< TreeType > | LeafManagerType |
| typedef LeafManagerType::LeafRange | RangeType |
| typedef LeafManagerType::BufferType | BufferType |
Public Member Functions | |
| BOOST_STATIC_ASSERT (boost::is_floating_point< AlphaType >::value) | |
| Filter (GridT &grid, InterruptT *interrupt=NULL) | |
| Filter (const Filter &other) | |
| Shallow copy constructor called by tbb::parallel_for() threads during filtering. More... | |
| int | getGrainSize () const |
| void | setGrainSize (int grainsize) |
| Set the grain-size used for multi-threading. 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 | mean (int width=1, int iterations=1, const MaskType *mask=NULL) |
| One iteration of a fast separable mean-value (i.e. box) filter. More... | |
| void | gaussian (int width=1, int iterations=1, const MaskType *mask=NULL) |
| One iteration of a fast separable Gaussian filter. More... | |
| void | median (int width=1, int iterations=1, const MaskType *mask=NULL) |
| One iteration of a median-value filter. More... | |
| void | offset (ValueType offset, const MaskType *mask=NULL) |
| void | operator() (const RangeType &range) const |
| Used internally by tbb::parallel_for() More... | |
Volume filtering (e.g., diffusion) with optional alpha masking.
| typedef MaskType::ValueType AlphaType |
| typedef GridT GridType |
| typedef tree::LeafManager<TreeType> LeafManagerType |
| typedef TreeType::LeafNodeType LeafType |
| typedef MaskT MaskType |
| typedef LeafManagerType::LeafRange RangeType |
| typedef GridType::TreeType TreeType |
| typedef GridType::ValueType ValueType |
|
inline |
Constructor
| grid | Grid to be filtered. |
| interrupt | Optional interrupter. |
Shallow copy constructor called by tbb::parallel_for() threads during filtering.
| other | The other Filter from which to copy. |
| BOOST_STATIC_ASSERT | ( | boost::is_floating_point< AlphaType >::value | ) |
|
inline |
One iteration of a fast separable Gaussian filter.
| width | The width of the mean-value filter is 2*width+1 voxels. |
| iterations | Number of times the mean-value filter is applied. |
| mask | Optional alpha mask. |
|
inline |
|
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 |
Return the maximum value of the mask to be used for the derivation of a smooth alpha value.
|
inline |
One iteration of a fast separable mean-value (i.e. box) filter.
| width | The width of the mean-value filter is 2*width+1 voxels. |
| iterations | Number of times the mean-value filter is applied. |
| mask | Optional alpha mask. |
|
inline |
One iteration of a median-value filter.
| width | The width of the mean-value filter is 2*width+1 voxels. |
| iterations | Number of times the mean-value filter is applied. |
| mask | Optional alpha mask. |
|
inline |
Return the minimum value of the mask to be used for the derivation of a smooth alpha value.
Offsets (i.e. adds) a constant value to all active voxels.
| offset | Offset in the same units as the grid. |
| mask | Optional alpha mask. |
|
inline |
Used internally by tbb::parallel_for()
| range | Range of LeafNodes over which to multi-thread. |
|
inline |
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 are clamped to zero or one, and values inside the range map smoothly to 0->1 (unless the mask is inverted).
| ValueError | if min is not smaller than max. |
1.8.13