Cortex 6.0.0
Public Types | Public Member Functions

IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator > Class Template Reference

#include <InverseDistanceWeightedInterpolation.h>

List of all members.

Public Types

typedef std::iterator_traits
< PointIterator >::value_type 
Point
typedef VectorTraits< Point >
::BaseType 
PointBaseType
typedef KDTree< PointIterator > Tree
typedef std::vector< typename
Tree::Neighbour
NeighbourVector
typedef std::iterator_traits
< ValueIterator >::value_type 
Value

Public Member Functions

 InverseDistanceWeightedInterpolation (PointIterator firstPoint, PointIterator lastPoint, ValueIterator firstValue, ValueIterator lastValue, unsigned int numNeighbours, int maxLeafSize=4)
Value operator() (const Point &p) const
 Evaluate the interpolated value for the specified point.
Value operator() (const Point &p, NeighbourVector &neighbours) const

Detailed Description

template<typename PointIterator, typename ValueIterator>
class IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >

The InverseDistanceWeightedInterpolation class provides interpolation of scattered data. It is templated so that it can operate on a wide variety of point/value types. NB. The Value must be default constructible, and define sensible value=value+value, and value=value*scalar operators


Constructor & Destructor Documentation

template<typename PointIterator , typename ValueIterator >
IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::InverseDistanceWeightedInterpolation ( PointIterator  firstPoint,
PointIterator  lastPoint,
ValueIterator  firstValue,
ValueIterator  lastValue,
unsigned int  numNeighbours,
int  maxLeafSize = 4 
)

Creates the interpolator. Note that it does not own the passed points or values - it is up to you to ensure that they remain valid and unchanged as long as the interpolator is in use.

Parameters:
firstPointRandomAccessIterator to first point
lastPointRandomAccessIterator to last point
firstValueRandomAccessIterator to first value
lastValueRandomAccessIterator to last value
numNeighboursThe amount of nearest-neighbour points to consider when performing interpolation. More usually yields slower, but better results.
maxLeafSizeThe number of points to store in each KDTree bucket

Member Function Documentation

template<typename PointIterator , typename ValueIterator >
Value IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::operator() ( const Point &  p,
NeighbourVector &  neighbours 
) const

As above, but returning information about which neighbours contributed to the result. Note that for repeated queries it is quicker to call this method reusing the same NeighbourVector than it is to call the version above, which has to allocate a NeighbourVector each time.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends