OpenVDB 12.1.0

Loading...
Searching...
No Matches
Prune.h File Reference

Defined various multi-threaded utility functions for trees. More...

`#include <openvdb/math/Math.h>`
`#include <openvdb/Types.h>`
`#include <openvdb/tree/NodeManager.h>`
`#include <openvdb/openvdb.h>`
`#include <algorithm>`
`#include <type_traits>`

Go to the source code of this file.

## Classes
class | InactivePruneOp< TreeT, TerminationLevel >
class | TolerancePruneOp< TreeT, TerminationLevel >
class | LevelSetPruneOp< TreeT, TerminationLevel >

## Namespaces
namespace | openvdb
namespace | openvdb::v12_1
namespace | openvdb::v12_1::tools

## Functions
template<typename TreeT>
void | prune (TreeT &tree, typename TreeT::ValueType tolerance=zeroVal< typename TreeT::ValueType >(), bool threaded=true, size_t grainSize=1)
| Reduce the memory footprint of a tree by replacing with tiles any nodes whose values are all the same (optionally to within a tolerance) and have the same active state.
template<typename TreeT>
void | pruneTiles (TreeT &tree, typename TreeT::ValueType tolerance=zeroVal< typename TreeT::ValueType >(), bool threaded=true, size_t grainSize=1)
| Reduce the memory footprint of a tree by replacing with tiles any non-leaf nodes whose values are all the same (optionally to within a tolerance) and have the same active state.
template<typename TreeT>
void | pruneInactive (TreeT &tree, bool threaded=true, size_t grainSize=1)
| Reduce the memory footprint of a tree by replacing with background tiles any nodes whose values are all inactive.
template<typename TreeT>
void | pruneInactiveWithValue (TreeT &tree, const typename TreeT::ValueType &value, bool threaded=true, size_t grainSize=1)
| Reduce the memory footprint of a tree by replacing any nodes whose values are all inactive with tiles of the given value.
template<typename TreeT>
void | pruneLevelSet (TreeT &tree, bool threaded=true, size_t grainSize=1)
| Reduce the memory footprint of a tree by replacing nodes whose values are all inactive with inactive tiles having a value equal to the first value encountered in the (inactive) child.
template<typename TreeT>
void | pruneLevelSet (TreeT &tree, const typename TreeT::ValueType &outsideWidth, const typename TreeT::ValueType &insideWidth, bool threaded=true, size_t grainSize=1)
| Reduce the memory footprint of a tree by replacing nodes whose voxel values are all inactive with inactive tiles having the value -| insideWidth | if the voxel values are negative and | outsideWidth | otherwise.

## Detailed Description

Defined various multi-threaded utility functions for trees.

Author
  Ken Museth