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

EMAN::LinearRampProcessor Class Reference

processor radial function: f(x) = slope * x + intercept More...

#include <processor.h>

Inheritance diagram for EMAN::LinearRampProcessor:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LinearRampProcessor ()
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 = "eman1.filter.ramp"

Protected Member Functions

void create_radial_func (vector< float > &radial_mask) const

Private Attributes

float intercept
float slope

Detailed Description

processor radial function: f(x) = slope * x + intercept

Parameters:
intercept intercept in 'f(x) = slope * x + intercept
slope slope in 'f(x) = slope * x + intercept

Definition at line 1133 of file processor.h.


Constructor & Destructor Documentation

EMAN::LinearRampProcessor::LinearRampProcessor  )  [inline]
 

Definition at line 1136 of file processor.h.

Referenced by NEW().

01136                                      :intercept(0), slope(0)
01137                 {
01138                 }


Member Function Documentation

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

Implements EMAN::FourierProcessor.

Definition at line 1198 of file processor.cpp.

References Assert, intercept, slope, and x.

01199 {
01200         Assert(radial_mask.size() > 0);
01201         float x = 0.0f , step = 0.5f/radial_mask.size();
01202         size_t size=radial_mask.size();
01203         for (size_t i = 0; i < size; i++) {
01204                 radial_mask[i] = intercept + ((slope - intercept) * i) / (size - 1.0f);
01205                 x += step;
01206         }
01207 }

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

01150                 {
01151                         return "processor radial function: f(x) = slope * x + intercept;";
01152                 }

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

References NAME.

01141                 {
01142                         return NAME;
01143                 }

TypeDict EMAN::LinearRampProcessor::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 1161 of file processor.h.

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

01162                 {
01163                         TypeDict d;
01164                         d.put("intercept", EMObject::FLOAT, "intercept in 'f(x) = slope * x + intercept'");
01165                         d.put("slope", EMObject::FLOAT, "slope in 'f(x) = slope * x + intercept'");
01166                         return d;
01167                 }

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

Definition at line 1144 of file processor.h.

References LinearRampProcessor().

01145                 {
01146                         return new LinearRampProcessor();
01147                 }

void EMAN::LinearRampProcessor::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 1154 of file processor.h.

References intercept, EMAN::Processor::params, and slope.

01155                 {
01156                         params = new_params;
01157                         intercept = params["intercept"];
01158                         slope = params["slope"];
01159                 }


Member Data Documentation

float EMAN::LinearRampProcessor::intercept [private]
 

Definition at line 1175 of file processor.h.

Referenced by create_radial_func(), and set_params().

const string LinearRampProcessor::NAME = "eman1.filter.ramp" [static]
 

Definition at line 1169 of file processor.h.

Referenced by get_name().

float EMAN::LinearRampProcessor::slope [private]
 

Definition at line 1176 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 May 25 17:36:55 2010 for EMAN2 by  doxygen 1.4.4