56#include <vigra/stdimage.hxx>
57#include <vigra/imageinfo.hxx>
58#include <vigra/impex.hxx>
90 std::complex < double > cc ( c[0] , c[1] ) ;
91 std::complex < double > z ( 0.0 , 0.0 ) ;
108 crd_v z { 0.0f , 0.0f } ;
138 m ( mm ) = ( m + 1 ) ;
152 template <
class IN ,
class OUT >
153 void eval (
const IN & c , OUT & result )
const
155 result = 255 * ( c & 1 ) ;
161int main (
int argc ,
char * argv[] )
166 std::cerr <<
"please pass x0, y0, x1 and y1 on the command line" << std::endl ;
167 std::cerr <<
"typical invocation: mandelbrot -2 -1 1 1" << std::endl ;
171 double x0 = atof ( argv[1] ) ;
172 double y0 = atof ( argv[2] ) ;
173 double x1 = atof ( argv[3] ) ;
174 double y1 = atof ( argv[4] ) ;
178 target_type target ( vigra::Shape2 ( 3840 , 2160 ) ) ;
186 auto f = vspline::domain < coordinate_type , VSZ >
202 vigra::ImageExportInfo imageInfo (
"mandelbrot.tif" );
204 std::cout <<
"storing the target image as 'mandelbrot.tif'" << std::endl ;
206 vigra::exportImage ( target ,
208 .setPixelType(
"UINT8")
209 .setCompression(
"100")
210 .setForcedRangeMapping ( 0 , 255 , 0 , 255 ) ) ;
vigra::TinyVector< float, 2 > coordinate_type
vigra::MultiArray< 2, pixel_type > target_type
vigra::RGBValue< double, 0, 1, 2 > pixel_type
int main(int argc, char *argv[])
vspline::vector_traits< int, VSZ >::type int_v
vspline::vector_traits< double >::type compo_v
vigra::TinyVector< double, 2 > coordinate_type
vspline::vector_traits< coordinate_type >::type crd_v
vigra::MultiArray< 2, pixel_type > target_type
bool none_of(const mchunk_t< D, N > &arg)
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.
void eval(const IN &c, OUT &result) const
void eval(const crd_v &c, int_v &m) const
vspline::unary_functor< coordinate_type, int > base_type
void eval(const coordinate_type &c, int &m) const
class unary_functor provides a functor object which offers a system of types for concrete unary funct...
with the definition of 'simd_traits', we can proceed to implement 'vector_traits': struct vector_trai...
includes all headers from vspline (most of them indirectly)