#include <processor.h>
Inheritance diagram for EMAN::MaskGaussProcessor:
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 | |
Processor * | NEW () |
Static Public Attributes | |
const string | NAME = "mask.gaussian" |
Protected Member Functions | |
void | process_dist_pixel (float *pixel, float dist) const |
Protected Attributes | |
float | exponent |
Definition at line 2519 of file processor.h.
|
Get the descrition of this specific processor. This function must be overwritten by a subclass.
Reimplemented from EMAN::CircularMaskProcessor. Definition at line 2547 of file processor.h. 02548 { 02549 return "a gaussian falloff to zero, radius is the 1/e of the width. If inner_radius>0, then \ 02550 outer radius specifies width of Gaussian starting at inner_radius rather than total radius."; 02551 }
|
|
Get the processor's name. Each processor is identified by a unique name.
Implements EMAN::Processor. Definition at line 2522 of file processor.h. 02523 {
02524 return NAME;
02525 }
|
|
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::CircularMaskProcessor. Definition at line 2540 of file processor.h. References EMAN::TypeDict::put(). 02541 { 02542 TypeDict d = CircularMaskProcessor::get_param_types(); 02543 d.put("exponent", EMObject::FLOAT, "The exponent, f in e^-Bs^f. default 2.0, producing a Gaussian"); 02544 return d; 02545 }
|
|
Definition at line 2526 of file processor.h. 02527 { 02528 return new MaskGaussProcessor(); 02529 }
|
|
Implements EMAN::CircularMaskProcessor. Definition at line 2557 of file processor.h. References dist(), and sqrt(). 02558 { 02559 if (inner_radius_square>0) { 02560 if (dist>inner_radius_square) { 02561 if (exponent==2.0f) (*pixel) *= exp(-pow(sqrt(dist)-inner_radius,2.0f) / outer_radius_square); 02562 else (*pixel) *= exp(-pow(sqrt(dist)-inner_radius,exponent) / pow((float)outer_radius_square,exponent/2.0f)); 02563 } 02564 } 02565 else { 02566 if (exponent==2.0f) (*pixel) *= exp(-dist / outer_radius_square); 02567 else (*pixel) *= exp(-pow(dist,exponent/2.0f) / pow((float)outer_radius_square,exponent/2.0f)); 02568 } 02569 }
|
|
Set the processor parameters using a key/value dictionary.
Reimplemented from EMAN::CircularMaskProcessor. Definition at line 2531 of file processor.h. 02532 { 02533 CircularMaskProcessor::set_params(new_params); 02534 exponent = params["exponent"]; 02535 if (exponent <= 0.0) { 02536 exponent = 2.0; 02537 } 02538 }
|
|
Definition at line 2556 of file processor.h. |
|
Definition at line 107 of file processor.cpp. |