53#include <vigra/stdimage.hxx>
54#include <vigra/imageinfo.hxx>
55#include <vigra/impex.hxx>
71int main (
int argc ,
char * argv[] )
75 std::cerr <<
"pass a colour image file as argument" << std::endl ;
79 vigra::ImageImportInfo imageInfo ( argv[1] ) ;
91 vigra::importImage ( imageInfo , bspl.
core ) ;
103 const vigra::TinyVector < float , 2 > dx1_spec { 1 , 0 } ;
104 const vigra::TinyVector < float , 2 > dy1_spec { 0 , 1 } ;
108 ev_type xev ( bspl , dx1_spec ) ;
109 ev_type yev ( bspl , dy1_spec ) ;
117 for (
int y = 0 ; y < target.shape(1) ; y++ )
119 for (
int x = 0 ; x < target.shape(0) ; x++ )
128 xev.
eval ( crd , dx ) ;
129 yev.
eval ( crd , dy ) ;
133 target [ crd ] = dx * dx + dy * dy ;
139 vigra::ImageExportInfo eximageInfo (
"gsm.tif" );
141 std::cout <<
"storing the target image as 'gsm.tif'" << std::endl ;
143 vigra::exportImage ( target ,
145 .setPixelType(
"UINT8") ) ;
vigra::RGBValue< float, 0, 1, 2 > pixel_type
vigra::TinyVector< float, 2 > coordinate_type
vigra::MultiArray< 2, pixel_type > target_type
class evaluator encodes evaluation of a spline-like object. This is a generalization of b-spline eval...
void eval(const typename base_type::in_type &_coordinate, typename base_type::out_type &_result) const
unvectorized evaluation function. this is delegated to 'feed' above, which reinterprets the arguments...
int main(int argc, char *argv[])
vigra::RGBValue< float, 0, 1, 2 > pixel_type
vigra::TinyVector< float, 2 > coordinate_type
vspline::evaluator< coordinate_type, pixel_type > ev_type
vigra::MultiArray< 2, pixel_type > target_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....
includes all headers from vspline (most of them indirectly)