EMAN2
|
XYZAverager is an averager template for defining new averagers. More...
#include <averager_template.h>
Public Member Functions | |
XYZAverager () | |
void | add_image (EMData *image) |
To add an image to the Averager. More... | |
EMData * | finish () |
Finish up the averaging and return the result. More... | |
string | get_name () const |
Get the Averager's name. More... | |
string | get_desc () const |
TypeDict | get_param_types () const |
Add your averager parameter names and types in get_param_types(). More... | |
Public Member Functions inherited from EMAN::Averager | |
Averager () | |
virtual | ~Averager () |
virtual void | add_image_list (const vector< EMData * > &images) |
To add multiple images to the Averager. More... | |
virtual void | set_params (const Dict &new_params) |
Set the Averager parameters using a key/value dictionary. More... | |
virtual void | mult (const float &s) |
Multiply the result image by some floating point constant This is useful when weighting the input images prior to calling add_image - a situation where it is likely you want to divide by the sum of the weights. More... | |
Static Public Member Functions | |
static Averager * | NEW () |
Static Public Attributes | |
static const string | NAME = "xyz" |
Private Attributes | |
EMData * | result |
Additional Inherited Members | |
Protected Attributes inherited from EMAN::Averager | |
Dict | params |
EMData * | result |
XYZAverager is an averager template for defining new averagers.
Please add your own code at the proper place.
1) Replace all 'XYZ' with your new averager name. 2) Define the averager parameter names and types in get_param_types(). 3) Implement the averager in XYZAverager::align().
Definition at line 47 of file averager_template.h.
XYZAverager::XYZAverager | ( | ) |
Definition at line 39 of file averager_template.cpp.
Referenced by NEW().
|
virtual |
To add an image to the Averager.
This image will be averaged in this function.
image | The image to be averaged. |
Reimplemented from EMAN::Averager.
Definition at line 43 of file averager_template.cpp.
References result.
|
virtual |
Finish up the averaging and return the result.
Implements EMAN::Averager.
Definition at line 52 of file averager_template.cpp.
References result.
|
inlinevirtual |
Implements EMAN::Averager.
Definition at line 59 of file averager_template.h.
|
inlinevirtual |
Get the Averager's name.
Each Averager is identified by a unique name.
Implements EMAN::Averager.
Definition at line 54 of file averager_template.h.
References NAME.
|
inlinevirtual |
Add your averager parameter names and types in get_param_types().
For available parameter types, please refer class EMObject.
As an example, XYZAverager has 3 parameters: EMData *param1; int param2; float param3;
Reimplemented from EMAN::Averager.
Definition at line 78 of file averager_template.h.
References EMAN::EMObject::EMDATA, EMAN::EMObject::FLOAT, EMAN::EMObject::INT, and EMAN::TypeDict::put().
|
inlinestatic |
|
static |
Definition at line 87 of file averager_template.h.
Referenced by get_name().
|
private |
Definition at line 89 of file averager_template.h.
Referenced by add_image(), and finish().