79#ifndef VSPLINE_DOMAIN_H
80#define VSPLINE_DOMAIN_H
143 < domain_type < coordinate_type , _vsize > ,
165 typedef typename vigra::TinyVector < rc_type , dim_in >
limit_type ;
186 scale ( ( _out_high - _out_low ) / ( _in_high - _in_low ) )
200 template <
class bspl_type >
204 :
in_low ( bspl.lower_limit() ) ,
205 in_high ( bspl.upper_limit() ) ,
208 scale ( ( _out_high - _out_low )
209 / ( bspl.upper_limit() - bspl.lower_limit() ) )
212 template <
class bspl_type >
215 const bspl_type & bspl )
218 out_low ( bspl.lower_limit() ) ,
220 scale ( ( bspl.upper_limit() - bspl.lower_limit() )
221 / ( _in_high - _in_low ) )
224 template <
class bspl_type_1 ,
class bspl_type_2 >
226 const bspl_type_2 & bspl_out )
227 :
in_low ( bspl_in.lower_limit() ) ,
228 in_high ( bspl_in.upper_limit() ) ,
229 out_low ( bspl_out.lower_limit() ) ,
230 out_high ( bspl_out.upper_limit() ) ,
231 scale ( ( bspl_out.upper_limit() - bspl_out.lower_limit() )
232 / ( bspl_in.upper_limit() - bspl_in.lower_limit() ) )
242 void polish (
const in_type & in ,
254 template <
typename T ,
int N >
276 eval ( in , out , std::is_fundamental < in_type > () ) ;
300 for (
int d = 0 ; d <
dim_in ; d++ )
313 template <
class crd_type >
314 void eval (
const crd_type & in ,
315 crd_type & out )
const
317 eval ( in , out , std::is_fundamental < in_type > () ) ;
322 template <
typename = std::enable_if < ( vsize > 1 ) > >
334 polish < rc_type , vsize > ( in , out , 0 ) ;
340 template <
typename = std::enable_if < ( vsize > 1 ) > >
346 typedef typename in_v::value_type component_type ;
348 for (
int d = 0 ; d <
dim_in ; d++ )
351 polish < rc_type , vsize > ( in[d] , out[d] , d ) ;
372 ( in_low , in_high , out_low , out_high ) ;
392 ( in_low , in_high , bspl ) ;
412 ( bspl , out_low , out_high ) ;
433 ( bspl_in , bspl_out ) ;
vigra::TinyVector< float, 2 > coordinate_type
vspline::bspline< pixel_type, 2 > spline_type
vspline::domain_type< coordinate_type, _vsize > domain(const coordinate_type &in_low, const coordinate_type &in_high, const coordinate_type &out_low, const coordinate_type &out_high)
factory function to create a domain_type type object from the desired lower and upper fix point for i...
typename vector_traits< T, N > ::type simdized_type
this alias is used as a shorthand to pick the vectorized type for a given type T and a size N from 'v...
class bspline now builds on class bspline_base, adding coefficient storage, while bspline_base provid...
mixin 'callable' is used with CRTP: it serves as additional base to unary functors which are meant to...
class domain is a coordinate transformation functor. It provides a handy way to translate an arbitrar...
void eval(const in_v &in, out_v &out, std::false_type) const
eval dispatch for vectorized coordinates, nD case. This iterates over the dimensions and performs the...
base_type::in_ele_type rc_type
base_type::in_nd_ele_type nd_rc_type
domain_type(const coordinate_type &_in_low, const coordinate_type &_in_high, const coordinate_type &_out_low, const coordinate_type &_out_high)
constructor taking the lower and upper fix points for incoming and outgoing values....
void eval(const in_v &in, out_v &out, std::true_type) const
eval dispatch for vectorized coordinates, 1D case
void eval(const in_type &in, out_type &out, std::false_type) const
eval dispatch for TinyVectors of fundamentals
domain_type(const bspl_type_1 &bspl_in, const bspl_type_2 &bspl_out)
const limit_type out_high
void eval(const in_type &in, out_type &out) const
eval for unvectorized data. we dispatch on in_type, the incoming coordinate, being a 'naked' fundamen...
vspline::unary_functor< coordinate_type, coordinate_type, _vsize > base_type
void eval(const in_type &in, out_type &out, std::true_type) const
eval dispatch for fundamental, 1D coordinates
vigra::TinyVector< rc_type, dim_in > limit_type
domain_type(const coordinate_type &_in_low, const coordinate_type &_in_high, const bspl_type &bspl)
void eval(const crd_type &in, crd_type &out) const
eval for vectorized data. if in_type is a 'naked' fundamental, crd_type is a 'naked' ele_v,...
domain_type(const bspl_type &bspl, const coordinate_type &_out_low, const coordinate_type &_out_high)
constructor taking the fix points for outgoing values from a bspline object, and the incoming lower a...
class unary_functor provides a functor object which offers a system of types for concrete unary funct...
vigra::TinyVector< in_ele_type, dim_in > in_nd_ele_type
vector_traits< coordinate_type, vsize >::type in_v
vectorized in_type and out_type. vspline::vector_traits supplies these types so that multidimensional...
vspline::vector_traits< coordinate_type >::ele_type in_ele_type
vector_traits< coordinate_type, vsize >::type out_v
vector_traits< coordinate_type, vsize >::ele_v in_ele_v
a simdized type of the elementary type of result_type, which is used for coefficients and results....
with the definition of 'simd_traits', we can proceed to implement 'vector_traits': struct vector_trai...
interface definition for unary functors