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

Functions to perform multi threaded reductions and analysis of arbitrary point attribute types. Each function imposes various requirements on the point ValueType (such as expected operators) and supports arbitrary point filters. More...

#include "PointDataGrid.h"
#include <openvdb/openvdb.h>
#include <openvdb/Types.h>
#include <openvdb/math/Math.h>
#include <openvdb/tree/LeafManager.h>
#include <tbb/parallel_reduce.h>
#include <tbb/parallel_for.h>
+ Include dependency graph for PointStatistics.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openvdb::OPENVDB_VERSION_NAME::points::statistics_internal::ScalarMinMax< ValueT >
 Scalar extent op to evaluate the min/max values of a single integral or floating point attribute type. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::points::statistics_internal::MagnitudeExtent< VecT, MagResult >
 Vector squared magnitude op to evaluate the min/max of a vector attribute and return the result as a scalar of the appropriate precision. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::points::statistics_internal::MagnitudeExtent< VecT, false >
 Vector squared magnitude op to evaluate the min/max of a vector attribute and return the result as the original vector. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::points::statistics_internal::ComponentExtent< VecT >
 Vector component-wise op to evaluate the min/max of vector components and return the result as a vector of equal size and precision. More...
 

Namespaces

 openvdb
 
 openvdb::OPENVDB_VERSION_NAME
 
 openvdb::OPENVDB_VERSION_NAME::points
 
 openvdb::OPENVDB_VERSION_NAME::points::statistics_internal
 

Functions

template<typename ValueT , typename CodecT = UnknownCodec, typename FilterT = NullFilter, typename PointDataTreeT >
std::pair< ValueT, ValueT > openvdb::OPENVDB_VERSION_NAME::points::evalMinMax (const PointDataTreeT &points, const std::string &attribute, const FilterT &filter=NullFilter())
 Evaluates the minimum and maximum values of a point attribute. More...
 
template<typename ValueT , typename CodecT = UnknownCodec, typename FilterT = NullFilter, typename PointDataTreeT >
ConvertElementType< ValueT,
double >::Type 
openvdb::OPENVDB_VERSION_NAME::points::evalAverage (const PointDataTreeT &points, const std::string &attribute, const FilterT &filter=NullFilter())
 Evaluates the average value of a point attribute. More...
 
template<typename ValueT , typename CodecT = UnknownCodec, typename FilterT = NullFilter, typename PointDataTreeT >
PromoteType< ValueT >::Highest openvdb::OPENVDB_VERSION_NAME::points::accumulate (const PointDataTreeT &points, const std::string &attribute, const FilterT &filter=NullFilter())
 Evaluates the total value of a point attribute. More...
 
template<typename ValueT , typename CodecT = UnknownCodec, typename FilterT = NullFilter, typename PointDataTreeT >
bool openvdb::OPENVDB_VERSION_NAME::points::evalMinMax (const PointDataTreeT &points, const std::string &attribute, ValueT &min, ValueT &max, const FilterT &filter=NullFilter(), typename PointDataTreeT::template ValueConverter< ValueT >::Type *minTree=nullptr, typename PointDataTreeT::template ValueConverter< ValueT >::Type *maxTree=nullptr)
 Evaluates the minimum and maximum values of a point attribute and returns whether the values are valid. Optionally constructs localised min and max value trees. More...
 
template<typename ValueT , typename CodecT = UnknownCodec, typename FilterT = NullFilter, typename PointDataTreeT , typename ResultTreeT = typename ConvertElementType<ValueT, double>::Type>
bool openvdb::OPENVDB_VERSION_NAME::points::evalAverage (const PointDataTreeT &points, const std::string &attribute, typename ConvertElementType< ValueT, double >::Type &average, const FilterT &filter=NullFilter(), typename PointDataTreeT::template ValueConverter< ResultTreeT >::Type *averageTree=nullptr)
 Evaluates the average value of a point attribute and returns whether the value is valid. Optionally constructs localised average value trees. More...
 
template<typename ValueT , typename CodecT = UnknownCodec, typename FilterT = NullFilter, typename PointDataTreeT , typename ResultTreeT = typename PromoteType<ValueT>::Highest>
bool openvdb::OPENVDB_VERSION_NAME::points::accumulate (const PointDataTreeT &points, const std::string &attribute, typename PromoteType< ValueT >::Highest &total, const FilterT &filter=NullFilter(), typename PointDataTreeT::template ValueConverter< ResultTreeT >::Type *totalTree=nullptr)
 Evaluates the total value of a point attribute and returns whether the value is valid. Optionally constructs localised total value trees. More...
 
template<typename ValueT , typename CodecT , typename FilterT , typename ExtentOp , typename PointDataTreeT >
bool openvdb::OPENVDB_VERSION_NAME::points::statistics_internal::evalExtents (const PointDataTreeT &points, const std::string &attribute, typename ExtentOp::ExtentT &ext, const FilterT &filter, typename PointDataTreeT::template ValueConverter< typename ExtentOp::ExtentT::first_type >::Type *const minTree=nullptr, typename PointDataTreeT::template ValueConverter< typename ExtentOp::ExtentT::second_type >::Type *const maxTree=nullptr)
 
template<typename ValueT , typename CodecT , typename FilterT , typename PointDataTreeT , typename std::enable_if< ValueTraits< ValueT >::IsVec, int >::type = 0>
bool openvdb::OPENVDB_VERSION_NAME::points::statistics_internal::evalExtents (const PointDataTreeT &points, const std::string &attribute, ValueT &min, ValueT &max, const FilterT &filter, typename PointDataTreeT::template ValueConverter< ValueT >::Type *minTree, typename PointDataTreeT::template ValueConverter< ValueT >::Type *maxTree)
 

Detailed Description

Functions to perform multi threaded reductions and analysis of arbitrary point attribute types. Each function imposes various requirements on the point ValueType (such as expected operators) and supports arbitrary point filters.

Author
Nick Avramoussis

Definition in file PointStatistics.h.