vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
|
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) |
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.
|
inline |