2 #ifndef vil_sample_profile_bicub_hxx_ 3 #define vil_sample_profile_bicub_hxx_ 29 && y1+3 <= image.
nj();
37 template <
class imType,
class vecType>
40 double x0,
double y0,
double dx,
double dy,
45 const unsigned ni = image.
ni();
46 const unsigned nj = image.
nj();
47 const unsigned np = image.
nplanes();
48 const std::ptrdiff_t istep = image.
istep();
49 const std::ptrdiff_t jstep = image.
jstep();
50 const std::ptrdiff_t pstep = image.
planestep();
59 for (
int k=0;k<n;++k,x+=dx,y+=dy)
64 for (
int k=0;k<n;++k,x+=dx,y+=dy)
66 for (
unsigned int p=0;p<np;++p,++
v)
76 for (
int k=0;k<n;++k,x+=dx,y+=dy)
81 for (
int k=0;k<n;++k,x+=dx,y+=dy)
83 for (
unsigned int p=0;p<np;++p,++
v)
90 #define VIL_SAMPLE_PROFILE_BICUB_INSTANTIATE( imType, vecType ) \ 91 template void vil_sample_profile_bicub(vecType* v, \ 92 const vil_image_view<imType >& image, \ 93 double x0, double y0, \ 94 double dx, double dy, \ 97 #endif // vil_sample_profile_bicub_hxx_ An abstract base class of smart pointers to actual image data in memory.
Bicubic profile sampling functions for 2D images.
Concrete view of image data of type T held in memory.
Bicubic interpolation functions for 2D images.
std::ptrdiff_t jstep() const
Add this to your pixel pointer to get next j pixel.
unsigned ni() const
Width.
unsigned nj() const
Height.
std::ptrdiff_t planestep() const
Add this to your pixel pointer to get pixel on next plane.
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.
T * top_left_ptr()
Pointer to the first (top left in plane 0) pixel.
bool vil_profile_bicub_in_image(double x0, double y0, double x1, double y1, const vil_image_view_base &image)
This function should not be the same in bicub and bilin.
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.
unsigned nplanes() const
Number of planes.
void vil_sample_profile_bicub(vecType *v, const vil_image_view< imType > &image, double x0, double y0, double dx, double dy, int n)
Sample along profile, using bicubic interpolation.
std::ptrdiff_t istep() const
Add this to your pixel pointer to get next i pixel.