EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes
EMAN::RotateTranslateFlipScaleAlignerIterative Class Reference

Iterative rotational, translational alignment with flipping and scaling. More...

#include <aligner.h>

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

List of all members.

Public Member Functions

 RotateTranslateFlipScaleAlignerIterative ()
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.
virtual EMDataalign (EMData *this_img, EMData *to_img) const
virtual string get_name () const
 Get the Aligner's name.
virtual string get_desc () const
virtual TypeDict get_param_types () const

Static Public Member Functions

static AlignerNEW ()

Static Public Attributes

static const string NAME = "rotate_trans_flip_scale_iter"

Detailed Description

Iterative rotational, translational alignment with flipping and scaling.

Basically, we find the best translation, and move to that pointer then we find the best rotation and rotate to that point. Next we iterate X times. We do this for each scale and flip of the image and return the optimal solution

Parameters:
minMinimum scaling (default: 0.95)
maxaximum scaling (default: 1.05)
stepScaling step (default: 0.01)
flip
maxshiftMaximum translation in pixels
r1inner ring
r2outer ring
maxitermaximum number of alignment iterations
Author:
John Flanagan
Date:
Oct 2010

Definition at line 981 of file aligner.h.


Constructor & Destructor Documentation

EMAN::RotateTranslateFlipScaleAlignerIterative::RotateTranslateFlipScaleAlignerIterative ( ) [inline]

Definition at line 985 of file aligner.h.

Referenced by NEW().

                                                           : ScaleAlignerABS("rotate_translate_flip_iterative")
                {
                }

Member Function Documentation

EMData * RotateTranslateFlipScaleAlignerIterative::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.

Definition at line 915 of file aligner.cpp.

References EMAN::ScaleAlignerABS::align_using_base(), EMAN::ScaleAlignerABS::basealigner_params, EMAN::Aligner::params, and EMAN::Dict::set_default().

Referenced by align().

{
        
        //Basically copy params into rotate_translate
        basealigner_params["flip"] = params.set_default("flip", (EMData *) 0);
        basealigner_params["maxshift"] = params.set_default("maxshift", -1);
        basealigner_params["r1"] = params.set_default("r1",-1);
        basealigner_params["r2"] = params.set_default("r2",-1);
        basealigner_params["maxiter"] = params.set_default("maxiter",3);
        
        //return the correct results
        return align_using_base(this_img, to, cmp_name, cmp_params);
        
}
virtual EMData* EMAN::RotateTranslateFlipScaleAlignerIterative::align ( EMData this_img,
EMData to_img 
) const [inline, virtual]

Implements EMAN::Aligner.

Definition at line 992 of file aligner.h.

References align().

                {
                        return align(this_img, to_img, "sqeuclidean", Dict());
                }
virtual string EMAN::RotateTranslateFlipScaleAlignerIterative::get_desc ( ) const [inline, virtual]

Implements EMAN::Aligner.

Definition at line 1002 of file aligner.h.

                {
                        return "Performs rotational alignment and follows this with translational alignment using the iterative method. Does this for each scale and returns the best";
                }
virtual string EMAN::RotateTranslateFlipScaleAlignerIterative::get_name ( ) const [inline, virtual]

Get the Aligner's name.

Each Aligner is identified by a unique name.

Returns:
The Aligner's name.

Implements EMAN::Aligner.

Definition at line 997 of file aligner.h.

References NAME.

                {
                        return NAME;
                }
virtual TypeDict EMAN::RotateTranslateFlipScaleAlignerIterative::get_param_types ( ) const [inline, virtual]

Implements EMAN::Aligner.

Definition at line 1012 of file aligner.h.

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

                {
                        TypeDict d;
                        d.put("min", EMObject::FLOAT, "Minimum scaling (default: 0.95)");
                        d.put("max", EMObject::FLOAT, "Maximum scaling (default: 1.05)");
                        d.put("step", EMObject::FLOAT, "Scaling step (default: 0.01)");
                        d.put("maxshift", EMObject::INT, "Maximum translation in pixels");
                        d.put("flip", EMObject::EMDATA);
                        d.put("r1", EMObject::INT, "Inner ring, pixels");
                        d.put("r2", EMObject::INT, "Outer ring, pixels");
                        d.put("maxiter", EMObject::INT, "Maximum number of iterations");
                        return d;
                }
static Aligner* EMAN::RotateTranslateFlipScaleAlignerIterative::NEW ( ) [inline, static]

Member Data Documentation

const string RotateTranslateFlipScaleAlignerIterative::NAME = "rotate_trans_flip_scale_iter" [static]

Definition at line 1026 of file aligner.h.

Referenced by get_name().


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