Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::Interp Class Reference

Interp defines the interpolation function used to generate a e^-x^4 function in real space. More...

#include <interp.h>

List of all members.

Static Public Member Functions

float get_hyperg (int i)
float hyperg (float v)
float * get_gimx ()

Static Private Member Functions

void init_gimx ()

Static Private Attributes

float HYPERGEOM []
float * gimx = 0


Detailed Description

Interp defines the interpolation function used to generate a e^-x^4 function in real space.

Used for Fourier interpolation

Definition at line 47 of file interp.h.


Member Function Documentation

float* EMAN::Interp::get_gimx  )  [inline, static]
 

Definition at line 66 of file interp.h.

Referenced by EMAN::GaussFFTProjector::interp_ft_3d().

00067                 {
00068                         if (!gimx) {
00069                                 init_gimx();
00070                         }
00071                         return gimx;
00072                 }

float EMAN::Interp::get_hyperg int  i  )  [inline, static]
 

Definition at line 50 of file interp.h.

00051                 {
00052                         return HYPERGEOM[i];
00053                 }

float EMAN::Interp::hyperg float  v  )  [inline, static]
 

Definition at line 55 of file interp.h.

References v.

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().

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 }


Member Data Documentation

float * Interp::gimx = 0 [static, private]
 

Definition at line 1713 of file interp.cpp.

Referenced by init_gimx().

float Interp::HYPERGEOM [static, private]
 

Definition at line 41 of file interp.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:42:05 2013 for EMAN2 by  doxygen 1.3.9.1