67#include <vigra/stdimage.hxx>
68#include <vigra/imageinfo.hxx>
69#include <vigra/impex.hxx>
92 vigra::MultiArrayView < 1 , coordinate_type >
delta ;
93 vigra::MultiArrayView < 1 , float >
weight ;
99template <
class inner_type >
115 sz ( _mf.delta.size() )
124 template <
class IN ,
class OUT >
132 for (
size_t i = 0 ; i <
sz ; i++ )
144 inner.eval ( cc , pickup ) ;
148 result[0] +=
mf.
weight [ i ] * pickup[0] ;
149 result[1] +=
mf.
weight [ i ] * pickup[1] ;
150 result[2] +=
mf.
weight [ i ] * pickup[2] ;
156int main (
int argc ,
char * argv[] )
160 std::cerr <<
"pass a colour image file as argument" << std::endl ;
166 vigra::ImageImportInfo imageInfo ( argv[1] ) ;
174 vigra::importImage ( imageInfo , bspl.
core ) ;
217 mf.
delta = vigra::MultiArrayView < 1 , coordinate_type >
218 ( vigra::Shape1 ( 9 ) , delta ) ;
220 mf.
weight = vigra::MultiArrayView < 1 , float >
221 ( vigra::Shape1 ( 9 ) , weight ) ;
241 vigra::ImageExportInfo eximageInfo (
"metafilter.tif" );
243 std::cout <<
"storing the target image as 'metafilter.tif'" << std::endl ;
245 vigra::exportImage ( target ,
247 .setPixelType(
"UINT8") ) ;
vigra::TinyVector< float, 2 > coordinate_type
vigra::MultiArray< 2, pixel_type > target_type
void transform(const unary_functor_type &functor, const vigra::MultiArrayView< dimension, typename unary_functor_type::in_type > &input, vigra::MultiArrayView< dimension, typename unary_functor_type::out_type > &output, int njobs=vspline::default_njobs, vspline::atomic< bool > *p_cancel=0)
implementation of two-array transform using wielding::coupled_wield.
vspline::grok_type< bspl_coordinate_type< spline_type, rc_type >, result_type, _vsize > make_safe_evaluator(const spline_type &bspl, vigra::TinyVector< int, spline_type::dimension > dspec=vigra::TinyVector< int, spline_type::dimension >(0), int shift=0)
make_safe_evaluator is a factory function, producing a functor which provides safe access to an evalu...
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....
class unary_functor provides a functor object which offers a system of types for concrete unary funct...
includes all headers from vspline (most of them indirectly)