EMAN2
|
Averager class defines a way to do averaging on a set of images. More...
#include <averager.h>
Public Member Functions | |
Averager () | |
virtual | ~Averager () |
virtual void | add_image (EMData *image) |
To add an image to the Averager. More... | |
virtual void | add_image_list (const vector< EMData * > &images) |
To add multiple images to the Averager. More... | |
virtual EMData * | finish ()=0 |
Finish up the averaging and return the result. More... | |
virtual string | get_name () const =0 |
Get the Averager's name. More... | |
virtual string | get_desc () const =0 |
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... | |
virtual TypeDict | get_param_types () const |
Get Averager parameter information in a dictionary. More... | |
Protected Attributes | |
Dict | params |
EMData * | result |
Averager class defines a way to do averaging on a set of images.
A user may add one or more images to the Averager at one time. The images are averaged at the time of adding to the Averager. After all images are added, Average will return the averaged result.
Averager class is the base class for all averager classes. Each specific averager has a unique ID name. This name is used to call a averager.
All Averager classes in EMAN are managed by a Factory pattern. So each Averager class must define: - a unique name to idenfity itself in the factory. - a static method to register itself in the factory.
Typical usages of Averager:
Definition at line 92 of file averager.h.
|
inline |
Definition at line 95 of file averager.h.
|
inlinevirtual |
Definition at line 97 of file averager.h.
|
virtual |
To add an image to the Averager.
This image will be averaged in this function.
image | The image to be averaged. |
Reimplemented in EMAN::ImageAverager, EMAN::LocalWeightAverager, EMAN::IterAverager, EMAN::FourierWeightAverager, EMAN::TomoAverager, EMAN::MinMaxAverager, EMAN::MedianAverager, EMAN::CtfWtAverager, EMAN::CtfWtFiltAverager, EMAN::CtfCAutoAverager, EMAN::CtfCWautoAverager, EMAN::SigmaAverager, and EMAN::XYZAverager.
Definition at line 81 of file averager.cpp.
Referenced by add_image_list(), and EMAN::ApplySymProcessor::process().
|
virtual |
To add multiple images to the Averager.
All the newly-added images are averaged in this function.
images | The images to be averaged. |
Definition at line 86 of file averager.cpp.
References add_image().
|
pure virtual |
Finish up the averaging and return the result.
Implemented in EMAN::ImageAverager, EMAN::LocalWeightAverager, EMAN::IterAverager, EMAN::FourierWeightAverager, EMAN::TomoAverager, EMAN::MinMaxAverager, EMAN::MedianAverager, EMAN::CtfWtAverager, EMAN::CtfWtFiltAverager, EMAN::CtfCAutoAverager, EMAN::CtfCWautoAverager, EMAN::SigmaAverager, and EMAN::XYZAverager.
Referenced by EMAN::ApplySymProcessor::process().
|
pure virtual |
Implemented in EMAN::ImageAverager, EMAN::LocalWeightAverager, EMAN::IterAverager, EMAN::FourierWeightAverager, EMAN::TomoAverager, EMAN::MinMaxAverager, EMAN::MedianAverager, EMAN::CtfWtAverager, EMAN::CtfWtFiltAverager, EMAN::CtfCAutoAverager, EMAN::CtfCWautoAverager, EMAN::SigmaAverager, and EMAN::XYZAverager.
|
pure virtual |
Get the Averager's name.
Each Averager is identified by a unique name.
Implemented in EMAN::ImageAverager, EMAN::LocalWeightAverager, EMAN::IterAverager, EMAN::FourierWeightAverager, EMAN::TomoAverager, EMAN::MinMaxAverager, EMAN::MedianAverager, EMAN::CtfWtAverager, EMAN::CtfWtFiltAverager, EMAN::CtfCAutoAverager, EMAN::CtfCWautoAverager, EMAN::SigmaAverager, and EMAN::XYZAverager.
|
inlinevirtual |
Get Averager parameter information in a dictionary.
Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.
Reimplemented in EMAN::ImageAverager, EMAN::LocalWeightAverager, EMAN::IterAverager, EMAN::FourierWeightAverager, EMAN::TomoAverager, EMAN::MinMaxAverager, EMAN::MedianAverager, EMAN::SigmaAverager, and EMAN::XYZAverager.
Definition at line 150 of file averager.h.
|
virtual |
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.
Hence call mult after all of the weighted images have been added.
s | the scaling factor. |
NullPointerException | if the EMData pointer (result) is NULL |
Reimplemented in EMAN::ImageAverager, EMAN::TomoAverager, EMAN::MinMaxAverager, and EMAN::SigmaAverager.
Definition at line 71 of file averager.cpp.
References NullPointerException, and result.
|
inlinevirtual |
Set the Averager parameters using a key/value dictionary.
new_params | A dictionary containing the new parameters. |
Reimplemented in EMAN::CtfWtAverager, EMAN::CtfWtFiltAverager, EMAN::CtfCAutoAverager, and EMAN::CtfCWautoAverager.
Definition at line 129 of file averager.h.
References params.
|
mutableprotected |
Definition at line 157 of file averager.h.
Referenced by EMAN::ImageAverager::add_image(), EMAN::LocalWeightAverager::add_image(), EMAN::FourierWeightAverager::add_image(), EMAN::TomoAverager::add_image(), EMAN::MinMaxAverager::add_image(), EMAN::SigmaAverager::add_image(), EMAN::LocalWeightAverager::finish(), EMAN::TomoAverager::finish(), set_params(), EMAN::CtfWtAverager::set_params(), EMAN::CtfWtFiltAverager::set_params(), EMAN::CtfCAutoAverager::set_params(), and EMAN::CtfCWautoAverager::set_params().
|
protected |
Definition at line 158 of file averager.h.
Referenced by EMAN::ImageAverager::add_image(), EMAN::LocalWeightAverager::add_image(), EMAN::FourierWeightAverager::add_image(), EMAN::TomoAverager::add_image(), EMAN::MinMaxAverager::add_image(), EMAN::CtfWtAverager::add_image(), EMAN::CtfCAutoAverager::add_image(), EMAN::CtfCWautoAverager::add_image(), EMAN::SigmaAverager::add_image(), EMAN::ImageAverager::finish(), EMAN::LocalWeightAverager::finish(), EMAN::IterAverager::finish(), EMAN::FourierWeightAverager::finish(), EMAN::TomoAverager::finish(), EMAN::MinMaxAverager::finish(), EMAN::CtfWtAverager::finish(), EMAN::CtfCAutoAverager::finish(), EMAN::CtfCWautoAverager::finish(), EMAN::SigmaAverager::finish(), mult(), and EMAN::TomoAverager::~TomoAverager().