EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
EMAN::RefineAlignerCG Class Reference

Conjugate gradient refine alignment. More...

#include <aligner.h>

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

Public Member Functions

virtual EMDataalign (EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
 To align 'this_img' with another image passed in through its parameters. More...
 
virtual EMDataalign (EMData *this_img, EMData *to_img) const
 
virtual string get_name () const
 Get the Aligner's name. More...
 
virtual string get_desc () const
 
virtual TypeDict get_param_types () const
 
- Public Member Functions inherited from EMAN::Aligner
virtual ~Aligner ()
 
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 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...
 

Static Public Member Functions

static AlignerNEW ()
 

Static Public Attributes

static const string NAME = "refinecg"
 

Additional Inherited Members

- Protected Attributes inherited from EMAN::Aligner
Dict params
 

Detailed Description

Conjugate gradient refine alignment.

Refines a preliminary 2D alignment to subpixel precision. Faster than 'refine', but requires better local minimum

Parameters
xform.align2dThe Transform storing the starting guess. If unspecified the identity matrix is used
stepThe initial increment used for stepping on the gradient. default=0.1
precisionThe precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations. Default is 0.02
maxiterThe maximum number of iterations. default=12
maxshiftMaximum translation in pixels in any direction. If the solution yields a shift beyond this value in any direction, then the refinement is judged a failure and the original alignment is used as the solution
stepscaleIf set to any non-zero value, scale will be included in the alignment, and this will be the initial step. Images should be edgenormalized. If the scale goes beyond +-30% alignment will fail
verboseThis will cause debugging information to be printed on the screen for the iterative refinement. Larger numbers -> more info. default=0

Definition at line 1369 of file aligner.h.

Member Function Documentation

◆ align() [1/2]

virtual EMData * EMAN::RefineAlignerCG::align ( EMData this_img,
EMData to_img 
) const
inlinevirtual

Implements EMAN::Aligner.

Definition at line 1375 of file aligner.h.

1376 {
1377 return align(this_img, to_img, "sqeuclidean", Dict());
1378 }
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="dot", const Dict &cmp_params=Dict()) const
To align 'this_img' with another image passed in through its parameters.

References align().

◆ align() [2/2]

virtual EMData * EMAN::RefineAlignerCG::align ( EMData this_img,
EMData to_img,
const string &  cmp_name = "dot",
const Dict cmp_params = Dict() 
) 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_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.

Implements EMAN::Aligner.

Referenced by align().

◆ get_desc()

virtual string EMAN::RefineAlignerCG::get_desc ( ) const
inlinevirtual

Implements EMAN::Aligner.

Definition at line 1385 of file aligner.h.

1386 {
1387 return "Refines a preliminary 2D alignment using a simplex algorithm. Subpixel precision.";
1388 }

◆ get_name()

virtual string EMAN::RefineAlignerCG::get_name ( ) const
inlinevirtual

Get the Aligner's name.

Each Aligner is identified by a unique name.

Returns
The Aligner's name.

Implements EMAN::Aligner.

Definition at line 1380 of file aligner.h.

1381 {
1382 return NAME;
1383 }
static const string NAME
Definition: aligner.h:1411

References NAME.

◆ get_param_types()

virtual TypeDict EMAN::RefineAlignerCG::get_param_types ( ) const
inlinevirtual

Implements EMAN::Aligner.

Definition at line 1395 of file aligner.h.

1396 {
1397 TypeDict d;
1398
1399 d.put("mode", EMObject::INT, "Currently unused");
1400 d.put("xform.align2d", EMObject::TRANSFORM, "The Transform storing the starting guess. If unspecified the identity matrix is used");
1401 d.put("step", EMObject::FLOAT, "The x increment used to create the starting simplex. Default is 0.1");
1402 d.put("precision", EMObject::FLOAT, "The precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations. Default is 0.02.");
1403 d.put("maxiter", EMObject::INT,"The maximum number of iterations that can be performed by the Simplex minimizer. default=12");
1404 d.put("maxshift", EMObject::INT,"Maximum translation in pixels in any direction. If the solution yields a shift beyond this value in any direction, then the refinement is judged a failure and the original alignment is used as the solution.");
1405 d.put("stepscale", EMObject::FLOAT, "If set to any non-zero value, scale will be included in the alignment. Images should be edgenormalized. If the scale goes beyond +-30% alignment will fail.");
1406 d.put("mask", EMObject::EMDATA, "A mask to be applied to the image being aligned prior to each similarity comparison.");
1407 d.put("verbose", EMObject::INT, "This will cause debugging information to be printed on the screen for the iterative refinement. Larger numbers -> more info. default=0");
1408 return d;
1409 }

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

◆ NEW()

static Aligner * EMAN::RefineAlignerCG::NEW ( )
inlinestatic

Definition at line 1390 of file aligner.h.

1391 {
1392 return new RefineAlignerCG();
1393 }

Member Data Documentation

◆ NAME

const string RefineAlignerCG::NAME = "refinecg"
static

Definition at line 1411 of file aligner.h.

Referenced by get_name().


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