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

Refine alignment. More...

#include <aligner.h>

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

Public Member Functions

virtual EMDataalign (EMData *this_img, EMData *to_img, const string &cmp_name="sqeuclidean", 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 = "refine_3d"
 

Additional Inherited Members

- Protected Attributes inherited from EMAN::Aligner
Dict params
 

Detailed Description

Refine alignment.

Refines a preliminary 3D alignment using a simplex algorithm. Subpixel precision. Target function for the simplex algorithm is a rotation along an arbitrary axis defined by a quaternion, whose rotation magnitude is defined by the vector length (hence the simplex varies the vecotr component of the quaternion). In addition the simplex varies translation. Using quaternions avoids gimbal lock. The simplex algorithm moves the function downhill in a ameboa like fasion, hence it may get stuck in a local minima if the two 3D models are already roughly aligned.

Parameters
xform.align3dThe Transform storing the starting guess. If unspecified the identity matrix is used
stepxThe initial simplex step size in x
stepyThe initial simplex step size in y
stepzThe initial simplex step size in z
stepn0The initial simplex step size in the first quaternion vecotr component
stepn1The initial simplex step size in the second quaternion vecotr component
stepn2The initial simplex step size in the third quaternion vecotr component
spin_coeffThe multiplier appied to the spin (if it is too small or too large the simplex will not converge)
precisionThe precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations
maxiterThe maximum number of iterations that can be performed by the Simplex minimizer
maxshiftMaximum translation in pixels in any direction.
Author
John Flanagan (with code recyled from David Woolford)
Date
Feb 3rd 2011

Definition at line 1546 of file aligner.h.

Member Function Documentation

◆ align() [1/2]

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

Implements EMAN::Aligner.

Definition at line 1552 of file aligner.h.

1553 {
1554 return align(this_img, to_img, "sqeuclidean", Dict());
1555 }
virtual EMData * align(EMData *this_img, EMData *to_img, const string &cmp_name="sqeuclidean", 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::Refine3DAlignerQuaternion::align ( EMData this_img,
EMData to_img,
const string &  cmp_name = "sqeuclidean",
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::Refine3DAlignerQuaternion::get_desc ( ) const
inlinevirtual

Implements EMAN::Aligner.

Definition at line 1562 of file aligner.h.

1563 {
1564 return "Refines a preliminary 3D alignment using a simplex algorithm. Subpixel precision.";
1565 }

◆ get_name()

virtual string EMAN::Refine3DAlignerQuaternion::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 1557 of file aligner.h.

1558 {
1559 return NAME;
1560 }
static const string NAME
Definition: aligner.h:1589

References NAME.

◆ get_param_types()

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

Implements EMAN::Aligner.

Definition at line 1572 of file aligner.h.

1573 {
1574 TypeDict d;
1575 d.put("xform.align3d", EMObject::TRANSFORM,"The Transform storing the starting guess. If unspecified the identity matrix is used");
1576 d.put("stepx", EMObject::FLOAT, "The initial simplex step size in x. Default is 1");
1577 d.put("stepy", EMObject::FLOAT, "The initial simplex step size in y. Default is 1");
1578 d.put("stepz", EMObject::FLOAT, "The initial simplex step size in z. Default is 1." );
1579 d.put("stepn0", EMObject::FLOAT, "The initial simplex step size in the first quaternion vecotr component. Default is 1." );
1580 d.put("stepn1", EMObject::FLOAT, "The initial simplex step size in the second quaternion vecotr component. Default is 1." );
1581 d.put("stepn2", EMObject::FLOAT, "The initial simplex step size in the third quaternion vecotr component. Default is 1." );
1582 d.put("spin_coeff", EMObject::FLOAT,"The multiplier appied to the spin (if it is too small or too large the simplex will not converge). Default is 10.");
1583 d.put("precision", EMObject::FLOAT, "The precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations. Default is 0.01." );
1584 d.put("maxiter", EMObject::INT, "The maximum number of iterations that can be performed by the Simplex minimizer. Default is 100.");
1585 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.");
1586 return d;
1587 }

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

◆ NEW()

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

Definition at line 1567 of file aligner.h.

1568 {
1569 return new Refine3DAlignerQuaternion();
1570 }

Member Data Documentation

◆ NAME

const string Refine3DAlignerQuaternion::NAME = "refine_3d"
static

Definition at line 1589 of file aligner.h.

Referenced by get_name().


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