EMAN2
Public Member Functions | Protected Attributes | List of all members
EMAN::Analyzer Class Referenceabstract

Analyzer class defines a way to take a List of images as input, and returns a new List of images. More...

#include <analyzer.h>

Inheritance diagram for EMAN::Analyzer:
Inheritance graph
[legend]
Collaboration diagram for EMAN::Analyzer:
Collaboration graph
[legend]

Public Member Functions

 Analyzer ()
 
virtual ~Analyzer ()
 
virtual int insert_image (EMData *image)=0
 insert a image to the list of input images More...
 
virtual int insert_images_list (vector< EMData * > image_list)
 insert a list of images to the list of input images More...
 
virtual vector< EMData * > analyze ()=0
 main function for Analyzer, analyze input images and create output images More...
 
virtual string get_name () const =0
 Get the Analyzer's name. More...
 
virtual string get_desc () const =0
 Get the Analyzer's description. More...
 
virtual void set_params (const Dict &new_params)
 Set the Analyzer parameters using a key/value dictionary. More...
 
virtual Dict get_params () const
 Get the Reconstructor's parameters in a key/value dictionary. More...
 
virtual TypeDict get_param_types () const =0
 Get Analyzer parameter information in a dictionary. More...
 

Protected Attributes

Dict params
 
vector< EMData * > images
 

Detailed Description

Analyzer class defines a way to take a List of images as input, and returns a new List of images.

Analyzer class is the base class for all analyzer classes. Each specific analyzer has a unique ID name. This name is used to call a analyzer.

All Analyzer classes in EMAN are managed by a Factory pattern. So each Analyzer class must define:

Definition at line 56 of file analyzer.h.

Constructor & Destructor Documentation

◆ Analyzer()

EMAN::Analyzer::Analyzer ( )
inline

Definition at line 59 of file analyzer.h.

59{}

◆ ~Analyzer()

virtual EMAN::Analyzer::~Analyzer ( )
inlinevirtual

Definition at line 61 of file analyzer.h.

62 {}

Member Function Documentation

◆ analyze()

virtual vector< EMData * > EMAN::Analyzer::analyze ( )
pure virtual

main function for Analyzer, analyze input images and create output images

Returns
vector<EMData *> result os images analysis

Implemented in EMAN::InertiaMatrixAnalyzer, EMAN::ShapeAnalyzer, EMAN::KMeansAnalyzer, EMAN::SVDAnalyzer, and EMAN::CircularAverageAnalyzer.

◆ get_desc()

virtual string EMAN::Analyzer::get_desc ( ) const
pure virtual

◆ get_name()

virtual string EMAN::Analyzer::get_name ( ) const
pure virtual

Get the Analyzer's name.

Each Analyzer is identified by a unique name.

Returns
The Analyzer's name.

Implemented in EMAN::InertiaMatrixAnalyzer, EMAN::ShapeAnalyzer, EMAN::KMeansAnalyzer, EMAN::SVDAnalyzer, and EMAN::CircularAverageAnalyzer.

◆ get_param_types()

virtual TypeDict EMAN::Analyzer::get_param_types ( ) const
pure virtual

Get Analyzer parameter information in a dictionary.

Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.

Returns
A dictionary containing the parameter info.

Implemented in EMAN::InertiaMatrixAnalyzer, EMAN::ShapeAnalyzer, EMAN::KMeansAnalyzer, EMAN::SVDAnalyzer, and EMAN::CircularAverageAnalyzer.

◆ get_params()

virtual Dict EMAN::Analyzer::get_params ( ) const
inlinevirtual

Get the Reconstructor's parameters in a key/value dictionary.

Returns
A key/value pair dictionary containing the parameters.

Definition at line 102 of file analyzer.h.

103 {
104 return params;
105 }

References params.

◆ insert_image()

virtual int EMAN::Analyzer::insert_image ( EMData image)
pure virtual

insert a image to the list of input images

Parameters
image
Returns
int 0 for success, <0 for fail

Implemented in EMAN::InertiaMatrixAnalyzer, EMAN::ShapeAnalyzer, EMAN::KMeansAnalyzer, EMAN::SVDAnalyzer, and EMAN::CircularAverageAnalyzer.

Referenced by insert_images_list().

◆ insert_images_list()

int Analyzer::insert_images_list ( vector< EMData * >  image_list)
virtual

insert a list of images to the list of input images

Parameters
image_list
Returns
int 0 for success, <0 for fail

Reimplemented in EMAN::SVDAnalyzer.

Definition at line 69 of file analyzer.cpp.

70{
71 vector<EMData *>::const_iterator iter;
72 for(iter=image_list.begin(); iter!=image_list.end(); ++iter) {
73 insert_image(*iter);
74 }
75 return 0;
76}
virtual int insert_image(EMData *image)=0
insert a image to the list of input images

References insert_image().

◆ set_params()

virtual void EMAN::Analyzer::set_params ( const Dict new_params)
inlinevirtual

Set the Analyzer parameters using a key/value dictionary.

Parameters
new_paramsA dictionary containing the new parameters.

Reimplemented in EMAN::KMeansAnalyzer, and EMAN::SVDAnalyzer.

Definition at line 94 of file analyzer.h.

95 {
96 params = new_params;
97 }

References params.

Member Data Documentation

◆ images

vector<EMData *> EMAN::Analyzer::images
protected

◆ params

Dict EMAN::Analyzer::params
mutableprotected

The documentation for this class was generated from the following files: