vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
Typedefs | Functions
slice3.cc File Reference

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[])
 

Detailed Description

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 Documentation

◆ coordinate_type

typedef vigra::TinyVector< float , 3 > coordinate_type

Definition at line 65 of file slice3.cc.

◆ pixel_type

typedef vigra::RGBValue< unsigned char , 0 , 1 , 2 > pixel_type

Definition at line 62 of file slice3.cc.

◆ voxel_type

typedef vigra::RGBValue< double , 0 , 1 , 2 > voxel_type

Definition at line 59 of file slice3.cc.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 67 of file slice3.cc.