EMAN::XYZAligner Class Reference

XYZAligner is an aligner template for defining new aligners. More...

#include <aligner_template.h>

Inheritance diagram for EMAN::XYZAligner:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

EMDataalign (EMData *this_img, EMData *to_img, const string &cmp_name, const Dict &cmp_params) const
 To align 'this_img' with another image passed in through its parameters.
EMDataalign (EMData *this_img, EMData *to_img) const
string get_name () const
 Get the Aligner's name.
string get_desc () const
TypeDict get_param_types () const
 Add your aligner parameter names and types in get_param_types().

Static Public Member Functions

static AlignerNEW ()

Static Public Attributes

static const string NAME = "xyz"

Detailed Description

XYZAligner is an aligner template for defining new aligners.

Please add your own code at the proper place.

1) Replace all 'XYZ' with your new aligner name. 2) Define the aligner parameter names and types in get_param_types(). 3) Implement the aligner in XYZAligner::align().

Definition at line 47 of file aligner_template.h.


Member Function Documentation

EMData* EMAN::XYZAligner::align ( EMData this_img,
EMData to_img 
) const [inline, virtual]

Implements EMAN::Aligner.

Definition at line 53 of file aligner_template.h.

References align().

00054                 {
00055                         return align(this_img, to_img);
00056                 }

EMData * XYZAligner::align ( EMData this_img,
EMData to_img,
const string &  cmp_name,
const Dict cmp_params 
) const [virtual]

To align 'this_img' with another image passed in through its parameters.

The alignment uses a user-given comparison method to compare the two images. If none is given, a default one is used.

Parameters:
this_img The image to be compared.
to_img 'this_img" is aligned with 'to_img'.
cmp_name The comparison method to compare the two images.
cmp_params The parameter dictionary for comparison method.
Returns:
The aligned image.

Implements EMAN::Aligner.

Definition at line 38 of file aligner_template.cpp.

References EMAN::Aligner::params.

Referenced by align().

00040 {
00041         if (!this_img) {
00042                 return 0;
00043         }
00044 #if 0
00045 
00046         int param1 = params["param1"];
00047         float param2 = params["param2"];
00048 #endif
00049 
00050         return 0;
00051 }

string EMAN::XYZAligner::get_desc (  )  const [inline, virtual]

Implements EMAN::Aligner.

Definition at line 63 of file aligner_template.h.

00064                 {
00065                         return "XYZ description";
00066                 }

string EMAN::XYZAligner::get_name (  )  const [inline, virtual]

Get the Aligner's name.

Each Aligner is identified by a unique name.

Returns:
The Aligner's name.

Implements EMAN::Aligner.

Definition at line 58 of file aligner_template.h.

References NAME.

00059                 {
00060                         return NAME;
00061                 }

TypeDict EMAN::XYZAligner::get_param_types (  )  const [inline, virtual]

Add your aligner parameter names and types in get_param_types().

For available parameter types, please refer class EMObject.

As an example, XYZAligner has 3 parameters: EMData *with; int param1; float param2;

Implements EMAN::Aligner.

Definition at line 82 of file aligner_template.h.

References EMAN::EMObject::FLOAT, EMAN::EMObject::INT, and EMAN::TypeDict::put().

00083                 {
00084                         TypeDict d;
00085 
00086                         d.put("param1", EMObject::INT);
00087                         d.put("param2", EMObject::FLOAT);
00088                         return d;
00089                 }

static Aligner* EMAN::XYZAligner::NEW (  )  [inline, static]

Definition at line 68 of file aligner_template.h.

00069                 {
00070                         return new XYZAligner();
00071                 }


Member Data Documentation

const string XYZAligner::NAME = "xyz" [static]

Definition at line 91 of file aligner_template.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 12:43:20 2013 for EMAN2 by  doxygen 1.4.7