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

Aligner class defines image alignment method. More...

#include <aligner.h>

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

Public Member Functions

virtual ~Aligner ()
 
virtual EMDataalign (EMData *this_img, EMData *to_img) const =0
 
virtual EMDataalign (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. More...
 
virtual string get_name () const =0
 Get the Aligner's name. More...
 
virtual string get_desc () const =0
 
virtual Dict get_params () const
 Get the Aligner parameters in a key/value dictionary. More...
 
virtual void set_params (const Dict &new_params)
 Set the Aligner parameters using a key/value dictionary. More...
 
virtual TypeDict get_param_types () const =0
 
virtual vector< Dictxform_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. More...
 

Protected Attributes

Dict params
 

Detailed Description

Aligner class defines image alignment method.

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:
  - a unique name to idenfity itself in the factory.
  - a static method to register itself in the factory.

Typical usage of Aligners:

Definition at line 80 of file aligner.h.

Constructor & Destructor Documentation

◆ ~Aligner()

virtual EMAN::Aligner::~Aligner ( )
inlinevirtual

Definition at line 83 of file aligner.h.

84 {
85 }

Member Function Documentation

◆ align() [1/2]

virtual EMData * EMAN::Aligner::align ( EMData this_img,
EMData to_img 
) const
pure virtual

◆ align() [2/2]

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.

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

Implemented in EMAN::RTFSlowExhaustiveAligner, EMAN::XYZAligner, EMAN::FRM2DAligner, EMAN::SymAlignProcessor, EMAN::SymAlignProcessorQuat, EMAN::RT3DGridAligner, EMAN::RT3DSymmetryAligner, EMAN::ScaleAligner, EMAN::TranslationalAligner, EMAN::RotationalAligner, EMAN::RotationalAlignerBispec, EMAN::RotationalAlignerIterative, EMAN::RotatePrecenterAligner, EMAN::RotateTranslateAligner, EMAN::RotateTranslateAlignerBispec, EMAN::RotateTranslateScaleAligner, EMAN::RotateTranslateAlignerIterative, EMAN::RotateTranslateScaleAlignerIterative, EMAN::RotateTranslateAlignerPawel, EMAN::RotateTranslateBestAligner, EMAN::RotateFlipAligner, EMAN::RotateFlipAlignerIterative, EMAN::RotateTranslateFlipAligner, EMAN::RotateTranslateFlipScaleAligner, EMAN::RotateTranslateFlipAlignerIterative, EMAN::RotateTranslateFlipScaleAlignerIterative, EMAN::RotateTranslateFlipAlignerPawel, EMAN::RTFExhaustiveAligner, EMAN::RefineAligner, EMAN::RefineAlignerCG, EMAN::Refine3DAlignerGrid, EMAN::Refine3DAlignerQuaternion, EMAN::RT3DSphereAligner, EMAN::RT2DTreeAligner, EMAN::RT2Dto3DTreeAligner, EMAN::RT3DTreeAligner, and EMAN::RT3DLocalTreeAligner.

◆ get_desc()

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

◆ get_name()

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

◆ get_param_types()

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

◆ get_params()

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

Get the Aligner parameters in a key/value dictionary.

Returns
A key/value pair dictionary containing the parameters.

Definition at line 112 of file aligner.h.

113 {
114 return params;
115 }
Dict params
Definition: aligner.h:147

References params.

Referenced by EMAN::RT2Dto3DTreeAligner::xform_align_nbest(), EMAN::RT3DTreeAligner::xform_align_nbest(), and EMAN::RT3DLocalTreeAligner::xform_align_nbest().

◆ set_params()

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

Set the Aligner parameters using a key/value dictionary.

Parameters
new_paramsA dictionary containing the new parameters.

Definition at line 120 of file aligner.h.

121 {
122 params = new_params;
123 }

References params.

◆ xform_align_nbest()

vector< Dict > Aligner::xform_align_nbest ( EMData this_img,
EMData to_img,
const unsigned int  nsoln,
const string &  cmp_name,
const Dict cmp_params 
) const
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

Parameters
this_imgthe image that will be aligned (transformed) and compared to to_img as part of the process of finding the best alignment
to_imgthe image that will stay still as this_img is transformed and compared to it
nsolnthe number of solutions you want to receive in the return vector.
cmp_namethe name of a comparator - may be unused
cmp_paramsthe params of the comparator - may be unused
Returns
an ordered vector of Dicts of length nsoln. The Dicts in the vector have keys "score" (i.e. correlation score) and "xform.align3d" (Transform containing the alignment)

Reimplemented in EMAN::RT3DGridAligner, EMAN::RT3DSphereAligner, EMAN::RT2DTreeAligner, EMAN::RT2Dto3DTreeAligner, EMAN::RT3DTreeAligner, EMAN::RT3DLocalTreeAligner, and EMAN::RT3DSymmetryAligner.

Definition at line 135 of file aligner.cpp.

136{
137 vector<Dict> solns;
138 return solns;
139}

Member Data Documentation

◆ params

Dict EMAN::Aligner::params
mutableprotected

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