2 #ifndef vil_bicub_interp_h_ 3 #define vil_bicub_interp_h_ 17 # include <vcl_msvc_warnings.h> 26 std::ptrdiff_t xstep, std::ptrdiff_t ystep);
36 std::ptrdiff_t xstep, std::ptrdiff_t ystep)
48 std::ptrdiff_t xstep, std::ptrdiff_t ystep);
59 std::ptrdiff_t xstep, std::ptrdiff_t ystep)
71 std::ptrdiff_t xstep, std::ptrdiff_t ystep)
75 if (x>nx-2)
return 0.0;
76 if (y>ny-2)
return 0.0;
86 double x,
double y,
unsigned p=0)
101 std::ptrdiff_t xstep, std::ptrdiff_t ystep)
117 double x,
double y,
unsigned p=0)
120 view.
ni(), view.
nj(),
131 std::ptrdiff_t xstep, std::ptrdiff_t ystep)
135 if (x>nx-2) x=nx-1.0;
136 if (y>ny-2) y=ny-1.0;
146 double x,
double y,
unsigned p=0)
149 view.
ni(), view.
nj(),
153 #endif // vil_bicub_interp_h_ Concrete view of image data of type T held in memory.
double vil_bicub_interp_unsafe(double x, double y, const T *data, std::ptrdiff_t xstep, std::ptrdiff_t ystep)
Compute bicubic interpolation at (x,y), no bound checks. Requires 1<x<ni-3, 1<y<nj-3.
std::ptrdiff_t jstep() const
Add this to your pixel pointer to get next j pixel.
unsigned ni() const
Width.
unsigned nj() const
Height.
double vil_bicub_interp_raw(double x, double y, const T *data, std::ptrdiff_t xstep, std::ptrdiff_t ystep)
Compute bicubic interpolation at (x,y), no bound checks.
A base class reference-counting view of some image data.
double vil_bicub_interp(const vil_image_view< T > &view, double x, double y, unsigned p=0)
Compute bicubic interpolation at (x,y), with minimal bound checks.
double vil_bicub_interp_safe(const vil_image_view< T > &view, double x, double y, unsigned p=0)
Compute bicubic interpolation at (x,y), with bound checks.
double vil_bicub_interp_safe_extend(const vil_image_view< T > &view, double x, double y, unsigned p=0)
Compute bicubic interpolation at (x,y), with bound checks.
std::ptrdiff_t istep() const
Add this to your pixel pointer to get next i pixel.