9#ifndef DOXYGEN_SHOULD_SKIP_THIS
14 template <
typename T,
int dim>
class Image;
15 template <
typename T>
class PixelTraits;
19 template <
typename T,
int dim,
typename U>
inline typename PixelTraits<T>::template CastPixel<U>::value_type interpolate(
const Image<T,dim> &I,
FVector<U,dim> x)
21 for (
int i=0;i<dim;i++) {
22 if (x[i]<0) x[i] = U(0);
23 else if (x[i] > I.size(i)-1) x[i] = U(I.size(i)-1);
28 for (
int i=0;i<dim;i++) {
33 typedef typename PixelTraits<T>::template CastPixel<U>::value_type return_type;
34 return_type val(U(0));
37 for (
int i=0;i<dim;i++)
38 f*=((*p)[i]==c[i])?(U(1)-a[i]):a[i];
41 val=val+return_type(I(*p))*f;
Coordinates.
Definition Coords.h:16
Iterator on Coordinates.
Definition Coords.h:83
Vector of fixed size.
Definition FVector.h:17
Image.
Definition Image.h:24