1 // This is core/vil1/vil1_convolve_1d.hxx 2 #ifndef vil1_convolve_1d_hxx_ 3 #define vil1_convolve_1d_hxx_ 4 //: 5 // \file 6 // \author fsm 7 8 #include "vil1_convolve.h" 9 10 // Macros to get origin-relative values in signals. 11 #define value1d(sig, k) ( (sig).array_[(sig).origin_ + (k)] ) 12 #define value2d(sig, x, y) ( (sig).array_[(sig).originy_ + (y)][(sig).originx_ + (x)] ) 13 14 // To make it easier to compare the x and y versions, they live 15 // in separate source files. 16 #define fsm_dont_croak 17 // Known problems : the convolvers may segfault if the kernel 18 // is larger than the input signal. 19 #include "vil1_convolve_1d_x.hxx" 20 #include "vil1_convolve_1d_y.hxx" 21 22 #undef VIL1_CONVOLVE_1D_INSTANTIATE 23 #define VIL1_CONVOLVE_1D_INSTANTIATE(I1, I2, AC, O) \ 24 template \ 25 void vil1_convolve_1d_x(vil1_convolve_signal_1d<const I1 > const &, \ 26 vil1_convolve_signal_2d<const I2 > const &, \ 27 AC *, \ 28 vil1_convolve_signal_2d<O > const &, \ 29 vil1_convolve_boundary_option, \ 30 vil1_convolve_boundary_option); \ 31 template \ 32 void vil1_convolve_1d_y(vil1_convolve_signal_1d<const I1 > const &, \ 33 vil1_convolve_signal_2d<const I2 > const &, \ 34 AC *, \ 35 vil1_convolve_signal_2d<O > const &, \ 36 vil1_convolve_boundary_option, \ 37 vil1_convolve_boundary_option) 38 39 #endif // vil1_convolve_1d_hxx_ 40