OpenVDB: Morphology.h File Reference

OpenVDB 8.0.0

Classes | Namespaces | Enumerations | Functions
Morphology.h File Reference

Implementation of morphological dilation and erosion. More...

`#include <openvdb/Types.h>`
`#include <openvdb/Grid.h>`
`#include <openvdb/math/Math.h>`
`#include <openvdb/tree/TreeIterator.h>`
`#include <openvdb/tree/ValueAccessor.h>`
`#include <openvdb/tree/LeafManager.h>`
`#include "Prune.h"`
`#include "ValueTransformer.h"`
`#include <tbb/tbb_thread.h>`
`#include <tbb/task_scheduler_init.h>`
`#include <tbb/enumerable_thread_specific.h>`
`#include <tbb/parallel_for.h>`
`#include <functional>`
`#include <type_traits>`
`#include <vector>`

Go to the source code of this file.

## Classes
struct | DimToWord< Log2Dim >
| Mapping from a Log2Dim to a data type of size 2^Log2Dim bits. More...
struct | DimToWord< 3 >
struct | DimToWord< 4 >
struct | DimToWord< 5 >
struct | DimToWord< 6 >
class | Morphology< TreeType >
struct | Morphology< TreeType >::Neighbor
struct | Morphology< TreeType >::LeafCache
struct | Morphology< TreeType >::ErodeVoxelsOp
struct | Morphology< TreeType >::MaskManager
struct | Morphology< TreeType >::UpdateMasks
struct | Morphology< TreeType >::CopyMasks
class | ActivationOp< TreeType >
class | DilationOp< TreeT >
| Class that performs multi-threaded dilation with support for active tiles. More...

## Namespaces
| openvdb
| openvdb::v8_2
| openvdb::v8_2::tools
| openvdb::v8_2::tools::activation

## Enumerations
enum | NearestNeighbors { NN_FACE = 6, NN_FACE_EDGE = 18, NN_FACE_EDGE_VERTEX = 26 }
| Voxel topology of nearest neighbors. More...
enum | TilePolicy { IGNORE_TILES, EXPAND_TILES, PRESERVE_TILES }
| Different policies when dilating trees with active tiles. More...

## Functions
template<typename TreeType >
void | dilateActiveValues (TreeType &tree, int iterations=1, NearestNeighbors nn=NN_FACE, TilePolicy mode=PRESERVE_TILES)
| Topologically dilate all active values (i.e. both voxels and tiles) in a tree using one of three nearest neighbor connectivity patterns. More...
template<typename TreeType >
void | dilateActiveValues (tree::LeafManager< TreeType > &manager, int iterations=1, NearestNeighbors nn=NN_FACE, TilePolicy mode=PRESERVE_TILES)
| Topologically dilate all active values (i.e. both voxels and tiles) in a tree using one of three nearest neighbor connectivity patterns. More...
template<typename TreeType >
void | dilateVoxels (TreeType &tree, int iterations=1, NearestNeighbors nn=NN_FACE)
| Topologically dilate all leaf-level active voxels in a tree using one of three nearest neighbor connectivity patterns. More...
template<typename TreeType >
void | dilateVoxels (tree::LeafManager< TreeType > &manager, int iterations=1, NearestNeighbors nn=NN_FACE)
| Topologically dilate all leaf-level active voxels in a tree using one of three nearest neighbor connectivity patterns. More...
template<typename TreeType >
void | erodeVoxels (TreeType &tree, int iterations=1, NearestNeighbors nn=NN_FACE)
| Topologically erode all leaf-level active voxels in the given tree. More...
template<typename TreeType >
void | erodeVoxels (tree::LeafManager< TreeType > &manager, int iterations=1, NearestNeighbors nn=NN_FACE)
template<typename GridOrTree >
void | activate (GridOrTree &, const typename GridOrTree::ValueType &value, const typename GridOrTree::ValueType &tolerance=zeroVal< typename GridOrTree::ValueType >())
| Mark as active any inactive tiles or voxels in the given grid or tree whose values are equal to value (optionally to within the given tolerance). More...
template<typename GridOrTree >
void | deactivate (GridOrTree &, const typename GridOrTree::ValueType &value, const typename GridOrTree::ValueType &tolerance=zeroVal< typename GridOrTree::ValueType >())
| Mark as inactive any active tiles or voxels in the given grid or tree whose values are equal to value (optionally to within the given tolerance). More...

## Detailed Description

Implementation of morphological dilation and erosion.

Note
  By design the morphological operations only change the state of voxels, not their values. If one desires to change the values of voxels that change state an efficient technique is to construct a boolean mask by performing a topology difference between the original and final grids.

Author
  Ken Museth