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

refine alignment. More...

#include <aligner.h>

Inheritance diagram for EMAN::RefineAligner:
Inheritance graph
[legend]
Collaboration diagram for EMAN::RefineAligner:
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 = "refine"
 

Additional Inherited Members

- Protected Attributes inherited from EMAN::Aligner
Dict params
 

Detailed Description

refine alignment.

Refines a preliminary 2D alignment using a simplex algorithm. Subpixel precision.

Parameters
xform.align2dThe Transform storing the starting guess. If unspecified the identity matrix is used
stepxThe x increment used to create the starting simplex. Default is 1
stepyThe y increment used to create the starting simplex. Default is 1
stepazThe rotational increment used to create the starting simplex. Default is 5
precisionThe precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations. Default is 0.04
maxiterThe maximum number of iterations. default=28
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 1312 of file aligner.h.

Member Function Documentation

◆ align() [1/2]

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

Implements EMAN::Aligner.

Definition at line 1318 of file aligner.h.

1319 {
1320 return align(this_img, to_img, "sqeuclidean", Dict());
1321 }
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::RefineAligner::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::RefineAligner::get_desc ( ) const
inlinevirtual

Implements EMAN::Aligner.

Definition at line 1328 of file aligner.h.

1329 {
1330 return "Refines a preliminary 2D alignment using a simplex algorithm. Subpixel precision.";
1331 }

◆ get_name()

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

1324 {
1325 return NAME;
1326 }
static const string NAME
Definition: aligner.h:1356

References NAME.

◆ get_param_types()

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

Implements EMAN::Aligner.

Definition at line 1338 of file aligner.h.

1339 {
1340 TypeDict d;
1341
1342 d.put("mode", EMObject::INT, "Currently unused");
1343 d.put("xform.align2d", EMObject::TRANSFORM, "The Transform storing the starting guess. If unspecified the identity matrix is used");
1344 d.put("stepx", EMObject::FLOAT, "The x increment used to create the starting simplex. Default is 1");
1345 d.put("stepy", EMObject::FLOAT, "The y increment used to create the starting simplex. Default is 1");
1346 d.put("stepaz", EMObject::FLOAT, "The rotational increment used to create the starting simplex. Default is 5");
1347 d.put("precision", EMObject::FLOAT, "The precision which, if achieved, can stop the iterative refinement before reaching the maximum iterations. Default is 0.04.");
1348 d.put("maxiter", EMObject::INT,"The maximum number of iterations that can be performed by the Simplex minimizer. default=28");
1349 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.");
1350 d.put("stepscale", EMObject::FLOAT, "If 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.");
1351 d.put("mask", EMObject::EMDATA, "A mask to be applied to the image being aligned prior to each similarity comparison.");
1352 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");
1353 return d;
1354 }

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

◆ NEW()

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

Definition at line 1333 of file aligner.h.

1334 {
1335 return new RefineAligner();
1336 }

Member Data Documentation

◆ NAME

const string RefineAligner::NAME = "refine"
static

Definition at line 1356 of file aligner.h.

Referenced by get_name().


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