vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
Classes | Typedefs | Enumerations | Functions
slice2.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.

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_typetarget_type
 
typedef vspline::evaluator< coordinate3_type, pixel_type, VSIZE, -1, double, voxel_typeev_type
 

Enumerations

enum  { VSIZE = 8 }
 

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 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 Documentation

◆ coordinate2_type

typedef vigra::TinyVector< float , 2 > coordinate2_type

Definition at line 66 of file slice2.cc.

◆ coordinate3_type

typedef vigra::TinyVector< float , 3 > coordinate3_type

Definition at line 70 of file slice2.cc.

◆ ev_type

Definition at line 117 of file slice2.cc.

◆ pixel_type

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

Definition at line 58 of file slice2.cc.

◆ target_type

typedef vigra::MultiArray< 2 , pixel_type > target_type

Definition at line 74 of file slice2.cc.

◆ voxel_type

typedef vigra::TinyVector< double , 3 > voxel_type

Definition at line 62 of file slice2.cc.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
VSIZE 

Definition at line 78 of file slice2.cc.

Function Documentation

◆ main()

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

Definition at line 150 of file slice2.cc.