60int main (
int argc ,
char * argv[] )
69 shape_type core_shape = { 35 , 43 , 19 } ;
83 view_type core = bspl.
core ;
87 for (
int d = 0 ; d < bspl.
dimension ; d++ )
89 for (
int c = 0 ; c < core_shape[d] ; c++ )
90 core.bindAt ( d , c ) += c ;
102 evaluator_type inner_ev ( bspl ) ;
106 auto dom = vspline::domain < coordinate_type >
111 auto ev = dom + inner_ev ;
115 std::random_device rd;
116 std::mt19937 gen(rd());
125 for (
int times = 0 ; times < 100 ; times++ )
127 for (
int d = 0 ; d < bspl.
dimension ; d++ )
131 c[d] = std::generate_canonical<double, 20>(gen) ;
134 ev.eval ( c , result ) ;
139 double delta = result - sum ( c * ( core_shape - 1 ) ) ;
141 std::cout <<
"eval(" << c <<
") = "
142 << result <<
" -> delta = " << delta << std::endl ;
vigra::TinyVector< float, 2 > coordinate_type
vspline::bspline< pixel_type, 2 > spline_type
class evaluator encodes evaluation of a spline-like object. This is a generalization of b-spline eval...
int main(int argc, char *argv[])
gradient.cc
vigra::TinyVector< vspline::bc_code, dimension > bcv_type
a type for a set of boundary condition codes, one per axis
class bspline now builds on class bspline_base, adding coefficient storage, while bspline_base provid...
vigra::TinyVector< std::ptrdiff_t, dimension > shape_type
type of a multidimensional index type
void prefilter(vspline::xlf_type boost=vspline::xlf_type(1), int njobs=vspline::default_njobs)
prefilter converts the knot point data in the 'core' area into b-spline coefficients....
vigra::TinyVector< bc_code, dimension > bcv_type
nD type for one boundary condition per axis
vigra::MultiArrayView< dimension, value_type > view_type
data are read and written to vigra MultiArrayViews:
includes all headers from vspline (most of them indirectly)