OpenVDB  1.1.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BaseStencil< _GridType, StencilType > Class Template Reference

#include <Stencils.h>

Public Types

typedef _GridType GridType
typedef GridType::TreeType TreeType
typedef GridType::ValueType ValueType
typedef std::vector< ValueTypeBufferType
typedef BufferType::iterator IterType

Public Member Functions

void moveTo (const Coord &ijk)
template<typename IterType >
void moveTo (const IterType &iter)
 Initialize the stencil buffer with the values of voxel (x, y, z) and its neighbors.
ValueType getValue (unsigned int pos=0) const
 Return the value from the stencil buffer with linear offset pos.
template<int i, int j, int k>
const ValueTypegetValue () const
 Return the value at the specified location relative to the center of the stencil.
template<int i, int j, int k>
void setValue (const ValueType &value)
 Set the value at the specified location relative to the center of the stencil.
int size ()
 Return the size of the stencil buffer.
ValueType median () const
 Return the median value of the current stencil.
ValueType mean () const
 Return the mean value of the current stencil.
ValueType min () const
 Return the smallest value in the stencil buffer.
ValueType max () const
 Return the largest value in the stencil buffer.
const CoordgetCenterCoord () const
 Return the coordinates of the center point of the stencil.
const ValueTypegetCenterValue () const
 Return the value at the center of the stencil.
bool intersects (const ValueType &isoValue=zeroVal< ValueType >()) const

Protected Member Functions

 BaseStencil (const GridType &grid, int size)

Protected Attributes

GridType::ConstAccessor mCache
BufferType mStencil
Coord mCenter

Member Typedef Documentation

typedef std::vector<ValueType> BufferType
typedef _GridType GridType
typedef BufferType::iterator IterType
typedef GridType::TreeType TreeType
typedef GridType::ValueType ValueType

Constructor & Destructor Documentation

BaseStencil ( const GridType grid,
int  size 
)
inlineprotected

Member Function Documentation

const Coord& getCenterCoord ( ) const
inline

Return the coordinates of the center point of the stencil.

const ValueType& getCenterValue ( ) const
inline

Return the value at the center of the stencil.

ValueType getValue ( unsigned int  pos = 0) const
inline

Return the value from the stencil buffer with linear offset pos.

The default (pos = 0) corresponds to the center point of the stencil.

const ValueType& getValue ( ) const
inline

Return the value at the specified location relative to the center of the stencil.

bool intersects ( const ValueType isoValue = zeroVal<ValueType>()) const
inline

Return true if the center of the stencil intersects the iso-contour specified by the isoValue

ValueType max ( ) const
inline

Return the largest value in the stencil buffer.

ValueType mean ( ) const
inline

Return the mean value of the current stencil.

ValueType median ( ) const
inline

Return the median value of the current stencil.

ValueType min ( ) const
inline

Return the smallest value in the stencil buffer.

void moveTo ( const Coord ijk)
inline

Initialize the stencil buffer with the values of voxel (x, y, z) and its neighbors.

void moveTo ( const IterType iter)
inline

Initialize the stencil buffer with the values of voxel (x, y, z) and its neighbors.

Note
This version is slightly faster than the one above, since the center voxel's value is read directly from the iterator.
void setValue ( const ValueType value)
inline

Set the value at the specified location relative to the center of the stencil.

int size ( )
inline

Return the size of the stencil buffer.

Member Data Documentation

GridType::ConstAccessor mCache
protected
Coord mCenter
protected
BufferType mStencil
protected

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