#include <aligner.h>
Inheritance diagram for EMAN::Aligner:


Public Member Functions | |
| virtual | ~Aligner () |
| virtual EMData * | align (EMData *this_img, EMData *to_img) const =0 |
| virtual EMData * | align (EMData *this_img, EMData *to_img, const string &cmp_name, const Dict &cmp_params) const =0 |
| To align 'this_img' with another image passed in through its parameters. | |
| virtual string | get_name () const =0 |
| Get the Aligner's name. | |
| virtual string | get_desc () const =0 |
| virtual Dict | get_params () const |
| Get the Aligner parameters in a key/value dictionary. | |
| virtual void | set_params (const Dict &new_params) |
| Set the Aligner parameters using a key/value dictionary. | |
| virtual TypeDict | get_param_types () const =0 |
| virtual vector< Dict > | xform_align_nbest (EMData *this_img, EMData *to_img, const unsigned int nsoln, const string &cmp_name, const Dict &cmp_params) const |
| This function first added in the context of the 3D aligners used by e2tomohunter: which wants the n best solutions, as opposed to just the best. | |
Protected Attributes | |
| Dict | params |
It aligns 2 images based on a user-given comparison method. Aligner class is the base class for all aligners. Each specific Aligner class has a unique name. This name is used to create a new Aligner instance or call an Aligner.
All Aligner classes in EMAN are managed by a Factory pattern. So each Aligner class must define:
Typical usage of Aligners:
vector<string> all_aligners = Factory<Aligner>::get_list();
EMData *image1 = ...;
EMData *image2 = ...;
image1->align("ALIGNER_NAME", image2);
EMData *align(EMData * this_img, EMData * to_img, string cmp_name = "") const; TypeDict get_param_types() const; string get_name() const { return "XYZ"; } static Aligner* NEW() { return new XYZAligner(); }
Definition at line 84 of file aligner.h.
| virtual EMAN::Aligner::~Aligner | ( | ) | [inline, virtual] |
| virtual EMData* EMAN::Aligner::align | ( | EMData * | this_img, | |
| EMData * | to_img, | |||
| const string & | cmp_name, | |||
| const Dict & | cmp_params | |||
| ) | const [pure 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.
| 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. |
Implemented in EMAN::TranslationalAligner, EMAN::RotationalAligner, EMAN::RotatePrecenterAligner, EMAN::RotateTranslateAligner, EMAN::RotateTranslateBestAligner, EMAN::RotateFlipAligner, EMAN::RotateTranslateFlipAligner, EMAN::RTFExhaustiveAligner, EMAN::RTFSlowExhaustiveAligner, EMAN::RefineAligner, EMAN::Refine3DAligner, EMAN::RT3DGridAligner, EMAN::RT3DSphereAligner, and EMAN::XYZAligner.
Implemented in EMAN::TranslationalAligner, EMAN::RotationalAligner, EMAN::RotatePrecenterAligner, EMAN::RotateTranslateAligner, EMAN::RotateTranslateBestAligner, EMAN::RotateFlipAligner, EMAN::RotateTranslateFlipAligner, EMAN::RTFExhaustiveAligner, EMAN::RTFSlowExhaustiveAligner, EMAN::RefineAligner, EMAN::Refine3DAligner, EMAN::RT3DGridAligner, EMAN::RT3DSphereAligner, and EMAN::XYZAligner.
Referenced by EMAN::EMData::align().
| virtual string EMAN::Aligner::get_desc | ( | ) | const [pure virtual] |
Implemented in EMAN::TranslationalAligner, EMAN::RotationalAligner, EMAN::RotatePrecenterAligner, EMAN::RotateTranslateAligner, EMAN::RotateTranslateBestAligner, EMAN::RotateFlipAligner, EMAN::RotateTranslateFlipAligner, EMAN::RTFExhaustiveAligner, EMAN::RTFSlowExhaustiveAligner, EMAN::RefineAligner, EMAN::Refine3DAligner, EMAN::RT3DGridAligner, EMAN::RT3DSphereAligner, and EMAN::XYZAligner.
| virtual string EMAN::Aligner::get_name | ( | ) | const [pure virtual] |
Get the Aligner's name.
Each Aligner is identified by a unique name.
Implemented in EMAN::TranslationalAligner, EMAN::RotationalAligner, EMAN::RotatePrecenterAligner, EMAN::RotateTranslateAligner, EMAN::RotateTranslateBestAligner, EMAN::RotateFlipAligner, EMAN::RotateTranslateFlipAligner, EMAN::RTFExhaustiveAligner, EMAN::RTFSlowExhaustiveAligner, EMAN::RefineAligner, EMAN::Refine3DAligner, EMAN::RT3DGridAligner, EMAN::RT3DSphereAligner, and EMAN::XYZAligner.
| virtual TypeDict EMAN::Aligner::get_param_types | ( | ) | const [pure virtual] |
Implemented in EMAN::TranslationalAligner, EMAN::RotationalAligner, EMAN::RotatePrecenterAligner, EMAN::RotateTranslateAligner, EMAN::RotateTranslateBestAligner, EMAN::RotateFlipAligner, EMAN::RotateTranslateFlipAligner, EMAN::RTFExhaustiveAligner, EMAN::RTFSlowExhaustiveAligner, EMAN::RefineAligner, EMAN::Refine3DAligner, EMAN::RT3DGridAligner, EMAN::RT3DSphereAligner, and EMAN::XYZAligner.
| virtual Dict EMAN::Aligner::get_params | ( | ) | const [inline, virtual] |
| virtual void EMAN::Aligner::set_params | ( | const Dict & | new_params | ) | [inline, virtual] |
| virtual vector<Dict> EMAN::Aligner::xform_align_nbest | ( | EMData * | this_img, | |
| EMData * | to_img, | |||
| const unsigned int | nsoln, | |||
| const string & | cmp_name, | |||
| const Dict & | cmp_params | |||
| ) | const [inline, virtual] |
This function first added in the context of the 3D aligners used by e2tomohunter: which wants the n best solutions, as opposed to just the best.
Return value is an ordered vector of Dicts of length nsoln. The data with idx 0 has the best solution in it. The Dicts in the vector have two keys, "score" (which is a floating point score, probably correlation score), and "xform.align3d", which is a Transform containing the alignment parameters
| this_img | the image that will be aligned (transformed) and compared to to_img as part of the process of finding the best alignment | |
| to_img | the image that will stay still as this_img is transformed and compared to it | |
| nsoln | the number of solutions you want to receive in the return vector. | |
| cmp_name | the name of a comparator - may be unused | |
| cmp_params | the params of the comparator - may be unused |
Reimplemented in EMAN::RT3DGridAligner, and EMAN::RT3DSphereAligner.
Definition at line 144 of file aligner.h.
Referenced by EMAN::EMData::xform_align_nbest().
Dict EMAN::Aligner::params [mutable, protected] |
Definition at line 150 of file aligner.h.
Referenced by EMAN::XYZAligner::align(), EMAN::Refine3DAligner::align(), EMAN::RefineAligner::align(), EMAN::RTFSlowExhaustiveAligner::align(), EMAN::RTFExhaustiveAligner::align(), EMAN::RotateFlipAligner::align(), EMAN::RotateTranslateFlipAligner::align(), EMAN::RotateTranslateAligner::align(), EMAN::RotationalAligner::align(), EMAN::TranslationalAligner::align(), get_params(), set_params(), EMAN::RT3DSphereAligner::xform_align_nbest(), and EMAN::RT3DGridAligner::xform_align_nbest().
1.4.7