HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme > Struct Template Reference

Checks the norm of the gradient against a range, i.e. $|\nabla\phi|\in[min,max]$. More...

#include <Diagnostics.h>

Public Types

typedef GridT::ValueType ValueType
 
typedef TreeIterT TileIterT
 
typedef tree::IterTraits
< typename TreeIterT::NodeT,
typename TreeIterT::ValueIterT >
::template NodeConverter
< typename
GridT::TreeType::LeafNodeType >
::Type 
VoxelIterT
 
typedef GridT::ConstAccessor AccT
 

Public Member Functions

 HBOOST_STATIC_ASSERT (hboost::is_floating_point< ValueType >::value)
 
 CheckNormGrad (const GridT &grid, const ValueType &_min, const ValueType &_max)
 Constructor taking a grid and a range to be tested against. More...
 
 CheckNormGrad (const CheckNormGrad &other)
 
bool operator() (const ValueType &v) const
 Return true if the value is smaller than min or larger than max. More...
 
bool operator() (const TreeIterT &) const
 Return true if zero is outside the range. More...
 
bool operator() (const VoxelIterT &iter) const
 Return true if the norm of the gradient at a voxel location of the iterator is out of range. More...
 
std::string str () const
 Return a string describing a failed check. More...
 

Public Attributes

AccT acc
 
const ValueType invdx2
 
const ValueType minVal2
 
const ValueType maxVal2
 

Detailed Description

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
struct openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >

Checks the norm of the gradient against a range, i.e. $|\nabla\phi|\in[min,max]$.

Note
Internally the test is performed as $|\nabla\phi|^2\in[min^2,max^2]$ for optimization reasons.

Definition at line 439 of file Diagnostics.h.

Member Typedef Documentation

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
typedef GridT::ConstAccessor openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::AccT

Definition at line 446 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
typedef TreeIterT openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::TileIterT

Definition at line 443 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
typedef GridT::ValueType openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::ValueType

Definition at line 441 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
typedef tree::IterTraits<typename TreeIterT::NodeT, typename TreeIterT::ValueIterT>::template NodeConverter<typename GridT::TreeType::LeafNodeType>::Type openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::VoxelIterT

Definition at line 445 of file Diagnostics.h.

Constructor & Destructor Documentation

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::CheckNormGrad ( const GridT &  grid,
const ValueType _min,
const ValueType _max 
)
inline

Constructor taking a grid and a range to be tested against.

Definition at line 449 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::CheckNormGrad ( const CheckNormGrad< GridT, TreeIterT, GradScheme > &  other)
inline

Definition at line 463 of file Diagnostics.h.

Member Function Documentation

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::HBOOST_STATIC_ASSERT ( hboost::is_floating_point< ValueType >::value  )
template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
bool openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::operator() ( const ValueType v) const
inline

Return true if the value is smaller than min or larger than max.

Definition at line 472 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
bool openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::operator() ( const TreeIterT &  ) const
inline

Return true if zero is outside the range.

Note
We assume that the norm of the gradient of a tile is always zero.

Definition at line 476 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
bool openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::operator() ( const VoxelIterT iter) const
inline

Return true if the norm of the gradient at a voxel location of the iterator is out of range.

Definition at line 480 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
std::string openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::str ( ) const
inline

Return a string describing a failed check.

Definition at line 487 of file Diagnostics.h.

Member Data Documentation

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
AccT openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::acc

Definition at line 494 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
const ValueType openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::invdx2

Definition at line 495 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
const ValueType openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::maxVal2

Definition at line 495 of file Diagnostics.h.

template<typename GridT , typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>
const ValueType openvdb::OPENVDB_VERSION_NAME::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >::minVal2

Definition at line 495 of file Diagnostics.h.


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