#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 | |
Processor * | NEW () |
Static Public Attributes | |
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 977 of file processor.h.
|
Definition at line 980 of file processor.h.
|
|
Implements EMAN::FourierProcessor. Definition at line 1184 of file processor.cpp. References Assert, intercept, EMAN::Dict::size(), slope, and x. 01185 { 01186 Assert(radial_mask.size() > 0); 01187 float x = 0.0f , step = 0.5f/radial_mask.size(); 01188 size_t size=radial_mask.size(); 01189 for (size_t i = 0; i < size; i++) { 01190 radial_mask[i] = intercept + ((slope - intercept) * i) / (size - 1.0f); 01191 x += step; 01192 } 01193 }
|
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Implements EMAN::Processor. Definition at line 993 of file processor.h. 00994 { 00995 return "processor radial function: f(x) = slope * x + intercept;"; 00996 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 984 of file processor.h. 00985 {
00986 return NAME;
00987 }
|
|
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 1005 of file processor.h. References EMAN::TypeDict::put(). 01006 { 01007 TypeDict d; 01008 d.put("intercept", EMObject::FLOAT, "intercept in 'f(x) = slope * x + intercept'"); 01009 d.put("slope", EMObject::FLOAT, "slope in 'f(x) = slope * x + intercept'"); 01010 return d; 01011 }
|
|
Definition at line 988 of file processor.h. 00989 { 00990 return new LinearRampProcessor(); 00991 }
|
|
Set the processor parameters using a key/value dictionary.
Reimplemented from EMAN::Processor. Definition at line 998 of file processor.h. 00999 { 01000 params = new_params; 01001 intercept = params["intercept"]; 01002 slope = params["slope"]; 01003 }
|
|
Definition at line 1019 of file processor.h. Referenced by create_radial_func(). |
|
Definition at line 73 of file processor.cpp. |
|
Definition at line 1020 of file processor.h. Referenced by create_radial_func(). |