EMAN::DoGFourierProcessor Class Reference

processor radial function: f(x) = 1/sqrt(2*pi)*[1/sigma1*exp-(x^2/2*sigma1^2) - 1/sigma2*exp-(x^2/2*sigma2^2)] More...

#include <processor.h>

Inheritance diagram for EMAN::DoGFourierProcessor:

Inheritance graph
[legend]
Collaboration diagram for EMAN::DoGFourierProcessor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DoGFourierProcessor ()
string get_name () const
 Get the processor's name.
string get_desc () const
 Get the descrition of this specific processor.
void set_params (const Dict &new_params)
 Set the processor parameters using a key/value dictionary.
TypeDict get_param_types () const
 Get processor parameter information in a dictionary.

Static Public Member Functions

static ProcessorNEW ()

Static Public Attributes

static const string NAME = "filter.DoG"

Protected Member Functions

void create_radial_func (vector< float > &radial_mask) const

Private Attributes

float sigma1
float sigma2

Detailed Description

processor radial function: f(x) = 1/sqrt(2*pi)*[1/sigma1*exp-(x^2/2*sigma1^2) - 1/sigma2*exp-(x^2/2*sigma2^2)]

Parameters:
sigma1 DoG sigma1
sigma1 DoG sigma2

Definition at line 1019 of file processor.h.


Constructor & Destructor Documentation

EMAN::DoGFourierProcessor::DoGFourierProcessor (  )  [inline]

Definition at line 1022 of file processor.h.

Referenced by NEW().

01022                                      :sigma1(0), sigma2(0)
01023                 {
01024                 }


Member Function Documentation

void DoGFourierProcessor::create_radial_func ( vector< float > &  radial_mask  )  const [protected, virtual]

Implements EMAN::FourierProcessor.

Definition at line 1273 of file processor.cpp.

References Assert, norm(), sigma1, sigma2, sqrt(), and x.

01274 {
01275         
01276         Assert(radial_mask.size() > 0);
01277         float x = 0.0f , nqstep = 0.5f/radial_mask.size();
01278         size_t size=radial_mask.size();
01279         float norm = 1.0f/sqrt(2*M_PI);
01280         for (size_t i = 0; i < size; i++) {
01281                 radial_mask[i] = norm*((1.0f/sigma1*exp(-x*x/(2.0f*sigma1*sigma1))) - (1.0f/sigma2*exp(-x*x/(2.0f*sigma2*sigma2))));
01282                 x += nqstep;
01283         }
01284 }

string EMAN::DoGFourierProcessor::get_desc (  )  const [inline, virtual]

Get the descrition of this specific processor.

This function must be overwritten by a subclass.

Returns:
The description of this processor.

Implements EMAN::Processor.

Definition at line 1035 of file processor.h.

01036                 {
01037                         return "processor radial function: f(x) = 1/sqrt(2*pi)*[1/sigma1*exp-(x^2/2*sigma1^2) - 1/sigma2*exp-(x^2/2*sigma2^2)]";
01038                 }

string EMAN::DoGFourierProcessor::get_name (  )  const [inline, virtual]

Get the processor's name.

Each processor is identified by a unique name.

Returns:
The processor's name.

Implements EMAN::Processor.

Definition at line 1026 of file processor.h.

References NAME.

01027                 {
01028                         return NAME;
01029                 }

TypeDict EMAN::DoGFourierProcessor::get_param_types (  )  const [inline, virtual]

Get processor parameter information in a dictionary.

Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.

Returns:
A dictionary containing the parameter info.

Reimplemented from EMAN::FourierProcessor.

Definition at line 1047 of file processor.h.

References EMAN::EMObject::FLOAT, and EMAN::TypeDict::put().

01048                 {
01049                         TypeDict d;
01050                         d.put("sigma1", EMObject::FLOAT, "DoG sigma1");
01051                         d.put("sigma2", EMObject::FLOAT, "DoG sigma2");
01052                         return d;
01053                 }

static Processor* EMAN::DoGFourierProcessor::NEW (  )  [inline, static]

Definition at line 1030 of file processor.h.

References DoGFourierProcessor().

01031                 {
01032                         return new DoGFourierProcessor();
01033                 }

void EMAN::DoGFourierProcessor::set_params ( const Dict new_params  )  [inline, virtual]

Set the processor parameters using a key/value dictionary.

Parameters:
new_params A dictionary containing the new parameters.

Reimplemented from EMAN::Processor.

Definition at line 1040 of file processor.h.

References EMAN::Processor::params, sigma1, and sigma2.

01041                 {
01042                         params = new_params;
01043                         sigma1 = params["sigma1"];
01044                         sigma2 = params["sigma2"];
01045                 }


Member Data Documentation

const string DoGFourierProcessor::NAME = "filter.DoG" [static]

Definition at line 1055 of file processor.h.

Referenced by get_name().

float EMAN::DoGFourierProcessor::sigma1 [private]

Definition at line 1061 of file processor.h.

Referenced by create_radial_func(), and set_params().

float EMAN::DoGFourierProcessor::sigma2 [private]

Definition at line 1062 of file processor.h.

Referenced by create_radial_func(), and set_params().


The documentation for this class was generated from the following files:
Generated on Tue Jul 12 13:48:40 2011 for EMAN2 by  doxygen 1.4.7