8#ifndef vtkImageInterpolatorInternals_h
9#define vtkImageInterpolatorInternals_h
16VTK_ABI_NAMESPACE_BEGIN
58 static int Floor(
double x, F& f);
61 static int Round(
double x);
64 static int Clamp(
int a,
int b,
int c);
65 static int Wrap(
int a,
int b,
int c);
66 static int Mirror(
int a,
int b,
int c);
110#define VTK_INTERPOLATE_FLOOR_TOL 7.62939453125e-06
116#if VTK_SIZEOF_VOID_P >= 8
119 long long i =
static_cast<long long>(x);
120 f =
static_cast<F
>(x - i);
121 return static_cast<int>(i - 103079215104LL);
122#elif !defined VTK_WORDS_BIGENDIAN
130 dual.d = x + 103079215104.0;
131 f = dual.s[0] * 0.0000152587890625;
132 return static_cast<int>((dual.i[1] << 16) | ((dual.i[0]) >> 16));
141 dual.d = x + 103079215104.0;
142 f = dual.s[3] * 0.0000152587890625;
143 return static_cast<int>((dual.i[0] << 16) | ((dual.i[1]) >> 16));
149#if VTK_SIZEOF_VOID_P >= 8
152 long long i =
static_cast<long long>(x);
153 return static_cast<int>(i - 103079215104LL);
154#elif !defined VTK_WORDS_BIGENDIAN
161 dual.d = x + 103079215104.5;
162 return static_cast<int>((dual.i[1] << 16) | ((dual.i[0]) >> 16));
170 dual.d = x + 103079215104.5;
171 return static_cast<int>((dual.i[0] << 16) | ((dual.i[1]) >> 16));
180 a = (a <= c ? a : c);
182 a = (a >= 0 ? a : 0);
191 int range = c - b + 1;
195 a = (a >= 0 ? a : a + range);
204#ifndef VTK_IMAGE_BORDER_LEGACY_MIRROR
206 int ifzero = (range == 0);
207 int range2 = 2 * range + ifzero;
209 a = (a >= 0 ? a : -a);
211 a = (a <= range ? a : range2 - a);
214 int range = c - b + 1;
215 int range2 = 2 * range;
217 a = (a >= 0 ? a : -a - 1);
219 a = (a < range ? a : range2 - a - 1);
abstract superclass for arrays of numeric data
vtkImageBorderMode BorderMode
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