vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
Public Member Functions | List of all members
vspline::detail::build_safe_ev< level, spline_type, rc_type, _vsize, math_ele_type, result_type, gate_types > Struct Template Reference

helper object to create a vspline::mapper object with gate types matching a bspline's boundary conditions and extents matching the spline's lower and upper limits. Please note that these limits depend on the boundary conditions and are not always simply 0 and N-1, as they are for, say, mirror boundary conditions. see lower_limit() and upper_limit() in vspline::bspline. More...

#include <eval.h>

Public Member Functions

vspline::grok_type< bspl_coordinate_type< spline_type, rc_type >, result_type, _vsize > operator() (const spline_type &bspl, gate_types ... gates, vigra::TinyVector< int, spline_type::dimension > dspec=vigra::TinyVector< int, spline_type::dimension >(0), int shift=0)
 

Detailed Description

template<int level, typename spline_type, typename rc_type, size_t _vsize, typename math_ele_type, typename result_type, class ... gate_types>
struct vspline::detail::build_safe_ev< level, spline_type, rc_type, _vsize, math_ele_type, result_type, gate_types >

helper object to create a vspline::mapper object with gate types matching a bspline's boundary conditions and extents matching the spline's lower and upper limits. Please note that these limits depend on the boundary conditions and are not always simply 0 and N-1, as they are for, say, mirror boundary conditions. see lower_limit() and upper_limit() in vspline::bspline.

gate types are inferred from boundary conditions like this:

PERIODIC -> periodic_gate MIRROR, REFLECT -> mirror_gate all other boundary conditions -> clamp_gate

The mapper object is chained to an evaluator, resulting in a functor providing safe access to the evaluator. The functor is subsequently 'grokked' to produce a uniform return type.

Please note that this is only one possible way of dealing with out-of-bounds coordinates: they are mapped into the defined range in a way that is coherent with the boundary conditions. If you need other methods you'll have to build your own functional construct.

While build_ev (above) had three distinct types to deal with, here, the number of potential types is even larger: every distinct boundary condition along every distinct axis will result in a specfic type of 'gate' object. So again we use type erasure to provide a common return type, namely vspline::grok_type.

Definition at line 2080 of file eval.h.

Member Function Documentation

◆ operator()()

template<int level, typename spline_type , typename rc_type , size_t _vsize, typename math_ele_type , typename result_type , class ... gate_types>
vspline::grok_type< bspl_coordinate_type< spline_type, rc_type >, result_type, _vsize > vspline::detail::build_safe_ev< level, spline_type, rc_type, _vsize, math_ele_type, result_type, gate_types >::operator() ( const spline_type bspl,
gate_types ...  gates,
vigra::TinyVector< int, spline_type::dimension dspec = vigra::TinyVector<int,spline_type::dimension> ( 0 ),
int  shift = 0 
)
inline

Definition at line 2085 of file eval.h.


The documentation for this struct was generated from the following file: