Loading...
Searching...
No Matches
CheckNormGrad< GridT, TreeIterT, GradScheme > Struct Template Reference

Checks the norm of the gradient against a range, i.e., |∇Φ| ∈ [min, max]. More...

`#include <openvdb/tools/Diagnostics.h>`

## Public Types

using | ValueType = typename GridT::ValueType
using | TileIterT = TreeIterT
using | VoxelIterT
using | AccT = typename GridT::ConstAccessor

## Public Member Functions

| CheckNormGrad (const GridT &grid, const ValueType &_min, const ValueType &_max)
| Constructor taking a grid and a range to be tested against.
| CheckNormGrad (const CheckNormGrad &other)
bool | operator() (const ValueType &v) const
| Return true if the value is smaller than min or larger than max.
bool | operator() (const TreeIterT &) const
| Return true if zero is outside the range.
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.
std::string | str () const
| Return a string describing a failed check.

## 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::v11_0::tools::CheckNormGrad< GridT, TreeIterT, GradScheme >

Checks the norm of the gradient against a range, i.e., |∇Φ| ∈ [min, max].

Note
  Internally the test is performed as |∇Φ|² ∈ [min², max²] for optimization reasons.

## Member Typedef Documentation

## AccT

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

using AccT = typename GridT::ConstAccessor

## TileIterT

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

using TileIterT = TreeIterT

## ValueType

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

using ValueType = typename GridT::ValueType

## VoxelIterT

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

using VoxelIterT

Initial value:
typename tree::IterTraits<typename TreeIterT::NodeT,
typename TreeIterT::ValueIterT> ::template NodeConverter<
typename GridT::TreeType::LeafNodeType>::Type
openvdb::v11_0::tools::Type
openvdb::v11_0::tree::IterTraits
Definition TreeIterator.h:60

## Constructor & Destructor Documentation

## CheckNormGrad() [1/2]

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

CheckNormGrad | ( | const GridT & | grid,
|  | const ValueType & | _min,
|  | const ValueType & | _max )

inline

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

## CheckNormGrad() [2/2]

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

CheckNormGrad | ( | const CheckNormGrad< GridT, TreeIterT, GradScheme > & | other | ) |

inline

## Member Function Documentation

## operator()() [1/3]

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

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

## operator()() [2/3]

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

bool operator() | ( | const ValueType & | v | ) | const

inline

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

## operator()() [3/3]

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

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

## str()

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

std::string str | ( |  | ) | const

inline

Return a string describing a failed check.

## Member Data Documentation

## acc

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

AccT acc

## invdx2

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

const ValueType invdx2

## maxVal2

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

const ValueType maxVal2

## minVal2

template<typename GridT, typename TreeIterT = typename GridT::ValueOnCIter, math::BiasedGradientScheme GradScheme = math::FIRST_BIAS>

const ValueType minVal2