20#ifndef vtkImageInterpolatorInternals_h
21#define vtkImageInterpolatorInternals_h
68 static int Floor(
double x, F& f);
71 static int Round(
double x);
74 static int Clamp(
int a,
int b,
int c);
75 static int Wrap(
int a,
int b,
int c);
76 static int Mirror(
int a,
int b,
int c);
120#define VTK_INTERPOLATE_FLOOR_TOL 7.62939453125e-06
126#if VTK_SIZEOF_VOID_P >= 8
129 long long i =
static_cast<long long>(x);
130 f =
static_cast<F
>(x - i);
131 return static_cast<int>(i - 103079215104LL);
132#elif !defined VTK_WORDS_BIGENDIAN
139 dual.d = x + 103079215104.0;
140 f = dual.s[0] * 0.0000152587890625;
141 return static_cast<int>((dual.i[1] << 16) | ((dual.i[0]) >> 16));
149 dual.d = x + 103079215104.0;
150 f = dual.s[3] * 0.0000152587890625;
151 return static_cast<int>((dual.i[0] << 16) | ((dual.i[1]) >> 16));
157#if VTK_SIZEOF_VOID_P >= 8
160 long long i =
static_cast<long long>(x);
161 return static_cast<int>(i - 103079215104LL);
162#elif !defined VTK_WORDS_BIGENDIAN
168 dual.d = x + 103079215104.5;
169 return static_cast<int>((dual.i[1] << 16) | ((dual.i[0]) >> 16));
176 dual.d = x + 103079215104.5;
177 return static_cast<int>((dual.i[0] << 16) | ((dual.i[1]) >> 16));
186 a = (a <= c ? a : c);
188 a = (a >= 0 ? a : 0);
197 int range = c - b + 1;
201 a = (a >= 0 ? a : a + range);
210#ifndef VTK_IMAGE_BORDER_LEGACY_MIRROR
212 int ifzero = (range == 0);
213 int range2 = 2 * range + ifzero;
215 a = (a >= 0 ? a : -a);
217 a = (a <= range ? a : range2 - a);
220 int range = c - b + 1;
221 int range2 = 2 * range;
223 a = (a >= 0 ? a : -a - 1);
225 a = (a < range ? a : range2 - a - 1);
abstract superclass for arrays of numeric data
static int Clamp(int a, int b, int c)
static int Floor(double x, F &f)
static int Mirror(int a, int b, int c)
static int Wrap(int a, int b, int c)
static int Round(double x)
vtkInterpolationWeights(const vtkInterpolationInfo &info)
#define VTK_INTERPOLATE_FLOOR_TOL