|
Cortex 6.0.0
|
#include <InverseDistanceWeightedInterpolation.h>
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 |
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
| 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.
| firstPoint | RandomAccessIterator to first point |
| lastPoint | RandomAccessIterator to last point |
| firstValue | RandomAccessIterator to first value |
| lastValue | RandomAccessIterator to last value |
| numNeighbours | The amount of nearest-neighbour points to consider when performing interpolation. More usually yields slower, but better results. |
| maxLeafSize | The number of points to store in each KDTree bucket |
| 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.
1.7.3