#include <processor.h>
Inheritance diagram for EMAN::LinearRampProcessor:
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 Processor * | NEW () |
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 |
intercept | intercept in 'f(x) = slope * x + intercept | |
slope | slope in 'f(x) = slope * x + intercept |
Definition at line 923 of file processor.h.
EMAN::LinearRampProcessor::LinearRampProcessor | ( | ) | [inline] |
void LinearRampProcessor::create_radial_func | ( | vector< float > & | radial_mask | ) | const [protected, virtual] |
Implements EMAN::FourierProcessor.
Definition at line 1249 of file processor.cpp.
References Assert, intercept, slope, and x.
01250 { 01251 Assert(radial_mask.size() > 0); 01252 float x = 0.0f , step = 0.5f/radial_mask.size(); 01253 size_t size=radial_mask.size(); 01254 for (size_t i = 0; i < size; i++) { 01255 radial_mask[i] = intercept + ((slope - intercept) * i) / (size - 1.0f); 01256 x += step; 01257 } 01258 }
string EMAN::LinearRampProcessor::get_desc | ( | ) | const [inline, virtual] |
Get the descrition of this specific processor.
This function must be overwritten by a subclass.
Implements EMAN::Processor.
Definition at line 939 of file processor.h.
string EMAN::LinearRampProcessor::get_name | ( | ) | const [inline, virtual] |
Get the processor's name.
Each processor is identified by a unique name.
Implements EMAN::Processor.
Definition at line 930 of file processor.h.
References NAME.
00931 { 00932 return NAME; 00933 }
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.
Reimplemented from EMAN::FourierProcessor.
Definition at line 951 of file processor.h.
References EMAN::EMObject::FLOAT, and EMAN::TypeDict::put().
00952 { 00953 TypeDict d; 00954 d.put("intercept", EMObject::FLOAT, "intercept in 'f(x) = slope * x + intercept'"); 00955 d.put("slope", EMObject::FLOAT, "slope in 'f(x) = slope * x + intercept'"); 00956 return d; 00957 }
static Processor* EMAN::LinearRampProcessor::NEW | ( | ) | [inline, static] |
Definition at line 934 of file processor.h.
References LinearRampProcessor().
00935 { 00936 return new LinearRampProcessor(); 00937 }
void EMAN::LinearRampProcessor::set_params | ( | const Dict & | new_params | ) | [inline, virtual] |
Set the processor parameters using a key/value dictionary.
new_params | A dictionary containing the new parameters. |
Reimplemented from EMAN::Processor.
Definition at line 944 of file processor.h.
References intercept, EMAN::Processor::params, and slope.
00945 { 00946 params = new_params; 00947 intercept = params["intercept"]; 00948 slope = params["slope"]; 00949 }
float EMAN::LinearRampProcessor::intercept [private] |
const string LinearRampProcessor::NAME = "eman1.filter.ramp" [static] |
float EMAN::LinearRampProcessor::slope [private] |