Public Member Functions | Protected Member Functions | Protected Attributes
EMAN::Util::sincBlackman Class Reference

#include <util.h>

Collaboration diagram for EMAN::Util::sincBlackman:
Collaboration graph

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 182 of file util.h.

Constructor & Destructor Documentation

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

Definition at line 2135 of file util_sparx.cpp.

References build_sBtable().

                : M(M_), fc(fc_), ntable(ntable_) {
        // Sinc-Blackman kernel
virtual EMAN::Util::sincBlackman::~sincBlackman ( ) [inline, virtual]

Definition at line 193 of file util.h.


Member Function Documentation

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

Definition at line 2141 of file util_sparx.cpp.

References EMAN::Util::round(), twopi, and x.

Referenced by sincBlackman().

        int ltab = int(round(float(ntable)/1.25f));
        int M2 = M/2;
        fltb = float(ltab)/M2;
        for (int i=ltab+1; i <= ntable; i++) sBtable[i] = 0.0f;
        float x = 1.0e-7f;
        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)));
        for (int i=1; i <= ltab; i++) {
                x = float(i)/fltb;
                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)));
                //cout << "  "<<x<<"  "<<sBtable[i] <<endl;
int EMAN::Util::sincBlackman::get_sB_size ( ) const [inline]

Return the size of the kernel.

Definition at line 201 of file util.h.

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

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

Definition at line 195 of file util.h.

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


Member Data Documentation

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

kernel size

Definition at line 186 of file util.h.

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

Tabulate kernel for speed.

Definition at line 190 of file util.h.

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

Definition at line 185 of file util.h.

cut-off frequency

Definition at line 187 of file util.h.

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

Definition at line 188 of file util.h.

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