HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Morphology.h File Reference

Implementation of morphological dilation and erosion. More...

#include "Activate.h"
#include "Prune.h"
#include "ValueTransformer.h"
#include <openvdb/Types.h>
#include <openvdb/Grid.h>
#include <openvdb/tree/ValueAccessor.h>
#include <openvdb/tree/LeafManager.h>
#include <openvdb/openvdb.h>
#include <openvdb/points/PointDataGrid.h>
#include <tbb/task_arena.h>
#include <tbb/enumerable_thread_specific.h>
#include <tbb/parallel_for.h>
#include <type_traits>
#include <vector>
+ Include dependency graph for Morphology.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >
 Dilation/Erosion operations over a Trees leaf level voxel topology. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp
 Node Mask dilation/erosion operations for individual leaf nodes on a given tree. The leaf node may optionally belong to a different tree than the provided accessor, which will have the effect of dilating the leaf node mask into a different tree, or eroding the node mask based on corresponding neighbors in a different tree. More...
 

Namespaces

 openvdb
 
 openvdb::OPENVDB_VERSION_NAME
 
 openvdb::OPENVDB_VERSION_NAME::tools
 
 openvdb::OPENVDB_VERSION_NAME::tools::morphology
 

Enumerations

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

Functions

template<typename TreeOrLeafManagerT >
void openvdb::OPENVDB_VERSION_NAME::tools::dilateActiveValues (TreeOrLeafManagerT &tree, const int iterations=1, const NearestNeighbors nn=NN_FACE, const TilePolicy mode=PRESERVE_TILES, const bool threaded=true)
 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 TreeOrLeafManagerT >
void openvdb::OPENVDB_VERSION_NAME::tools::erodeActiveValues (TreeOrLeafManagerT &tree, const int iterations=1, const NearestNeighbors nn=NN_FACE, const TilePolicy mode=PRESERVE_TILES, const bool threaded=true)
 Topologically erode all active values (i.e. both voxels and tiles) in a tree using one of three nearest neighbor connectivity patterns. More...
 
template<typename TreeT >
std::enable_if< std::is_same
< TreeT, typename
TreeT::template ValueConverter
< ValueMask >::Type >::value,
typename TreeT::template
ValueConverter< ValueMask >
::Type * >::type 
openvdb::OPENVDB_VERSION_NAME::tools::morphology::getMaskTree (TreeT &tree)
 
template<typename TreeT >
std::enable_if<!std::is_same
< TreeT, typename
TreeT::template ValueConverter
< ValueMask >::Type >::value,
typename TreeT::template
ValueConverter< ValueMask >
::Type * >::type 
openvdb::OPENVDB_VERSION_NAME::tools::morphology::getMaskTree (TreeT &)
 

Detailed Description

Implementation of morphological dilation and erosion.

Authors
Ken Museth, Nick Avramoussis
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.

Definition in file Morphology.h.