EMAN2
Public Member Functions | Protected Attributes
EMAN::Analyzer Class Reference

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]

List of all members.

Public Member Functions

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

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 60 of file analyzer.h.


Constructor & Destructor Documentation

EMAN::Analyzer::Analyzer ( ) [inline]

Definition at line 63 of file analyzer.h.

{}
virtual EMAN::Analyzer::~Analyzer ( ) [inline, virtual]

Definition at line 65 of file analyzer.h.

                {}

Member Function Documentation

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, EMAN::PCAsmall, EMAN::PCAlarge, and EMAN::varimax.

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

Get the Analyzer's description.

Returns:
The Analyzer's description.

Implemented in EMAN::InertiaMatrixAnalyzer, EMAN::ShapeAnalyzer, EMAN::KMeansAnalyzer, EMAN::SVDAnalyzer, EMAN::PCAsmall, EMAN::PCAlarge, and EMAN::varimax.

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, EMAN::PCAsmall, EMAN::PCAlarge, and EMAN::varimax.

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, EMAN::PCAsmall, EMAN::PCAlarge, and EMAN::varimax.

virtual Dict EMAN::Analyzer::get_params ( ) const [inline, virtual]

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

Returns:
A key/value pair dictionary containing the parameters.

Definition at line 106 of file analyzer.h.

References params.

                {
                        return params;
                }
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, EMAN::PCAsmall, EMAN::PCAlarge, and EMAN::varimax.

Referenced by 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 72 of file analyzer.cpp.

References insert_image().

{
        vector<EMData *>::const_iterator iter;
                for(iter=image_list.begin(); iter!=image_list.end(); ++iter) {
                        insert_image(*iter);
                }
        return 0;
}
virtual void EMAN::Analyzer::set_params ( const Dict new_params) [inline, virtual]

Set the Analyzer parameters using a key/value dictionary.

Parameters:
new_paramsA dictionary containing the new parameters.

Reimplemented in EMAN::KMeansAnalyzer, EMAN::SVDAnalyzer, EMAN::PCAsmall, EMAN::PCAlarge, and EMAN::varimax.

Definition at line 98 of file analyzer.h.

References params.

                {
                        params = new_params;
                }

Member Data Documentation

vector<EMData *> EMAN::Analyzer::images [protected]
Dict EMAN::Analyzer::params [mutable, protected]

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