56#include <vigra/stdimage.hxx>
57#include <vigra/imageinfo.hxx>
58#include <vigra/impex.hxx>
60int main (
int argc ,
char * argv[] )
63 typedef vigra::TinyVector < float , 3 >
pixel_type ;
66 typedef vigra::TinyVector < float , 3 >
voxel_type ;
72 typedef vigra::MultiArray < 2 , coordinate_type > warp_type ;
75 typedef vigra::MultiArray < 2 , pixel_type >
target_type ;
82 space ( vigra::Shape3 ( 10 , 10 , 10 ) , 5 , bcv ) ;
94 for (
int z = 0 ; z < 10 ; z++ )
96 for (
int y = 0 ; y < 10 ; y++ )
98 for (
int x = 0 ; x < 10 ; x++ )
112 warp_type warp ( vigra::Shape2 ( 1920 , 1080 ) ) ;
118 for (
int y = 0 ; y < 1080 ; y++ )
120 for (
int x = 0 ; x < 1920 ; x++ )
123 c[0] = float ( x ) / 192.0 ;
125 c[2] = float ( y ) / 108.0 ;
140 ch_ev_type red_ev ( red_channel ) ;
141 ch_ev_type green_ev ( green_channel ) ;
142 ch_ev_type blue_ev ( blue_channel ) ;
149 for (
int y = 0 ; y < 1080 ; y++ )
151 for (
int x = 0 ; x < 1920 ; x++ )
155 auto diff = fabs ( ev ( c ) [ 0 ] - red_ev ( c ) ) ;
158 std::cerr <<
"red result differs at c " << c <<
" "
159 << ev ( c ) [ 0 ] <<
" != " << red_ev ( c )
162 diff = fabs ( ev ( c ) [ 1 ] - green_ev ( c ) ) ;
165 std::cerr <<
"green result differs at c " << c <<
" "
166 << ev ( c ) [ 1 ] <<
" != " << green_ev ( c )
169 diff = fabs ( ev ( c ) [ 2 ] - blue_ev ( c ) ) ;
172 std::cerr <<
"blue result differs at c " << c <<
" "
173 << ev ( c ) [ 2 ] <<
" != " << blue_ev ( c )
179 std::cout <<
"success" << std::endl ;
vigra::RGBValue< float, 0, 1, 2 > pixel_type
vigra::TinyVector< float, 2 > coordinate_type
vspline::evaluator< coordinate_type, float > ev_type
vigra::MultiArray< 2, pixel_type > target_type
int main(int argc, char *argv[])
class evaluator encodes evaluation of a spline-like object. This is a generalization of b-spline eval...
vigra::TinyVector< double, 3 > voxel_type
class bspline now builds on class bspline_base, adding coefficient storage, while bspline_base provid...
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....
channel_view_type get_channel_view(const int &channel)
get a bspline object for a single channel of the data. This is lightweight and requires the viewed da...
includes all headers from vspline (most of them indirectly)