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.
Typedefs | |
typedef vigra::RGBValue< double, 0, 1, 2 > | voxel_type |
typedef vigra::RGBValue< unsigned char, 0, 1, 2 > | pixel_type |
typedef vigra::TinyVector< float, 3 > | coordinate_type |
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 space build a spline over it and extract a 2D slice
Here we use a quick shot solution. Oftentimes all it takes is a single run of an interpolation with as little programming effort as possible, never mind the performance. Again we use a b-spline with double-precision voxels as value_type, but instead of using vspline::transform, we simply run the calculations in loops.
compile with: clang++ -std=c++11 -o slice3 -O3 -pthread slice3.cc -lvigraimpex g++ also works.
Definition in file slice3.cc.
typedef vigra::TinyVector< float , 3 > coordinate_type |
typedef vigra::RGBValue< unsigned char , 0 , 1 , 2 > pixel_type |
typedef vigra::RGBValue< double , 0 , 1 , 2 > voxel_type |