vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
|
create 2D image data from a 3D spline More...
#include <iostream>
#include <vspline/vspline.h>
#include <vigra/stdimage.hxx>
#include <vigra/imageinfo.hxx>
#include <vigra/impex.hxx>
Go to the source code of this file.
Classes | |
struct | calculate_gradient_type |
struct | calculate_pickup_type |
Typedefs | |
typedef vigra::RGBValue< unsigned char, 0, 1, 2 > | pixel_type |
typedef vigra::TinyVector< double, 3 > | voxel_type |
typedef vigra::TinyVector< float, 2 > | coordinate2_type |
typedef vigra::TinyVector< float, 3 > | coordinate3_type |
typedef vigra::MultiArray< 2, pixel_type > | target_type |
typedef vspline::evaluator< coordinate3_type, pixel_type, VSIZE, -1, double, voxel_type > | ev_type |
Enumerations | |
enum | { VSIZE = 8 } |
Functions | |
int | main (int argc, char *argv[]) |
create 2D image data from a 3D spline
build a 3D volume from samples of the RGB colour colour_space build a spline over it and extract a 2D slice, using vspline::transform()
while the result is just about the same as the one we get from slice.cc, here we use additional functors to create the colour gradient and do the coordinate transformation.
compile with: clang++ -std=c++11 -march=native -o slice2 -O3 -pthread -DUSE_VC=1 slice2.cc -lvigraimpex -lVc or: clang++ -std=c++11 -march=native -o slice2 -O3 -pthread slice2.cc -lvigraimpex g++ also works.
Definition in file slice2.cc.
typedef vigra::TinyVector< float , 2 > coordinate2_type |
typedef vigra::TinyVector< float , 3 > coordinate3_type |
typedef vspline::evaluator< coordinate3_type , pixel_type , VSIZE , -1 , double , voxel_type > ev_type |
typedef vigra::RGBValue< unsigned char , 0 , 1 , 2 > pixel_type |
typedef vigra::MultiArray< 2 , pixel_type > target_type |
typedef vigra::TinyVector< double , 3 > voxel_type |