HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::tools::GridResampler Class Reference

#include <GridTransformer.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::tools::GridResampler:

Public Types

using Ptr = SharedPtr< GridResampler >
 
using InterruptFunc = std::function< bool(void)>
 

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...
 
template<typename Sampler , typename GridT , typename Transformer >
void transformGrid (const Transformer &, const GridT &inGrid, GridT &outGrid) const
 

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:

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.

Definition at line 185 of file GridTransformer.h.

Member Typedef Documentation

Definition at line 189 of file GridTransformer.h.

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::GridResampler ( )
inline

Definition at line 191 of file GridTransformer.h.

virtual openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::~GridResampler ( )
inlinevirtual

Definition at line 192 of file GridTransformer.h.

Member Function Documentation

template<class Sampler , class GridT , typename Transformer >
void openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::applyTransform ( const Transformer &  xform,
const GridT &  inGrid,
GridT &  outGrid 
) const
protected

Definition at line 866 of file GridTransformer.h.

bool openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::interrupt ( ) const
inlineprotected

Definition at line 216 of file GridTransformer.h.

template<typename InterrupterType >
void openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::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.

Definition at line 672 of file GridTransformer.h.

void openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::setThreaded ( bool  b)
inline

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

Definition at line 195 of file GridTransformer.h.

void openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::setTransformTiles ( bool  b)
inline

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

Definition at line 199 of file GridTransformer.h.

bool openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::threaded ( ) const
inline

Return true if threading is enabled.

Definition at line 197 of file GridTransformer.h.

template<typename Sampler , typename GridT , typename Transformer >
void openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::transformGrid ( const Transformer &  xform,
const GridT &  inGrid,
GridT &  outGrid 
) const

Definition at line 681 of file GridTransformer.h.

bool openvdb::OPENVDB_VERSION_NAME::tools::GridResampler::transformTiles ( ) const
inline

Return true if tile processing is enabled.

Definition at line 201 of file GridTransformer.h.


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