EMAN::Util::sincBlackman Class Reference

#include <util.h>

Collaboration diagram for EMAN::Util::sincBlackman:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 sincBlackman (int M_, float fc_, int ntable_=1999)
virtual ~sincBlackman ()
float sBwin_tab (float x) const
int get_sB_size () const
 Return the size of the kernel.

Protected Member Functions

virtual void build_sBtable ()

Protected Attributes

int M
float fc
 kernel size
int ntable
 cut-off frequency
vector< float > sBtable
float fltb
 Tabulate kernel for speed.


Detailed Description

Definition at line 224 of file util.h.


Constructor & Destructor Documentation

Util::sincBlackman::sincBlackman ( int  M_,
float  fc_,
int  ntable_ = 1999 
)

Definition at line 1987 of file util_sparx.cpp.

References build_sBtable().

01988                 : M(M_), fc(fc_), ntable(ntable_) {
01989         // Sinc-Blackman kernel
01990         build_sBtable();
01991 }

virtual EMAN::Util::sincBlackman::~sincBlackman (  )  [inline, virtual]

Definition at line 235 of file util.h.

00438 {


Member Function Documentation

void Util::sincBlackman::build_sBtable (  )  [protected, virtual]

Definition at line 1993 of file util_sparx.cpp.

References fc, fltb, M, ntable, EMAN::Util::round(), sBtable, twopi, and x.

Referenced by sincBlackman().

01993                                      {
01994         sBtable.resize(ntable+1);
01995         int ltab = int(round(float(ntable)/1.25f));
01996         int M2 = M/2;
01997         fltb = float(ltab)/M2;
01998         for (int i=ltab+1; i <= ntable; i++) sBtable[i] = 0.0f;
01999         float x = 1.0e-7f;
02000         sBtable[0] = (float)(sin(twopi*fc*x)/x*(0.52-0.5*cos(twopi*(x-M2)/M)+0.08*cos(2*twopi*(x-M2)/M)));
02001         for (int i=1; i <= ltab; i++) {
02002                 x = float(i)/fltb;
02003                 sBtable[i] = (float)(sin(twopi*fc*x)/x*(0.52-0.5*cos(twopi*(x-M2)/M)+0.08*cos(2*twopi*(x-M2)/M)));
02004                 //cout << "  "<<x<<"  "<<sBtable[i] <<endl;
02005         }
02006 }

float EMAN::Util::sincBlackman::sBwin_tab ( float  x  )  const [inline]

Definition at line 237 of file util.h.

Referenced by EMAN::EMData::get_pixel_filtered().

00438                 {

int EMAN::Util::sincBlackman::get_sB_size (  )  const [inline]

Return the size of the kernel.

Definition at line 243 of file util.h.

Referenced by EMAN::EMData::get_pixel_filtered().

00438 {


Member Data Documentation

int EMAN::Util::sincBlackman::M [protected]

Definition at line 227 of file util.h.

Referenced by build_sBtable().

float EMAN::Util::sincBlackman::fc [protected]

kernel size

Definition at line 228 of file util.h.

Referenced by build_sBtable().

cut-off frequency

Definition at line 229 of file util.h.

Referenced by build_sBtable().

vector<float> EMAN::Util::sincBlackman::sBtable [protected]

Definition at line 230 of file util.h.

Referenced by build_sBtable().

float EMAN::Util::sincBlackman::fltb [protected]

Tabulate kernel for speed.

Definition at line 232 of file util.h.

Referenced by build_sBtable().


The documentation for this class was generated from the following files:

Generated on Sat Nov 21 02:20:50 2009 for EMAN2 by  doxygen 1.5.6