#include <interp.h>
Static Public Member Functions | |
static float | get_hyperg (int i) |
static float | hyperg (float v) |
static float * | get_gimx () |
Static Private Member Functions | |
static void | init_gimx () |
Static Private Attributes | |
static float | HYPERGEOM [] |
static float * | gimx = 0 |
Used for Fourier interpolation
Definition at line 47 of file interp.h.
static float* EMAN::Interp::get_gimx | ( | ) | [inline, static] |
Definition at line 66 of file interp.h.
References gimx, and init_gimx().
Referenced by EMAN::GaussFFTProjector::interp_ft_3d().
static float EMAN::Interp::get_hyperg | ( | int | i | ) | [inline, static] |
static float EMAN::Interp::hyperg | ( | float | v | ) | [inline, static] |
Definition at line 55 of file interp.h.
References HYPERGEOM.
Referenced by EMAN::FourierInserter3DMode7::insert_pixel(), and EMAN::GaussFFTProjector::interp_ft_3d().
00056 { 00057 if (v < 0 || v > 4.998f) { 00058 return 0; 00059 } 00060 float r = v / 0.001f; 00061 int a = (int) floor(r); 00062 r -= a; 00063 return (float)(-(HYPERGEOM[a] * (1.0 - r) + HYPERGEOM[a + 1] * r)); 00064 }
void Interp::init_gimx | ( | ) | [static, private] |
Definition at line 1715 of file interp.cpp.
References gimx, and EMAN::Util::hypot3().
Referenced by get_gimx().
01716 { 01717 const int size = 100; 01718 gimx = new float[size * size * size]; 01719 const float g = (float) (10.4 / (M_PI * M_PI)); // magic number here 01720 01721 for (int k = 0; k < size; k++) { 01722 for (int j = 0; j < size; j++) { 01723 for (int i = 0; i < size; i++) { 01724 float r = Util::hypot3(i / 39.0f, j / 39.0f, k / 39.0f); 01725 gimx[i + j * size + k * size * size] = exp(-r / g); 01726 } 01727 } 01728 } 01729 }
float * Interp::gimx = 0 [static, private] |
float Interp::HYPERGEOM [static, private] |