72#ifndef VSPLINE_CONVOLVE_H
73#define VSPLINE_CONVOLVE_H
129template <
typename in_type ,
130 typename out_type = in_type ,
131 typename _math_type = out_type >
157 vigra::MultiArray < 1 , math_type , allocator_t >
reactor ;
168 ( vigra::Shape1 ( 0 ) , vigra::Shape1 (
ksize ) ) ;
171 ( vigra::Shape1 (
ksize ) , vigra::Shape1 (
ksize * 3 ) ) ;
174 ( vigra::Shape1 (
ksize * 3 ) , vigra::Shape1 (
ksize * 4 ) ) ;
176 for (
int i = 0 ; i <
ksize ; i++ )
203 int size = output.size() ;
205 solve ( input , output , source ) ;
236 if ( (
void*) ( input.data() ) != (
void*) ( output.data() ) )
238 for ( std::ptrdiff_t i = 0 ; i < output.size() ; i++ )
239 output[i] = out_type ( input[i] ) ;
244 else if (
ksize == 1 )
254 for ( std::ptrdiff_t i = 0 ; i < output.size() ; i++ )
255 output[i] = out_type ( factor *
math_type ( input[i] ) ) ;
271 for (
int i = 0 ; i <
ksize ; i++ , si++ )
277 int size = output.size() ;
278 int leftover = size - si ;
279 int full_cycles = 0 ;
281 full_cycles = leftover /
ksize ;
291 for (
int i = 0 ; i < ntail ; i++ , z++ )
296 for (
int cycle = 0 ; cycle < full_cycles ; cycle++ )
301 for (
int i = 0 ; i <
ksize ; )
311 for (
int j = 1 ; j <
ksize ; j++ )
314 for (
int j = 1 ; j <
ksize ; j++ )
320 output [ ti ] = out_type ( result ) ;
324 * p_data = input [ si ] ;
348 for (
int i = 0 ; i <
ksize && ti < size ; i++ )
351 for (
int j = 1 ; j <
ksize ; j++ )
354 output [ ti ] = out_type ( result ) ;
358 * p_data = input [ si ] ;
381template <
template <
typename ,
size_t >
class _vtype ,
382 typename _math_ele_type ,
406 typedef vigra::MultiArray < 1 , vtype , allocator_t >
buffer_type ;
457 template <
typename in_type ,
458 typename out_type = in_type ,
buffer_handling provides services needed for interfacing with a buffer of simdized/goading data....
_vtype< dtype, vsize > vtype
void init(vigra::MultiArrayView< 1, vtype > &_in_window, vigra::MultiArrayView< 1, vtype > &_out_window)
definitions common to all files in this project, utility code
generic implementation of separable filtering for nD arrays
bc_code
This enumeration is used for codes connected to boundary conditions. There are two aspects to boundar...
vspline creates vigra::MultiArrays of vectorized types. As long as the vectorized types are Vc::SimdA...
class convolve provides the combination of class fir_filter above with a vector-friendly buffer....
fir_filter_specs arg_type
extrapolator< buffer_view_type > buffer_extrapolator
vigra::MultiArrayView< 1, vtype > buffer_view_type
convolve(const fir_filter_specs &specs, size_t size)
void solve(const in_buffer_type &input, out_buffer_type &output)
public 'solve' routine. This is for calls 'from outside', like when this object is used by itself,...
buffer_handling< _vtype, _math_ele_type, _vsize > buffer_handling_type
typename vspline::allocator_traits< vtype > ::type allocator_t
_vtype< _math_ele_type, _vsize > simdized_math_type
vigra::MultiArray< 1, vtype, allocator_t > buffer_type
_math_ele_type math_ele_type
static vspline::fir_filter< in_type, out_type, math_type > get_raw_filter(const fir_filter_specs &specs)
vspline::fir_filter< simdized_math_type > filter_type
fir_filter_specs holds the parameters for a filter performing a convolution along a single axis....
fir_filter_specs(vspline::bc_code _bc, int _ksize, int _headroom, const xlf_type *_kernel)
class fir_filter provides the 'solve' routine which convolves a 1D signal with selectable extrapolati...
static const bool is_single_pass
vigra::MultiArrayView< 1, math_type > circular_buffer
vigra::MultiArrayView< 1, math_type > kernel_values
int get_support_width() const
calling code may have to set up buffers with additional space around the actual data to allow filteri...
vigra::MultiArray< 1, math_type, allocator_t > reactor
void solve(const in_buffer_type &input, out_buffer_type &output)
public 'solve' routine. This is for calls 'from outside', like when this object is used by itself,...
vigra::MultiArrayView< 1, out_type > out_buffer_type
typename vspline::allocator_traits< math_type > ::type allocator_t
void solve(const in_buffer_type &input, out_buffer_type &output, const extrapolator< in_buffer_type > &source)
protected solve routine taking an extrapolator on top of input and output. This way,...
vigra::MultiArrayView< 1, in_type > in_buffer_type
vigra::MultiArrayView< 1, math_type > tail_buffer
fir_filter(const fir_filter_specs &specs)