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

EMAN::MaskGaussProcessor Class Reference

a gaussian falloff to zero, radius is the 1/e of the width. More...

#include <processor.h>

Inheritance diagram for EMAN::MaskGaussProcessor:

[legend]
Collaboration diagram for EMAN::MaskGaussProcessor:
[legend]
List of all members.

Public Member Functions

string get_name () const
 Get the processor's name.
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.
string get_desc () const
 Get the descrition of this specific processor.

Static Public Member Functions

ProcessorNEW ()

Static Public Attributes

const string NAME = "mask.gaussian"

Protected Member Functions

void process_dist_pixel (float *pixel, float dist) const

Protected Attributes

float exponent

Detailed Description

a gaussian falloff to zero, radius is the 1/e of the width.

Definition at line 2520 of file processor.h.


Member Function Documentation

string EMAN::MaskGaussProcessor::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.

Reimplemented from EMAN::CircularMaskProcessor.

Definition at line 2548 of file processor.h.

02549                 {
02550                         return "a gaussian falloff to zero, radius is the 1/e of the width. If inner_radius>0, then \
02551 outer radius specifies width of Gaussian starting at inner_radius rather than total radius.";
02552                 }

string EMAN::MaskGaussProcessor::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 2523 of file processor.h.

02524                 {
02525                         return NAME;
02526                 }

TypeDict EMAN::MaskGaussProcessor::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::CircularMaskProcessor.

Definition at line 2541 of file processor.h.

References EMAN::TypeDict::put().

02542                 {
02543                         TypeDict d = CircularMaskProcessor::get_param_types();
02544                         d.put("exponent", EMObject::FLOAT, "The exponent, f in e^-Bs^f. default 2.0, producing a Gaussian");
02545                         return d;
02546                 }

Processor* EMAN::MaskGaussProcessor::NEW  )  [inline, static]
 

Definition at line 2527 of file processor.h.

02528                 {
02529                         return new MaskGaussProcessor();
02530                 }

void EMAN::MaskGaussProcessor::process_dist_pixel float *  pixel,
float  dist
const [inline, protected, virtual]
 

Implements EMAN::CircularMaskProcessor.

Definition at line 2558 of file processor.h.

References dist(), and sqrt().

02559                 {
02560                         if (inner_radius_square>0) {
02561                                 if (dist>inner_radius_square) {
02562                                         if (exponent==2.0f) (*pixel) *= exp(-pow(sqrt(dist)-inner_radius,2.0f) / outer_radius_square);
02563                                         else (*pixel) *= exp(-pow(sqrt(dist)-inner_radius,exponent) / pow((float)outer_radius_square,exponent/2.0f));
02564                                 }
02565                         }
02566                         else {
02567                                 if (exponent==2.0f) (*pixel) *= exp(-dist / outer_radius_square);
02568                                 else (*pixel) *= exp(-pow(dist,exponent/2.0f) / pow((float)outer_radius_square,exponent/2.0f));
02569                         }
02570                 }

void EMAN::MaskGaussProcessor::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::CircularMaskProcessor.

Definition at line 2532 of file processor.h.

02533                 {
02534                         CircularMaskProcessor::set_params(new_params);
02535                         exponent = params["exponent"];
02536                         if (exponent <= 0.0) {
02537                                 exponent = 2.0;
02538                         }
02539                 }


Member Data Documentation

float EMAN::MaskGaussProcessor::exponent [protected]
 

Definition at line 2557 of file processor.h.

const string MaskGaussProcessor::NAME = "mask.gaussian" [static]
 

Definition at line 107 of file processor.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Apr 30 15:39:21 2010 for EMAN2 by  doxygen 1.3.9.1