HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DenseSparseTools.h File Reference
#include <tbb/parallel_reduce.h>
#include <tbb/blocked_range3d.h>
#include <tbb/blocked_range2d.h>
#include <tbb/blocked_range.h>
#include <openvdb/Types.h>
#include <openvdb/tree/LeafManager.h>
#include "Dense.h"
#include <algorithm>
#include <vector>
+ Include dependency graph for DenseSparseTools.h:

Go to the source code of this file.

Classes

struct  openvdb::OPENVDB_VERSION_NAME::tools::DSConverter< DenseType, TreeType >
 
class  openvdb::OPENVDB_VERSION_NAME::tools::SparseExtractor< OpType, DenseType >
 Functor-based class used to extract data that satisfies some criteria defined by the embedded OpType functor. The extractSparseTree function wraps this class. More...
 
class  openvdb::OPENVDB_VERSION_NAME::tools::SparseMaskedExtractor< DenseType, MaskTreeType >
 Functor-based class used to extract data from a dense grid, at the index-space intersection with a supplied mask in the form of a sparse tree. The extractSparseTreeWithMask function wraps this class. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ExtractAll< _ResultTreeType, DenseValueType >
 a simple utility class used by extractSparseTreeWithMask More...
 
class  openvdb::OPENVDB_VERSION_NAME::tools::DenseTransformer< _ValueT, OpType >
 Class that applies a functor to the index space intersection of a prescribed bounding box and the dense grid. NB: This class only supports DenseGrids with ZYX memory layout. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ContiguousOp< ValueT, PointWiseOp >
 a wrapper struct used to avoid unnecessary computation of memory access from Coord when all offsets are guaranteed to be within the dense grid. More...
 
class  openvdb::OPENVDB_VERSION_NAME::tools::SparseToDenseCompositor< CompositeMethod, _TreeT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::OpOver< ValueT >
 Point wise methods used to apply various compositing operations. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::OpAdd< ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::OpSub< ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::OpMin< ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::OpMax< ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::OpMult< ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::CompositeFunctorTranslator< OP, ValueT >
 Translator that converts an enum to compositing functor types. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::CompositeFunctorTranslator< DS_OVER, ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::CompositeFunctorTranslator< DS_ADD, ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::CompositeFunctorTranslator< DS_SUB, ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::CompositeFunctorTranslator< DS_MIN, ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::CompositeFunctorTranslator< DS_MAX, ValueT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::ds::CompositeFunctorTranslator< DS_MULT, ValueT >
 

Namespaces

 openvdb
 
 openvdb::OPENVDB_VERSION_NAME
 
 openvdb::OPENVDB_VERSION_NAME::tools
 
 openvdb::OPENVDB_VERSION_NAME::tools::ds
 

Enumerations

enum  openvdb::OPENVDB_VERSION_NAME::tools::DSCompositeOp {
  openvdb::OPENVDB_VERSION_NAME::tools::DS_OVER, openvdb::OPENVDB_VERSION_NAME::tools::DS_ADD, openvdb::OPENVDB_VERSION_NAME::tools::DS_SUB, openvdb::OPENVDB_VERSION_NAME::tools::DS_MIN,
  openvdb::OPENVDB_VERSION_NAME::tools::DS_MAX, openvdb::OPENVDB_VERSION_NAME::tools::DS_MULT, openvdb::OPENVDB_VERSION_NAME::tools::DS_SET
}
 

Functions

template<typename OpType , typename DenseType >
OpType::ResultTreeType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::extractSparseTree (const DenseType &dense, const OpType &functor, const typename OpType::ResultValueType &background, bool threaded=true)
 Selectively extract and transform data from a dense grid, producing a sparse tree with leaf nodes only (e.g. create a tree from the square of values greater than a cutoff.) More...
 
template<typename DenseType , typename MaskTreeType >
DSConverter< DenseType,
MaskTreeType >::Type::Ptr 
openvdb::OPENVDB_VERSION_NAME::tools::extractSparseTreeWithMask (const DenseType &dense, const MaskTreeType &mask, const typename DenseType::ValueType &background, bool threaded=true)
 Copy data from the intersection of a sparse tree and a dense input grid. The resulting tree has the same configuration as the sparse tree, but holds the data type specified by the dense input. More...
 
template<typename ValueT , typename OpType >
void openvdb::OPENVDB_VERSION_NAME::tools::transformDense (Dense< ValueT, openvdb::tools::LayoutZYX > &dense, const openvdb::CoordBBox &bbox, const OpType &op, bool parallel=true)
 
template<DSCompositeOp , typename TreeT >
void openvdb::OPENVDB_VERSION_NAME::tools::compositeToDense (Dense< typename TreeT::ValueType, LayoutZYX > &dense, const TreeT &source, const TreeT &alpha, const typename TreeT::ValueType beta, const typename TreeT::ValueType strength, bool threaded=true)
 Composite data from a sparse tree into a dense array of the same value type. More...
 
template<typename ValueT , typename PointwiseOpT >
void openvdb::OPENVDB_VERSION_NAME::tools::transformDense (Dense< ValueT, openvdb::tools::LayoutZYX > &dense, const openvdb::CoordBBox &bbox, const PointwiseOpT &functor, bool parallel)
 Apply a point-wise functor to the intersection of a dense grid and a given bounding box. More...