HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp Struct Reference

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...

#include <Morphology.h>

Public Types

using Word = typename std::conditional< LOG2DIM==3, uint8_t, typename std::conditional< LOG2DIM==4, uint16_t, typename std::conditional< LOG2DIM==5, uint32_t, typename std::conditional< LOG2DIM==6, uint64_t, void >::type >::type >::type >::type
 

Public Member Functions

 NodeMaskOp (AccessorType &accessor, const NearestNeighbors op)
 
void dilate (LeafType &leaf)
 Dilate a single leaf node by the current spatial scheme stored on the instance of this NodeMaskOp. Neighbor leaf nodes are also updated. More...
 
void dilate (LeafType &leaf, const MaskType &mask)
 Dilate a single leaf node by the current spatial scheme stored on the instance of this NodeMaskOp. The provided mask is used in place of the actual leaf's node mask and applied to the leaf afterwards. Neighbor leaf nodes are also updated. More...
 
MaskType erode (const LeafType &leaf)
 Erode a single leaf node by the current spatial scheme stored on the instance of this NodeMaskOp. More...
 
void erode (const LeafType &leaf, MaskType &mask)
 Erode a single leaf node by the current spatial scheme stored on the instance of this NodeMaskOp. The provided mask is used in place of the actual leaf's node mask and stores the erosion result. More...
 

Static Public Attributes

static const Int32 DIM = static_cast<Int32>(LeafType::DIM)
 
static const Int32 LOG2DIM = static_cast<Int32>(LeafType::LOG2DIM)
 

Detailed Description

template<typename TreeType>
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.

Definition at line 241 of file Morphology.h.

Member Typedef Documentation

template<typename TreeType>
using openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp::Word = typename std::conditional<LOG2DIM == 3, uint8_t, typename std::conditional<LOG2DIM == 4, uint16_t, typename std::conditional<LOG2DIM == 5, uint32_t, typename std::conditional<LOG2DIM == 6, uint64_t, void>::type>::type>::type>::type

Definition at line 251 of file Morphology.h.

Constructor & Destructor Documentation

template<typename TreeType>
openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp::NodeMaskOp ( AccessorType accessor,
const NearestNeighbors  op 
)
inline

Definition at line 256 of file Morphology.h.

Member Function Documentation

template<typename TreeType>
void openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp::dilate ( LeafType leaf)
inline

Dilate a single leaf node by the current spatial scheme stored on the instance of this NodeMaskOp. Neighbor leaf nodes are also updated.

Unlike erode, dilate is expected to be called in a single threaded context as it will update the node masks of neighboring leaf nodes as well as the provided leaf.

Parameters
leafThe leaf to dilate. The leaf's origin and value mask are used to calculate the result of the dilation.

Definition at line 273 of file Morphology.h.

template<typename TreeType>
void openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp::dilate ( LeafType leaf,
const MaskType mask 
)
inline

Dilate a single leaf node by the current spatial scheme stored on the instance of this NodeMaskOp. The provided mask is used in place of the actual leaf's node mask and applied to the leaf afterwards. Neighbor leaf nodes are also updated.

Unlike erode, dilate is expected to be called in a single threaded context as it will update the node masks of neighboring leaf nodes as well as the provided leaf.

Parameters
leafThe leaf to dilate. The leaf's origin is used to calculate the result of the dilation.
maskThe node mask to use in place of the current leaf node mask.

Definition at line 292 of file Morphology.h.

template<typename TreeType>
MaskType openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp::erode ( const LeafType leaf)
inline

Erode a single leaf node by the current spatial scheme stored on the instance of this NodeMaskOp.

Unlike dilate, this method updates the provided mask and does not apply the result to the leaf node. The leaf node is simply used to infer the position in the tree to find it's neighbors. This allows erode to be called from multiple threads

Parameters
leafThe leaf to erode. The leaf's origin is used to calculate the result of the erosion.
Returns
The eroded mask

Definition at line 317 of file Morphology.h.

template<typename TreeType>
void openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp::erode ( const LeafType leaf,
MaskType mask 
)
inline

Erode a single leaf node by the current spatial scheme stored on the instance of this NodeMaskOp. The provided mask is used in place of the actual leaf's node mask and stores the erosion result.

Unlike dilate, this method updates the provided mask and does not apply the result to the leaf node. The leaf node is simply used to infer the position in the tree to find it's neighbors.

Parameters
leafThe leaf to erode. The leaf's origin is used to calculate the result of the erosion.
maskThe node mask to use in place of the current leaf node mask.

Definition at line 337 of file Morphology.h.

Member Data Documentation

template<typename TreeType>
const Int32 openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp::DIM = static_cast<Int32>(LeafType::DIM)
static

Definition at line 243 of file Morphology.h.

template<typename TreeType>
const Int32 openvdb::OPENVDB_VERSION_NAME::tools::morphology::Morphology< TreeType >::NodeMaskOp::LOG2DIM = static_cast<Int32>(LeafType::LOG2DIM)
static

Definition at line 244 of file Morphology.h.


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