OpenVDB  0.104.0
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
GridResampler Class Reference

#include <GridTransformer.h>

Inherited by GridTransformer.

Public Types

typedef boost::shared_ptr
< GridResampler
Ptr
 
typedef boost::function< bool(void)> InterruptFunc
 

Public Member Functions

 GridResampler ()
 
virtual ~GridResampler ()
 
void setThreaded (bool b)
 Enable or disable threading. (Threading is enabled by default.) More...
 
bool threaded () const
 Return true if threading is enabled. More...
 
void setTransformTiles (bool b)
 Enable or disable processing of tiles. (Enabled by default, except for level set grids.) More...
 
bool transformTiles () const
 Return true if tile processing is enabled. More...
 
template<typename InterrupterType >
void setInterrupter (InterrupterType &)
 Allow processing to be aborted by providing an interrupter object. The interrupter will be queried periodically during processing. More...
 
OPENVDB_DEPRECATED void setInterrupt (const InterruptFunc &f)
 Allow processing to be aborted by providing a callable that takes no arguments and that returns true when processing should be aborted and false if it should continue. More...
 
template<typename Sampler , typename GridT , typename Transformer >
void transformGrid (const Transformer &, const GridT &inGrid, GridT &outGrid) const
 
template<class Sampler , class InTreeT , class OutTreeT , class Transformer >
void transformBBox (const Transformer &xform, const CoordBBox &bbox, const InTreeT &inTree, OutTreeT &outTree, const InterruptFunc &interrupt, const Sampler &sampler)
 

Protected Member Functions

template<typename Sampler , typename GridT , typename Transformer >
void applyTransform (const Transformer &, const GridT &inGrid, GridT &outGrid) const
 
bool interrupt () const
 

Detailed Description

A GridResampler applies a geometric transformation to an input grid using one of several sampling schemes, and stores the result in an output grid.

Usage:

GridResampler resampler();
resampler.transformGrid<BoxSampler>(xform, inGrid, outGrid);

where xform is a functor that implements the following methods:

bool isAffine() const
openvdb::Vec3d transform(const openvdb::Vec3d&) const
openvdb::Vec3d invTransform(const openvdb::Vec3d&) const
Note
When the transform is affine and can be expressed as a 4 x 4 matrix, a GridTransformer is much more efficient than a GridResampler.

Member Typedef Documentation

typedef boost::function<bool (void)> InterruptFunc
typedef boost::shared_ptr<GridResampler> Ptr

Constructor & Destructor Documentation

GridResampler ( )
inline
virtual ~GridResampler ( )
inlinevirtual

Member Function Documentation

void applyTransform ( const Transformer &  xform,
const GridT &  inGrid,
GridT &  outGrid 
) const
protected
bool interrupt ( ) const
inlineprotected
OPENVDB_DEPRECATED void setInterrupt ( const InterruptFunc f)
inline

Allow processing to be aborted by providing a callable that takes no arguments and that returns true when processing should be aborted and false if it should continue.

The supplied callable will be called periodically during processing.

Deprecated:
Use setInterrupter() instead.
void setInterrupter ( InterrupterType &  interrupter)

Allow processing to be aborted by providing an interrupter object. The interrupter will be queried periodically during processing.

See Also
util/NullInterrupter.h for interrupter interface requirements.
void setThreaded ( bool  b)
inline

Enable or disable threading. (Threading is enabled by default.)

void setTransformTiles ( bool  b)
inline

Enable or disable processing of tiles. (Enabled by default, except for level set grids.)

bool threaded ( ) const
inline

Return true if threading is enabled.

void transformBBox ( const Transformer &  xform,
const CoordBBox bbox,
const InTreeT &  inTree,
OutTreeT &  outTree,
const InterruptFunc interrupt,
const Sampler &  sampler 
)
void transformGrid ( const Transformer &  xform,
const GridT &  inGrid,
GridT &  outGrid 
) const
bool transformTiles ( ) const
inline

Return true if tile processing is enabled.


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